[Mlir-commits] [mlir] 0ed0a8e - [mlir] Use sparse-compiler pass in sparse benchmark

Saurabh Jha llvmlistbot at llvm.org
Wed Feb 9 12:17:11 PST 2022


Author: Saurabh Jha
Date: 2022-02-09T20:16:47Z
New Revision: 0ed0a8e2f045fb69cee002d1c358641a9cee22ad

URL: https://github.com/llvm/llvm-project/commit/0ed0a8e2f045fb69cee002d1c358641a9cee22ad
DIFF: https://github.com/llvm/llvm-project/commit/0ed0a8e2f045fb69cee002d1c358641a9cee22ad.diff

LOG: [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

Added: 
    

Modified: 
    mlir/benchmark/python/common.py

Removed: 
    


################################################################################
diff  --git a/mlir/benchmark/python/common.py b/mlir/benchmark/python/common.py
index f2f156c292cfa..a34091106daa9 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)
 
 


        


More information about the Mlir-commits mailing list