[Mlir-commits] [mlir] [MLIR] Add pattern to bubble up tensor.extract_slice (PR #126898)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Feb 25 08:13:10 PST 2025


================
@@ -582,6 +582,7 @@ transform::FuseOp::apply(transform::TransformRewriter &rewriter,
     RewritePatternSet patterns(context);
     tensor::ExtractSliceOp::getCanonicalizationPatterns(patterns, context);
     tensor::populateMergeConsecutiveInsertExtractSlicePatterns(patterns);
+    tensor::populateBubbleUpExtractSliceOpPatterns(patterns);
----------------
banach-space wrote:

Thanks for investigating this! IIUC, setting `apply_cleanup` would make your tests fail? It's worth adding such case.

Also, do we ever want `apply_cleanup` not to be `True`?

All in all, this still doesn't feel like "clean-up". But given the previous discussion and how things are wired-up ATM, I don't have a good suggestion.

https://github.com/llvm/llvm-project/pull/126898


More information about the Mlir-commits mailing list