Skip to content

Commit 1949856

Browse files
authored
[mlir][sparse] add linalg elt-wise fusion to sparsifier pipeline (#90924)
yields better IR in general, and all end-to-end tests pass!
1 parent 6d7d8e5 commit 1949856

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mlir/lib/Dialect/SparseTensor/Pipelines/SparseTensorPipelines.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@
3131

3232
void mlir::sparse_tensor::buildSparsifier(OpPassManager &pm,
3333
const SparsifierOptions &options) {
34-
// Rewrite named linalg ops into generic ops.
34+
// Rewrite named linalg ops into generic ops and apply fusion.
3535
pm.addNestedPass<func::FuncOp>(createLinalgGeneralizeNamedOpsPass());
36+
pm.addNestedPass<func::FuncOp>(createLinalgElementwiseOpFusionPass());
3637

3738
// Sparsification and bufferization mini-pipeline.
3839
pm.addPass(createSparsificationAndBufferizationPass(

0 commit comments

Comments
 (0)