[Mlir-commits] [mlir] [mlir][vector] Disallow pure reduction dims in vector.contract (PR #237709)
Jianhui Li
llvmlistbot at llvm.org
Sun Nov 1 23:31:11 PST 2026
================
@@ -1180,6 +1199,13 @@ LogicalResult ContractionOp::verify() {
<< index << " to be a projected permutation of its inputs";
}
+ // TODO: Unify this with linalg.contract
+ auto pureReduceDim = getPureReductionDim(this);
+ if (pureReduceDim.has_value())
+ return emitOpError("iteration space dim at index ")
+ << pureReduceDim.value()
+ << " is neither a contracting dim nor of parallel iteration type";
----------------
Jianhui-Li wrote:
Can the message be more straightforward: "reduction dim at index N must appear in both LHS and RHS"?
https://github.com/llvm/llvm-project/pull/237709
More information about the Mlir-commits
mailing list