[Mlir-commits] [mlir] [mlir][linalg] Extend `FuseElementwiseOps` pattern to work with named ops (PR #144922)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Nov 6 07:00:42 PST 2025
srcarroll wrote:
> @srcarroll Adding the generic patterns would be a low-key change and potentially reasonable solution to the conundrum. Remember, Linalg has non-generic operations where fusion doesn't work / makes no sense, so we need to be careful.
@rengolin I agree. The `areElementwiseOpsFusable` function should be used to check if an `OpOperand`'s owner is fusable with its producer. It's used in the `FuseElementwiseOps` pattern to decide if the pattern should apply and is used in an assert in `fuseElementwiseOps` (which I don't like this abuse of assert, so I will change it to return a proper `Failure`). Happy to investigate further to make sure nothing funky happens.
https://github.com/llvm/llvm-project/pull/144922
More information about the Mlir-commits
mailing list