Skip to content

Commit 38c366e

Browse files
committed
[mlir][sparse] run more integration tests with and without SIMD
Reviewed By: wrengr Differential Revision: https://reviews.llvm.org/D113205
1 parent a2c9cf4 commit 38c366e

File tree

9 files changed

+107
-12
lines changed

9 files changed

+107
-12
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Do the same run, but now with SIMDization as well. This should not change the outcome.
1414
//
1515
// RUN: mlir-opt %s \
16-
// RUN: --sparsification="vectorization-strategy=2 vl=2 enable-simd-index32" --sparse-tensor-conversion \
16+
// RUN: --sparsification="vectorization-strategy=2 vl=2" --sparse-tensor-conversion \
1717
// RUN: --convert-vector-to-scf --convert-scf-to-std \
1818
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
1919
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
@@ -23,7 +23,6 @@
2323
// RUN: -e entry -entry-point-result=void \
2424
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
2525
// RUN: FileCheck %s
26-
//
2726

2827
#SV = #sparse_tensor.encoding<{ dimLevelType = [ "compressed" ] }>
2928

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
// RUN: --sparsification --sparse-tensor-conversion \
33
// RUN: --convert-vector-to-scf --convert-scf-to-std \
44
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
5-
// RUN: --std-bufferize --finalizing-bufferize \
5+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
6+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
7+
// RUN: TENSOR0="%mlir_integration_test_dir/data/test.tns" \
8+
// RUN: mlir-cpu-runner \
9+
// RUN: -e entry -entry-point-result=void \
10+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
11+
// 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" --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 \
620
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
721
// RUN: TENSOR0="%mlir_integration_test_dir/data/test.tns" \
822
// RUN: mlir-cpu-runner \

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
// RUN: --sparsification --sparse-tensor-conversion \
33
// RUN: --convert-vector-to-scf --convert-scf-to-std \
44
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
5-
// RUN: --std-bufferize --finalizing-bufferize \
5+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
6+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
7+
// RUN: TENSOR0="%mlir_integration_test_dir/data/mttkrp_b.tns" \
8+
// RUN: mlir-cpu-runner \
9+
// RUN: -e entry -entry-point-result=void \
10+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
11+
// 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" --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 \
620
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
721
// RUN: TENSOR0="%mlir_integration_test_dir/data/mttkrp_b.tns" \
822
// RUN: mlir-cpu-runner \

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
// RUN: --sparsification --sparse-tensor-conversion \
33
// RUN: --convert-vector-to-scf --convert-scf-to-std \
44
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
5-
// RUN: --std-bufferize --finalizing-bufferize \
5+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
6+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
7+
// RUN: TENSOR0="%mlir_integration_test_dir/data/test.mtx" \
8+
// RUN: mlir-cpu-runner \
9+
// RUN: -e entry -entry-point-result=void \
10+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
11+
// 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" --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 \
620
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
721
// RUN: TENSOR0="%mlir_integration_test_dir/data/test.mtx" \
822
// RUN: mlir-cpu-runner \

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,21 @@
1010
// RUN: -e entry -entry-point-result=void \
1111
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
1212
// RUN: FileCheck %s
13+
//
14+
// Do the same run, but now with SIMDization as well. This should not change the outcome.
15+
//
16+
// RUN: mlir-opt %s \
17+
// RUN: --linalg-generalize-named-ops --linalg-fuse-elementwise-ops \
18+
// RUN: --sparsification="vectorization-strategy=2 vl=2" --sparse-tensor-conversion \
19+
// RUN: --convert-vector-to-scf --convert-scf-to-std \
20+
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
21+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
22+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm \
23+
// RUN: --convert-std-to-llvm --reconcile-unrealized-casts | \
24+
// RUN: mlir-cpu-runner \
25+
// RUN: -e entry -entry-point-result=void \
26+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
27+
// RUN: FileCheck %s
1328

1429
#DCSR = #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ] }>
1530

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
1313
// RUN: FileCheck %s
1414
//
15-
// Do the same run, but now with SIMDization as well.
16-
// This should not change the outcome.
15+
// Do the same run, but now with SIMDization as well. This should not change the outcome.
1716
//
1817
// RUN: mlir-opt %s \
1918
// RUN: --linalg-generalize-named-ops --linalg-fuse-elementwise-ops \
@@ -28,11 +27,10 @@
2827
// RUN: -e entry -entry-point-result=void \
2928
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
3029
// RUN: FileCheck %s
31-
//
30+
3231
// Interop between linalg/sparse leaves some issues to be revolved:
3332
// UNSUPPORTED: asan
3433

35-
3634
#SM = #sparse_tensor.encoding<{ dimLevelType = [ "compressed", "compressed" ] }>
3735

3836
#trait_sampled_dense_dense = {

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

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,20 @@
22
// RUN: --sparsification --sparse-tensor-conversion \
33
// RUN: --convert-vector-to-scf --convert-scf-to-std \
44
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
5-
// RUN: --std-bufferize --finalizing-bufferize \
5+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
6+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
7+
// RUN: mlir-cpu-runner \
8+
// RUN: -e entry -entry-point-result=void \
9+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
10+
// RUN: FileCheck %s
11+
//
12+
// Do the same run, but now with SIMDization as well. This should not change the outcome.
13+
//
14+
// RUN: mlir-opt %s \
15+
// RUN: --sparsification="vectorization-strategy=2 vl=4" --sparse-tensor-conversion \
16+
// RUN: --convert-vector-to-scf --convert-scf-to-std \
17+
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
18+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
619
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
720
// RUN: mlir-cpu-runner \
821
// RUN: -e entry -entry-point-result=void \

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
// RUN: --sparsification --sparse-tensor-conversion \
33
// RUN: --convert-vector-to-scf --convert-scf-to-std \
44
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
5-
// RUN: --std-bufferize --finalizing-bufferize \
5+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
6+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
7+
// RUN: TENSOR0="%mlir_integration_test_dir/data/wide.mtx" \
8+
// RUN: mlir-cpu-runner \
9+
// RUN: -e entry -entry-point-result=void \
10+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
11+
// 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=2" --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 \
620
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
721
// RUN: TENSOR0="%mlir_integration_test_dir/data/wide.mtx" \
822
// RUN: mlir-cpu-runner \

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,21 @@
22
// RUN: --sparsification --sparse-tensor-conversion \
33
// RUN: --convert-vector-to-scf --convert-scf-to-std \
44
// RUN: --func-bufferize --tensor-constant-bufferize --tensor-bufferize \
5-
// RUN: --std-bufferize --finalizing-bufferize \
5+
// RUN: --std-bufferize --finalizing-bufferize --lower-affine \
6+
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
7+
// RUN: TENSOR0="%mlir_integration_test_dir/data/test.mtx" \
8+
// RUN: mlir-cpu-runner \
9+
// RUN: -e entry -entry-point-result=void \
10+
// RUN: -shared-libs=%mlir_integration_test_dir/libmlir_c_runner_utils%shlibext | \
11+
// 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=2" --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 \
620
// RUN: --convert-vector-to-llvm --convert-memref-to-llvm --convert-std-to-llvm --reconcile-unrealized-casts | \
721
// RUN: TENSOR0="%mlir_integration_test_dir/data/test.mtx" \
822
// RUN: mlir-cpu-runner \

0 commit comments

Comments
 (0)