Contributors
-
Jeff Bolz, NVIDIA
-
Matthew Netsch, Qualcomm
-
Vikram Tarikere, Imagination Technologies
-
Alan Baker, Google
-
Russell Liu, AMD
-
Alexander Galazin, Qualcomm
-
Tobias Hector, AMD
Notice
Copyright (c) 2026 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
-
Approved by the SPIR-V Working Group: 2026-10-07
-
Approved by the Khronos Board of Promoters: 2026-11-20
Dependencies
This extension is written against the SPIR-V Specification, Version 1.6, Revision 7, Unified.
This extension requires SPIR-V 1.3.
This extension interacts with SPV_EXT_long_vector.
This extension interacts with SPV_KHR_physical_storage_buffer.
This extension interacts with SPV_KHR_untyped_pointers by accepting untyped pointers as pointer operands.
This extension reuses the Cooperative Matrix Use and Cooperative Matrix Operand operand kinds but does not require SPV_KHR_cooperative_matrix.
Overview
This extension adds instructions for per-invocation matrix-vector multiplication and outer-product accumulation. These operations are intended to accelerate the evaluation and training of small neural networks.
SPV_NV_cooperative_vector introduced a dedicated cooperative vector type and instructions for arithmetic, conversion, load, store, matrix-vector multiplication, outer-product accumulation, and component-wise atomic accumulation.
This extension uses ordinary vector types instead. SPV_EXT_long_vector provides equivalent vector types with arbitrary or specialization-constant component counts. Ordinary vector instructions provide arithmetic, conversion, load, and store operations. Component-wise atomic accumulation is provided separately by extensions that allow vector operands for atomic add. Consequently, this extension only provides the matrix-vector multiplication and outer-product functionality.
The matrix-vector and outer-product operations are each split into a pair of instructions. OpCooperativeVectorMatrixLoadEXT produces an abstract matrix value that is consumed by OpCooperativeVectorMatrixMulEXT or OpCooperativeVectorMatrixMulAddEXT. OpCooperativeVectorOuterProductEXT produces an abstract matrix-accumulator value that is consumed by OpCooperativeVectorMatrixAccumulateEXT.
The loaded-matrix and matrix-accumulator parameterizations of the abstract type are intentionally distinct. A loaded matrix cannot be accumulated to memory and an outer product’s result cannot be used for a matrix-vector multiplication. The abstract values also allow an implementation to preserve the producer operands and re-fuse each producer/consumer pair when lowering to hardware.
This extension introduces the types and instructions, but does not specify rules about what types are supported. This is left to the client API specifications, and it is expected that different implementations may support different types.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_EXT_cooperative_vector"
Modifications to the SPIR-V Specification, Version 1.6
2.2 Terms
Add the following type to the definition of Abstract Type:
-
OpTypeCooperativeVectorMatrixEXT
2.16 Validation Rules
Modify section 2.16.1. Universal Validation Rules:
-
Add OpCooperativeVectorMatrixLoadEXT and OpCooperativeVectorMatrixAccumulateEXT to the list of instructions under "It is invalid for a pointer to be an operand to any instruction other than:", when the Logical addressing model is selected and neither the VariablePointers nor VariablePointersStorageBuffer capability are declared.
-
OpTypeCooperativeVectorMatrixEXT types (or types containing them) can only be allocated in Function or Private storage classes.
3.31 Capabilities
Modify Section 3.31, "Capability", adding these rows to the Capability table:
| Capability | Implicitly Declares | |
|---|---|---|
5454 |
CooperativeVectorEXT |
|
5455 |
CooperativeVectorTrainingEXT |
CooperativeVectorEXT |
3.X Cooperative Vector Matrix Layout
New section in 3 "Binary Form".
| Cooperative Vector Matrix Layout | Enabling Capabilities | |
|---|---|---|
0 |
RowMajorEXT |
|
1 |
ColumnMajorEXT |
|
2 |
InferencingOptimalEXT |
|
3 |
TrainingOptimalEXT |
|
The corresponding NV enumerants introduced by SPV_NV_cooperative_vector are aliases of these enumerants.
3.X Cooperative Vector Matrix Component Type
Modify the Cooperative Vector Matrix Component Type table, making the EXT enumerants primary and the corresponding NV enumerants aliases:
| Cooperative Vector Matrix Component Type | Enabling Capabilities | |
|---|---|---|
0 |
Float16EXT |
|
1 |
Float32EXT |
|
2 |
Float64EXT |
|
3 |
SignedInt8EXT |
|
4 |
SignedInt16EXT |
|
5 |
SignedInt32EXT |
|
6 |
SignedInt64EXT |
|
7 |
UnsignedInt8EXT |
|
8 |
UnsignedInt16EXT |
|
9 |
UnsignedInt32EXT |
|
10 |
UnsignedInt64EXT |
|
1000491000 |
SignedInt8PackedEXT |
|
1000491001 |
UnsignedInt8PackedEXT |
|
1000491002 |
FloatE4M3EXT |
|
1000491003 |
FloatE5M2EXT |
|
3.XX.6 Type-Declaration Instructions
3.XX.15 Logical Instructions
Modify OpSelect to allow Result Type to additionally be OpTypeCooperativeVectorMatrixEXT. When Result Type is OpTypeCooperativeVectorMatrixEXT, Condition must be a scalar Boolean.
3.XX.X Cooperative Vector Instructions
Issues
-
Why does this extension use ordinary vector types rather than introduce an EXT cooperative vector type?
RESOLVED: SPV_EXT_long_vector provides equivalent types, including vectors whose component count is a specialization constant. Reusing ordinary vectors also makes the existing arithmetic, conversion, load, and store instructions available without extending each of them.
-
Why are matrix load and matrix-vector multiply separate instructions?
RESOLVED: To more closely match dx::linalg.
-
Should this extension reuse OpTypeCooperativeMatrixKHR?
RESOLVED: No. This extension defines a dedicated abstract type with similar parameters. Cooperative matrix values have broader value semantics and a different set of supported instructions.
-
How are loaded matrices kept distinct from outer-product accumulators?
RESOLVED: They use distinct MatrixAKHR and MatrixAccumulatorKHR parameterizations of OpTypeCooperativeVectorMatrixEXT, reusing the existing Cooperative Matrix Use operand kind. This prevents a loaded matrix from being passed to OpCooperativeVectorMatrixAccumulateEXT and prevents an outer product from being passed to OpCooperativeVectorMatrixMulEXT or OpCooperativeVectorMatrixMulAddEXT.
-
Why is Component Type a parameter of OpTypeCooperativeVectorMatrixEXT?
RESOLVED: It determines the format loaded from memory for MatrixAKHR and the arithmetic and memory format used for MatrixAccumulatorKHR. Making it a type parameter also makes incompatible matrix formats distinct SPIR-V types. It uses the Cooperative Vector Matrix Component Type enum rather than a SPIR-V scalar type so that matrix formats without a corresponding scalar type, including the FP8 formats introduced by SPV_NV_cooperative_vector, can be represented.
-
Why are Memory Layout and Transpose operands of the memory instructions rather than parameters of OpTypeCooperativeVectorMatrixEXT?
RESOLVED: They describe how a memory instruction accesses a matrix and do not need to be part of the identity of the abstract matrix type. Once loaded, the matrix has the logical dimensions specified by its type regardless of its source layout or whether it was transposed. Keeping them on the memory instructions also more closely matches dx::linalg and permits matrix values loaded in different ways to have the same type.
-
Why does OpTypeCooperativeVectorMatrixEXT not have a Scope operand like OpTypeCooperativeMatrixKHR?
RESOLVED: Cooperative-vector matrices and accumulators are always logically owned by a single invocation. A Scope operand would be fixed to Invocation and carry no additional information.
-
Should the abstract intermediate values be storable, copyable, selectable, or usable as function parameters and return values?
RESOLVED: Yes. They may flow through ordinary SPIR-V value operations. There are no other type-specific operations on them. The Use parameter prevents loaded matrices and outer-product accumulators from being interchanged.
-
How are out-of-bounds accesses handled?
RESOLVED: Bounds checking is a property of the client API and does not require a SPIR-V operand. A client API may provide modes in which these operations are bounds checked and modes in which they are not.
-
How are offsets and strides represented for memory accesses?
RESOLVED: As with cooperative matrix loads and stores, the pointer operand points to the first element accessed, so any offset is folded into the access-chain instruction used to form the pointer. When the pointer has an OpTypePointer type, stride is measured in elements of its pointed-to type. When the pointer has an OpTypeUntypedPointerKHR type, stride is measured in bytes. This differs from SPV_NV_cooperative_vector, whose matrix and bias instructions have explicit byte-offset operands and whose matrix strides are always measured in bytes.
-
Why does OpCooperativeVectorMatrixMulAddEXT take a vector value for Bias rather than load it from memory?
RESOLVED: The shader can load an ordinary vector before the instruction, giving it explicit control over the address, memory semantics, bounds checking, and the bias’s source type. The type of the vector supplies the bias type without a separate interpretation operand, and the client API advertises which bias and result type combinations are supported.
-
May the component type of A and B differ from the Component Type of the result of OpCooperativeVectorOuterProductEXT?
RESOLVED: Yes. As in SPV_NV_cooperative_vector, A and B must have the same component type, but the accumulator component type is selected independently. The client API defines the supported combinations and the precision of the operations.
-
Can the training instruction support only TrainingOptimalEXT layout? If so, can the Memory Layout and Matrix Stride instruction operands be removed?
RESOLVED: There is no restriction on layout at the universal SPIR-V level. The current client API may support only TrainingOptimalEXT layout and ignore Matrix Stride, but future client APIs may relax this.
-
Why is there no replacement for OpCooperativeVectorReduceSumAccumulateNV?
RESOLVED: Despite its name, that instruction performs component-wise atomic adds rather than a reduction. Extensions that allow vector operands for atomic add provide the same operation more generally.