Skip to content

Conversation

@javedabsar1
Copy link
Contributor

No description provided.

@llvmbot
Copy link
Member

llvmbot commented Feb 14, 2025

@llvm/pr-subscribers-mlir-linalg

Author: Javed Absar (javedabsar1)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/127213.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp (+6-2)
diff --git a/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp b/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
index 425ef2f3068b2..d35aad514e884 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
@@ -12,8 +12,12 @@
 using namespace mlir;
 using namespace mlir::linalg;
 
-/// Swaps tensor.extract_slice(linalg.fill(%cst, %init)) into linalg.fill(%cst,
-/// tensor.extract_slice(%init)) when the linalg.fill op have no other users.
+/// swaps:
+///      `tensor.extract_slice(linalg.fill(%cst, %init))`
+/// with:
+///      `linalg.fill(%cst, tensor.extract_slice(%init))`
+///
+/// when the linalg.fill op have no other users.
 /// This helps to reduce the fill footprint.
 struct SwapExtractSliceOfFill final
     : public OpRewritePattern<tensor::ExtractSliceOp> {

@llvmbot
Copy link
Member

llvmbot commented Feb 14, 2025

@llvm/pr-subscribers-mlir

Author: Javed Absar (javedabsar1)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/127213.diff

1 Files Affected:

  • (modified) mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp (+6-2)
diff --git a/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp b/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
index 425ef2f3068b2..d35aad514e884 100644
--- a/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
+++ b/mlir/lib/Dialect/Linalg/Transforms/SwapExtractSliceWithFillPatterns.cpp
@@ -12,8 +12,12 @@
 using namespace mlir;
 using namespace mlir::linalg;
 
-/// Swaps tensor.extract_slice(linalg.fill(%cst, %init)) into linalg.fill(%cst,
-/// tensor.extract_slice(%init)) when the linalg.fill op have no other users.
+/// swaps:
+///      `tensor.extract_slice(linalg.fill(%cst, %init))`
+/// with:
+///      `linalg.fill(%cst, tensor.extract_slice(%init))`
+///
+/// when the linalg.fill op have no other users.
 /// This helps to reduce the fill footprint.
 struct SwapExtractSliceOfFill final
     : public OpRewritePattern<tensor::ExtractSliceOp> {

Copy link
Contributor

@banach-space banach-space left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@javedabsar1 javedabsar1 merged commit 035bc52 into llvm:main Feb 14, 2025
11 checks passed
joaosaffran pushed a commit to joaosaffran/llvm-project that referenced this pull request Feb 14, 2025
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants