[Mlir-commits] [mlir] [mlir][transform] Add linalg.fold_reshape_ops_by_expansion transform op (PR #233732)

Charitha Saumya llvmlistbot at llvm.org
Tue Oct 20 09:50:48 PDT 2026


================
@@ -187,6 +187,22 @@ def ApplyEraseUnusedOperandsAndResultsPatternsOp : Op<Transform_Dialect,
   let assemblyFormat = "attr-dict";
 }
 
+def ApplyFoldReshapeOpsByExpansionPatternsOp : Op<Transform_Dialect,
+    "apply_patterns.linalg.fold_reshape_ops_by_expansion",
+    [DeclareOpInterfaceMethods<PatternDescriptorOpInterface>]> {
+  let description = [{
+    Collects patterns that fold reshape operations into their producers or
+    consumers by expanding dimensions.
+
+    If `fold_single_use_only` is true, folding is restricted to cases where the
----------------
charithaintc wrote:

any motivation for exposing this variant? 

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


More information about the Mlir-commits mailing list