[Mlir-commits] [mlir] [mlir] [linalg] Fold broadcast/transpose into linalg.generic (PR #212415)
Renato Golin
llvmlistbot at llvm.org
Tue Jul 28 01:30:18 PDT 2026
================
@@ -100,6 +144,7 @@ struct LinalgFoldIntoElementwisePass
void mlir::linalg::populateLinalgFoldIntoElementwisePatterns(
RewritePatternSet &patterns) {
- patterns.add<FoldIntoElementwisePattern<TransposeOp, BroadcastOp>>(
+ patterns.add<FoldIntoElementwisePattern<TransposeOp, BroadcastOp>,
----------------
rengolin wrote:
Both `generic` and `elementwise` are structured ops. There should be a pattern that works for both of them. There are some helpers to check if a `generic` implements the "element-wise interface" that can help check things.
https://github.com/llvm/llvm-project/pull/212415
More information about the Mlir-commits
mailing list