[Mlir-commits] [mlir] [mlir][vector] Emit error when `kind` attribute is not a CombiningKind (PR #173659)

Jacques Pienaar llvmlistbot at llvm.org
Sun Jan 4 21:52:54 PST 2026


================
@@ -1091,6 +1091,11 @@ LogicalResult ContractionOp::verify() {
                                contractingDimMap, batchDimMap)))
     return failure();
 
+  if (!getKindAttr()) {
+    return emitOpError("expected 'kind' attribute of type CombiningKind(e.g. "
----------------
jpienaar wrote:

VectorOps.td has for ContractionOp

```
Arguments<(ins AnyVectorOfNonZeroRank:$lhs, AnyVectorOfNonZeroRank:$rhs, AnyType:$acc,
               ArrayAttr:$indexing_maps,
               Vector_IteratorTypeArrayAttr:$iterator_types,
               DefaultValuedAttr<Vector_CombiningKindAttr,
                                 "CombiningKind::ADD">:$kind)>,
```

why doesn't that attribute constraint fire here?

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


More information about the Mlir-commits mailing list