From 9596403c43c8db000ad3394091184da0cd1fcd0f Mon Sep 17 00:00:00 2001 From: Petr Kurapov Date: Mon, 15 Dec 2025 15:32:02 +0100 Subject: [PATCH 1/4] [MLIR][NFC] Fix the pass description to describe what it actually does. --- mlir/include/mlir/Dialect/Linalg/Passes.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/include/mlir/Dialect/Linalg/Passes.td b/mlir/include/mlir/Dialect/Linalg/Passes.td index 44da2965e6892..e1ea52ea2c21c 100644 --- a/mlir/include/mlir/Dialect/Linalg/Passes.td +++ b/mlir/include/mlir/Dialect/Linalg/Passes.td @@ -167,7 +167,7 @@ def LinalgInlineScalarOperandsPass : Pass<"linalg-inline-scalar-operands"> { } def LinalgFoldIntoElementwisePass : Pass<"linalg-fold-into-elementwise"> { - let summary = "Fold transform, broadcast and other ops into elementwise"; + let summary = "Fold transform ops into elementwise"; let dependentDialects = ["linalg::LinalgDialect"]; } From 9327a8bfeb44051116fddfa75a5d892c20cf76f6 Mon Sep 17 00:00:00 2001 From: Petr Kurapov Date: Tue, 16 Dec 2025 14:34:10 +0100 Subject: [PATCH 2/4] add a short pass description --- mlir/include/mlir/Dialect/Linalg/Passes.td | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mlir/include/mlir/Dialect/Linalg/Passes.td b/mlir/include/mlir/Dialect/Linalg/Passes.td index e1ea52ea2c21c..12e10f085e178 100644 --- a/mlir/include/mlir/Dialect/Linalg/Passes.td +++ b/mlir/include/mlir/Dialect/Linalg/Passes.td @@ -169,6 +169,13 @@ def LinalgInlineScalarOperandsPass : Pass<"linalg-inline-scalar-operands"> { def LinalgFoldIntoElementwisePass : Pass<"linalg-fold-into-elementwise"> { let summary = "Fold transform ops into elementwise"; let dependentDialects = ["linalg::LinalgDialect"]; + + let description = [{ + Fold transform ops that feed `linalg.elementwise` into the elementwise op + by updating its indexing maps. `linalg.transpose` producers whose consumer + indexing map is the identity are absorbed, turning the permutation into + the elementwise map itself. Other operands remain untouched. + }] } def LinalgDetensorizePass : InterfacePass<"linalg-detensorize", "FunctionOpInterface"> { From af947fbe02ad474be15baef33652a7f7b8af8914 Mon Sep 17 00:00:00 2001 From: Petr Kurapov Date: Tue, 16 Dec 2025 14:39:23 +0100 Subject: [PATCH 3/4] fixup! add a short pass description --- mlir/include/mlir/Dialect/Linalg/Passes.td | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlir/include/mlir/Dialect/Linalg/Passes.td b/mlir/include/mlir/Dialect/Linalg/Passes.td index 12e10f085e178..1c545e8d6e176 100644 --- a/mlir/include/mlir/Dialect/Linalg/Passes.td +++ b/mlir/include/mlir/Dialect/Linalg/Passes.td @@ -175,7 +175,7 @@ def LinalgFoldIntoElementwisePass : Pass<"linalg-fold-into-elementwise"> { by updating its indexing maps. `linalg.transpose` producers whose consumer indexing map is the identity are absorbed, turning the permutation into the elementwise map itself. Other operands remain untouched. - }] + }]; } def LinalgDetensorizePass : InterfacePass<"linalg-detensorize", "FunctionOpInterface"> { From 2557d96f7bb9df29e080af538d0d699bfbfca733 Mon Sep 17 00:00:00 2001 From: Petr Kurapov Date: Tue, 16 Dec 2025 15:01:02 +0100 Subject: [PATCH 4/4] fixup! fixup! add a short pass description --- mlir/include/mlir/Dialect/Linalg/Passes.td | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mlir/include/mlir/Dialect/Linalg/Passes.td b/mlir/include/mlir/Dialect/Linalg/Passes.td index 1c545e8d6e176..42d4d2083fc1c 100644 --- a/mlir/include/mlir/Dialect/Linalg/Passes.td +++ b/mlir/include/mlir/Dialect/Linalg/Passes.td @@ -167,11 +167,11 @@ def LinalgInlineScalarOperandsPass : Pass<"linalg-inline-scalar-operands"> { } def LinalgFoldIntoElementwisePass : Pass<"linalg-fold-into-elementwise"> { - let summary = "Fold transform ops into elementwise"; + let summary = "Fold transpose ops into elementwise"; let dependentDialects = ["linalg::LinalgDialect"]; let description = [{ - Fold transform ops that feed `linalg.elementwise` into the elementwise op + Fold transpose ops that feed `linalg.elementwise` into the elementwise op by updating its indexing maps. `linalg.transpose` producers whose consumer indexing map is the identity are absorbed, turning the permutation into the elementwise map itself. Other operands remain untouched.