summaryrefslogtreecommitdiff
path: root/mlir/benchmark
diff options
context:
space:
mode:
authorSaurabh Jha <saurabh.jhaa@gmail.com>2022-02-09 20:10:30 +0000
committerSaurabh Jha <saurabh.jhaa@gmail.com>2022-02-09 20:16:47 +0000
commit0ed0a8e2f045fb69cee002d1c358641a9cee22ad (patch)
treead90d459f8586702d2f086695a1c399538f6f862 /mlir/benchmark
parentaa845d7a245d85c441d0bd44fc7b6c3be8f3de8d (diff)
downloadllvm-0ed0a8e2f045fb69cee002d1c358641a9cee22ad.tar.gz
[mlir] Use sparse-compiler pass in sparse benchmark
This patch uses sparse-compiler option in mlir sparse tensor benchmark Reviewed By: aartbik Differential Revision: https://reviews.llvm.org/D118579
Diffstat (limited to 'mlir/benchmark')
-rw-r--r--mlir/benchmark/python/common.py19
1 files changed, 1 insertions, 18 deletions
diff --git a/mlir/benchmark/python/common.py b/mlir/benchmark/python/common.py
index f2f156c292cf..a34091106daa 100644
--- a/mlir/benchmark/python/common.py
+++ b/mlir/benchmark/python/common.py
@@ -19,24 +19,7 @@ def setup_passes(mlir_module):
"parallelization-strategy=0"
" vectorization-strategy=0 vl=1 enable-simd-index32=False"
)
- pipeline = (
- f"builtin.func"
- f"(linalg-generalize-named-ops,linalg-fuse-elementwise-ops),"
- f"sparsification{{{opt}}},"
- f"sparse-tensor-conversion,"
- f"builtin.func"
- f"(linalg-bufferize,convert-linalg-to-loops,convert-vector-to-scf),"
- f"convert-scf-to-cf,"
- f"func-bufferize,"
- f"arith-bufferize,"
- f"builtin.func(tensor-bufferize,finalizing-bufferize),"
- f"convert-vector-to-llvm"
- f"{{reassociate-fp-reductions=1 enable-index-optimizations=1}},"
- f"lower-affine,"
- f"convert-memref-to-llvm,"
- f"convert-std-to-llvm,"
- f"reconcile-unrealized-casts"
- )
+ pipeline = f"sparse-compiler{{{opt}}}"
PassManager.parse(pipeline).run(mlir_module)