[Mlir-commits] [mlir] [mlir][vector] Disallow pure reduction dims in vector.contract (PR #237709)

Andrzej WarzyƄski llvmlistbot at llvm.org
Tue Nov 3 03:50:29 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";
----------------
banach-space wrote:

Yes!

Please note that i was aligning this with `linalg.contract`:
https://github.com/llvm/llvm-project/blob/b8b5e88aa9eda612bb1321bc8a9fef0370c1de0a/mlir/lib/Dialect/Linalg/IR/LinalgOps.cpp?plain=1#L4861-L4863

I will update both. Thank you!

https://github.com/llvm/llvm-project/pull/237709


More information about the Mlir-commits mailing list