[Mlir-commits] [mlir] [mlir][Linalg] Preserve init in tiled in-place update patterns (PR #195912)
Javed Absar
llvmlistbot at llvm.org
Wed May 6 02:18:51 PDT 2026
================
@@ -92,6 +92,22 @@ struct MoveInitOperandsToInput : public OpRewritePattern<GenericOp> {
for (OpOperand &op : outputOperands) {
if (genericOp.getMatchingBlockArgument(&op).use_empty())
continue;
+ // When DropUnitDims folds a unit reduction dim, the generic becomes
+ // all-parallel but the former accumulator remains in outs. Moving it
+ // to ins is correct in general, but NOT when the init participates in
+ // an extract_slice -> generic -> insert_slice chain which is the
+ // canonical in-place update pattern that one-shot bufferize relies on.
----------------
javedabsar1 wrote:
@matthias-springer - your thoughts on this?
https://github.com/llvm/llvm-project/pull/195912
More information about the Mlir-commits
mailing list