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

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Feb 2 15:31:30 PST 2024


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

In this case, not so dirty.  A `linalg.generic` is just a "generic" version of all `LinalgOp`s. So any pattern on `linalg.generic` is as good a pattern on `LinalgOp`s. So from my perspective, in this particular case, its actually not bad. 
Ideally we should have a way to have canonicalizers on interfaces as well. Would be neat!


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


More information about the Mlir-commits mailing list