[Mlir-commits] [mlir] [[mlir][linalg] Infer reduction-neutral padding values in rewriteAsPaddedOp (PR #216517)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Sun Sep 13 11:00:33 PDT 2026
================
@@ -263,6 +266,151 @@ static Value padOperand(OpBuilder &builder, TilingInterface opToPad,
paddingValue, /*nofold=*/false, dynDims);
}
+/// Returns true if `operand` is indexed along at least one reduction dimension
+/// of `linalgOp`
+static bool isReducedOperand(linalg::LinalgOp linalgOp, OpOperand *operand,
+ ArrayRef<utils::IteratorType> iterTypes) {
+ AffineMap map = linalgOp.getMatchingIndexingMap(operand);
----------------
banach-space wrote:
```suggestion
assert(operand->getOwner() == linalgOp.getOperation() &&
"expected operand to belong to the LinalgOp");
AffineMap map = linalgOp.getMatchingIndexingMap(operand);
```
https://github.com/llvm/llvm-project/pull/216517
More information about the Mlir-commits
mailing list