[Mlir-commits] [mlir] [mlir][Linalg]: Add rewrite pattern to fuse fill with reduce operations (PR #125401)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Sun Feb 2 09:44:44 PST 2025
================
@@ -1893,6 +1893,34 @@ void populateDecomposeWinogradOpsPatterns(RewritePatternSet &patterns);
/// convert to a `linalg.dot`.
void populateContractionOpRankReducingPatterns(RewritePatternSet &patterns);
+/// Add patterns to fuse a linalg fill operation with a linalg operation.
----------------
MaheshRavishankar wrote:
In general this is not the prefered way of fusing a fill with a reduction. The preferred way is to use tile + fuse approach to fuse at a tile granularity (since fusing fill with its consumer reduction operations results in an inherently imperfectly nested loop computation). THe main issue here is this adds a conditional to the innermost loop computation which isnt what is generally performant.
But this seems still valid. Could you add some comments explaining the alternatives.
https://github.com/llvm/llvm-project/pull/125401
More information about the Mlir-commits
mailing list