Name Strings
SPV_EXT_cooperative_matrix_maintenance1
Contact
To report problems with this extension, please open a new issue at:
Contributors
-
Jeff Bolz, NVIDIA
-
Karthik Vaidyanathan, NVIDIA
-
Kevin Petit, Arm Ltd.
-
Stuart Brady, Arm Ltd.
-
Hans-Kristian Arntzen, Valve
-
Georg Lehmann, Valve
-
Vikram Tarikere, Imagination Technologies
Notice
Copyright (c) 2025-2026 The Khronos Group Inc. Copyright terms at http://www.khronos.org/registry/speccopyright.html
Status
-
Approved by the SPIR-V Working Group: 2026-06-17
-
Approved by the Khronos Board of Promoters: 2026-07-31
Version
Last Modified Date |
2026-05-11 |
Revision |
1 |
Dependencies
This extension is written against the SPIR-V Specification, Version 1.6, Revision 3, Unified.
This extension requires SPIR-V 1.3.
This extension requires SPV_KHR_cooperative_matrix.
Overview
This extension adds several new features building on the cooperative matrix types added in SPV_KHR_cooperative_matrix. The goal is to add and accelerate features beyond just simple GEMM kernels, including adding support for type/use conversions, reductions, per-element operations, and conversion of an element index to a matrix coordinate.
Extension Name
To use this extension within a SPIR-V module, the following OpExtension must be present in the module:
OpExtension "SPV_EXT_cooperative_matrix_maintenance1"
Modifications to the SPIR-V Specification, Version 1.6
2.2 Terms
Add to the list of Tangled Instructions in section 2.2.5 Control Flow:
-
OpCooperativeMatrixReduceEXT, OpCooperativeMatrixConvertUseEXT, and OpCooperativeMatrixPerElementOpEXT.
3.2.19 Decoration
Modify Section 3.2.19, "Decoration", adding these rows to the Decoration table:
| Decoration | Extra Operands | Enabling Capabilities | |
|---|---|---|---|
5440 |
CooperativeMatrixTransposeEXT |
CooperativeMatrixConversionsEXT |
|
3.31 Capabilities
Modify Section 3.31, "Capability", adding these rows to the Capability table:
| Capability | Enabling Capabilities | |
|---|---|---|
5430 |
CooperativeMatrixReductionsEXT |
|
5429 |
CooperativeMatrixConversionsEXT |
|
5432 |
CooperativeMatrixPerElementOperationsEXT |
|
5438 |
CooperativeMatrixGetCoordinateEXT |
|
3.X Cooperative Matrix Reduce Mode
New section in 3 "Binary Form".
| Cooperative Matrix Reduce Mode | Enabling Capabilities | |
|---|---|---|
0x1 |
Row |
|
0x2 |
Column |
|
0x4 |
2x2 |
|
It is invalid to combine 2x2 with Row or Column. Row and Column can be used together.
3.49.1 Miscellaneous Instructions
3.49.11 Conversion Instructions
Relax the restrictions on Op{F,S,U,etc.}Convert from SPV_KHR_cooperative_matrix if CooperativeMatrixConversionsEXT is enabled to allow Use to mismatch, where either the Use of the operand can be MatrixAccumulatorKHR and the Use of the result type can be MatrixAKHR or MatrixBKHR, or the Use of the result type can be MatrixAccumulatorKHR and the Use of the operand can be MatrixAKHR or MatrixBKHR. Also allow the instructions to be decorated with CooperativeMatrixTransposeEXT. The restriction on OpBitcast is not relaxed.
If the conversion instruction is decorated with CooperativeMatrixTransposeEXT, the operand must have the same Rows as Result Type has Columns, and vice versa, and the Use of Result Type must be MatrixAKHR or MatrixBKHR and the Use of the operand must be MatrixAccumulatorKHR. The elements of the matrix are transposed as part of the conversion, i.e. element (r,c) of the source is converted and stored in result element (c,r).
3.49.9 Function Instructions
OpCooperativeMatrixPerElementOpEXT The number of optional operands must match the number of additional parameters of Func. The type of each optional operand that does not have a cooperative matrix type must match the type of the corresponding parameter of Func. For each optional operand with a cooperative matrix type, the corresponding matrix element is passed to the function. The matrix type must match the type of Matrix, and the component type of the matrix must match the type of the corresponding parameter of Func. The return value of Func is the corresponding element of Result. The calls are considered unordered against each other, and calls may occur more than once. Within Func and any functions called directly or indirectly by Func,
tangled instructions are not allowed.
|
Capability: |
|||||
5+variable |
5369 |
<id> |
Result <id> |
<id> |
<id> |
Optional |
OpCooperativeMatrixReduceEXT Within CombineFunc and any functions called directly or indirectly by
CombineFunc, tangled instructions are not allowed.
|
Capability: |
|||||
6 |
5366 |
<id> |
Result <id> |
<id> |
Literal |
<id> |
Issues
-
How are matrix type conversions with Use change handled?
Discussion: RESOLVED. We need to support conversions that change both Component Type and Use at the same time, because there is often not a supported intermediate type that matches one but not the other. For example, if converting from f32 MatrixAccumulatorKHR to u8 MatrixAKHR, there may not be support for u8 MatrixAccumulatorKHR or f32 MatrixAKHR. Conversions that change the Component Type should use Op{F,S,U,etc.}Convert even if the Use changes.
We also need to support conversions that only change the Use, for example converting from f16 MatrixAccumulatorKHR to f16 MatrixAKHR. For this, OpFConvert could be confusing/misleading so we add a new OpCooperativeMatrixConvertUseEXT instruction for this case.
Revision History
| Rev | Date | Author | Changes |
|---|---|---|---|
1 |
2026-05-11 |
Jeff Bolz |
Initial revision of SPV_EXT_cooperative_matrix_maintenance1 |