[Mlir-commits] [mlir] 1949856 - [mlir][sparse] add linalg elt-wise fusion to sparsifier pipeline (#90924)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu May 2 18:21:03 PDT 2024
Author: Aart Bik
Date: 2024-05-02T18:21:00-07:00
New Revision: 1949856126df50c0ea4ee2f507d24613bd54824a
URL: https://github.com/llvm/llvm-project/commit/1949856126df50c0ea4ee2f507d24613bd54824a
DIFF: https://github.com/llvm/llvm-project/commit/1949856126df50c0ea4ee2f507d24613bd54824a.diff
LOG: [mlir][sparse] add linalg elt-wise fusion to sparsifier pipeline (#90924)
yields better IR in general, and all end-to-end tests pass!
Added:
Modified:
mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
index e58503d508ced4..ab4d90ec745d4a 100644
--- a/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
+++ b/mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp
@@ -31,8 +31,9 @@
void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
const SparsifierOptions &options) {
- // Rewrite named linalg ops into generic ops.
+ // Rewrite named linalg ops into generic ops and apply fusion.
pm.addNestedPass<func::FuncOp>(createLinalgGeneralizeNamedOpsPass());
+ pm.addNestedPass<func::FuncOp>(createLinalgElementwiseOpFusionPass());
// Sparsification and bufferization mini-pipeline.
pm.addPass(createSparsificationAndBufferizationPass(
More information about the Mlir-commits
mailing list