[Mlir-commits] [mlir] [MLIR] Add pattern to bubble up tensor.extract_slice (PR #126898)
ofri frishman
llvmlistbot at llvm.org
Wed Feb 26 22:33:04 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);
----------------
ofri-frishman wrote:
I added a test where `apply_cleanup` is false and the bubble up does not happen.
I'm not sure if anyone has a case where they would require `apply_cleanup` not to be `True`, but since it is currently optional, I would not want to change that in this PR.
I think that perhaps the name "clean-up" isn't a good match for what these patterns do, a possible solution could be to change the name to something more fitting, but I would leave that to a separate PR.
https://github.com/llvm/llvm-project/pull/126898
More information about the Mlir-commits
mailing list