[Mlir-commits] [mlir] [mlir][vector] Document dimension kinds in `vector.contract` (NFC) (PR #230458)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Fri Oct 9 04:32:32 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-vector

Author: Federico Bruzzone (FedericoBruzzone)

<details>
<summary>Changes</summary>

Add a table to the `vector.contract` description summarizing _batch_, _free_, _contracting_, and _single-operand reduction_ dimensions.

Related to #<!-- -->230155.


---
Full diff: https://github.com/llvm/llvm-project/pull/230458.diff


1 Files Affected:

- (modified) mlir/include/mlir/Dialect/Vector/IR/VectorOps.td (+10) 


``````````diff
diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index 3309e8a546a5e4..468d04c5891ef2 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -100,6 +100,16 @@ def Vector_ContractionOp :
         are unrelated to each other and do not co-iterate, which
         should be expressed in their indexing maps.
 
+    Depending on its iterator type and on the operands it indexes, a dimension
+    is one of the following kinds:
+
+    | Iterator type | In output | In lhs and rhs | Kind                       |
+    | ------------- | --------- | -------------- | -------------------------- |
+    | "parallel"    | yes       | both           | batch                      |
+    | "parallel"    | yes       | one of them    | free                       |
+    | "reduction"   | no        | both           | contracting                |
+    | "reduction"   | no        | one of them    | reduction on one operand   |
+
     An indexing map attribute list must be specified with an entry for lhs, rhs
     and acc arguments. An indexing map attribute specifies a mapping from each
     iterator in the iterator type list, to each dimension of an N-D vector.

``````````

</details>


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


More information about the Mlir-commits mailing list