[Mlir-commits] [mlir] [mlir] [linalg] Add pattern to swap transpose with broadcast (PR #97063)

Mehdi Amini llvmlistbot at llvm.org
Fri Jul 19 03:02:48 PDT 2024


================
@@ -51,6 +56,60 @@ Some important things to think about w.r.t. canonicalization patterns:
 *   It is always good to eliminate operations entirely when possible, e.g. by
     folding known identities (like "x + 0 = x").
 
+*   Canonicalize isn't a great place to put pattens with expensive compile time
+    (i.e. have O(n) complexity) or complicated cost models.
+
+*   Canonicalize shouldn't drop the semantic of original operation.
----------------
joker-eph wrote:

```suggestion
*   Canonicalize shouldn't lose the semantic of original operation: the original information should always be recoverable from the transformed IR.
```

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


More information about the Mlir-commits mailing list