Skip to content

Commit

Permalink
[mlir] Use sparse-compiler pass in sparse benchmark
Browse files Browse the repository at this point in the history
This patch uses sparse-compiler option in mlir sparse tensor benchmark

Reviewed By: aartbik

Differential Revision: https://reviews.llvm.org/D118579
  • Loading branch information
SaurabhJha committed Feb 9, 2022
1 parent aa845d7 commit 0ed0a8e
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions mlir/benchmark/python/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)


Expand Down

0 comments on commit 0ed0a8e

Please sign in to comment.