[Mlir-commits] [mlir] [mlir][linalg]Implement canonicalizer for `BroadCastOp` on tensors (PR #80466)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 2 14:12:10 PST 2024


================
@@ -1907,6 +1907,20 @@ void BroadcastOp::getEffects(
                         getDpsInits());
 }
 
+LogicalResult BroadcastOp::canonicalize(BroadcastOp op,
----------------
MaheshRavishankar wrote:

I have a dirty trick. The `getCanonicalization` is just a hook. It could bring in any pattern. You cuold just make that pattern work on `LinalgOp` and it will get pulled into canonicalizer and apply to any LinalgOp. (I said it was a dirty trick)

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


More information about the Mlir-commits mailing list