vector.mma
← vector dialect
Compute a matrix multiply-accumulate over target-shaped vector fragments. The op consumes only the physical lhs, rhs, and init vectors; logical M/N/K shape, fragment role, packed storage schema, scales, codebooks, sparse metadata, and other interpretation data are carried by vector.fragment facts on those operands. Lowering queries those facts to select native matrix instructions or a reference decomposition without baking target-specific witnesses into the MMA syntax.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
Pure |
| Target contracts |
vector.contraction |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
lhs |
vector |
required |
Physical lhs fragment vector. |
| Operand |
rhs |
vector |
required |
Physical rhs fragment vector. |
| Operand |
init |
vector |
required |
Physical accumulator/addend fragment vector. |
| Result |
result |
vector |
required |
Updated accumulator/result fragment vector. |
Verification constraints
Examples
%r = vector.mma %lhs, %rhs, %init : vector<8xf16>, vector<8xf16>, vector<8xf32>
%r = vector.mma %lhs, %rhs, %init : vector<6xi32>, vector<6xi32>, vector<8xf32>