Skip to content

Commit c5735fa

Browse files
committed
[mlir][sparse] enable a few vectorized runs in integration tests
Recent changes outside sparse compiler exposed the requirement of running a new pass (lower-affine) but this only became apparent with private testing. By adding some vectorized runs to integration test, we will detect the need for such changes earlier and also widen codegen coverage of course. Reviewed By: gussmith23 Differential Revision: https://reviews.llvm.org/D108667
1 parent 04fb9b7 commit c5735fa

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_matvec.mlir

+14
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@
99
// RUN: -e entry -entry-point-result=void \
1010
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
1111
// RUN: FileCheck %s
12+
//
13+
// Do the same run, but now with SIMDization as well. This should not change the outcome.
14+
//
15+
// RUN: mlir-opt %s \
16+
// RUN: --sparsification="vectorization-strategy=2 vl=16 enable-simd-index32" --sparse-tensor-conversion \
17+
// RUN: --convert-vector-to-scf --convert-scf-to-std \
18+
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
19+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
20+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm | \
21+
// RUN: TENSOR0="%mlir_integration_test_dir/data/wide.mtx" \
22+
// RUN: mlir-cpu-runner \
23+
// RUN: -e entry -entry-point-result=void \
24+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
25+
// RUN: FileCheck %s
1226

1327
!Filename = type !llvm.ptr<i8>
1428

mlir/test/Integration/Dialect/SparseTensor/CPU/sparse_sampled_matmul.mlir

+15
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,21 @@
99
// RUN: -e entry -entry-point-result=void \
1010
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
1111
// RUN: FileCheck %s
12+
//
13+
// Do the same run, but now with SIMDization as well. This should not change the outcome.
14+
//
15+
// RUN: mlir-opt %s \
16+
// RUN: --sparsification="vectorization-strategy=2 vl=4 enable-simd-index32" --sparse-tensor-conversion \
17+
// RUN: --convert-vector-to-scf --convert-scf-to-std \
18+
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
19+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
20+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm | \
21+
// RUN: TENSOR0="%mlir_integration_test_dir/data/test.mtx" \
22+
// RUN: mlir-cpu-runner \
23+
// RUN: -e entry -entry-point-result=void \
24+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
25+
// RUN: FileCheck %s
26+
//
1227

1328
!Filename = type !llvm.ptr<i8>
1429

0 commit comments

Comments
 (0)