[Mlir-commits] [mlir] [nfc][mlir][linalg] Make example easier to read. (PR #127213)
Javed Absar
llvmlistbot at llvm.org
Fri Feb 14 06:57:29 PST 2025
https://github.com/javedabsar1 created https://github.com/llvm/llvm-project/pull/127213
None
>From 502654dc248584ec5ba7d1c2c07be0a3dcee6e05 Mon Sep 17 00:00:00 2001
From: Javed Absar <javed.absar at gmail.com>
Date: Fri, 14 Feb 2025 09:55:46 -0500
Subject: [PATCH] [nfc][mlir][linalg] Make example easier to read.
---
.../Transforms/SwapExtractSliceWithFillPatterns.cpp | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
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> {
More information about the Mlir-commits
mailing list