Skip to content

Commit 5ac1e23

Browse files
committed
Add SPV_NV_cooperative_vector
1 parent 2b2e05e commit 5ac1e23

File tree

12 files changed

+720
-0
lines changed

12 files changed

+720
-0
lines changed

include/spirv/unified1/spirv.bf

+38
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,7 @@ namespace Spv
12021202
ShaderInvocationReorderNV = 5383,
12031203
BindlessTextureNV = 5390,
12041204
RayQueryPositionFetchKHR = 5391,
1205+
CooperativeVectorNV = 5394,
12051206
AtomicFloat16VectorNV = 5404,
12061207
RayTracingDisplacementMicromapNV = 5409,
12071208
RawAccessChainsNV = 5414,
@@ -1210,6 +1211,7 @@ namespace Spv
12101211
CooperativeMatrixPerElementOperationsNV = 5432,
12111212
CooperativeMatrixTensorAddressingNV = 5433,
12121213
CooperativeMatrixBlockLoadsNV = 5434,
1214+
CooperativeVectorTrainingNV = 5435,
12131215
TensorAddressingNV = 5439,
12141216
SubgroupShuffleINTEL = 5568,
12151217
SubgroupBufferBlockIOINTEL = 5569,
@@ -1586,6 +1588,35 @@ namespace Spv
15861588
Max = 0x7fffffff,
15871589
}
15881590

1591+
[AllowDuplicates, CRepr] public enum CooperativeVectorMatrixLayout
1592+
{
1593+
RowMajorNV = 0,
1594+
ColumnMajorNV = 1,
1595+
InferencingOptimalNV = 2,
1596+
TrainingOptimalNV = 3,
1597+
Max = 0x7fffffff,
1598+
}
1599+
1600+
[AllowDuplicates, CRepr] public enum ComponentType
1601+
{
1602+
Float16NV = 0,
1603+
Float32NV = 1,
1604+
Float64NV = 2,
1605+
SignedInt8NV = 3,
1606+
SignedInt16NV = 4,
1607+
SignedInt32NV = 5,
1608+
SignedInt64NV = 6,
1609+
UnsignedInt8NV = 7,
1610+
UnsignedInt16NV = 8,
1611+
UnsignedInt32NV = 9,
1612+
UnsignedInt64NV = 10,
1613+
SignedInt8PackedNV = 1000491000,
1614+
UnsignedInt8PackedNV = 1000491001,
1615+
FloatE4M3NV = 1000491002,
1616+
FloatE5M2NV = 1000491003,
1617+
Max = 0x7fffffff,
1618+
}
1619+
15891620
[AllowDuplicates, CRepr] public enum Op
15901621
{
15911622
OpNop = 0,
@@ -2047,13 +2078,20 @@ namespace Spv
20472078
OpReorderThreadWithHintNV = 5280,
20482079
OpTypeHitObjectNV = 5281,
20492080
OpImageSampleFootprintNV = 5283,
2081+
OpTypeCooperativeVectorNV = 5288,
2082+
OpCooperativeVectorMatrixMulNV = 5289,
2083+
OpCooperativeVectorOuterProductAccumulateNV = 5290,
2084+
OpCooperativeVectorReduceSumAccumulateNV = 5291,
2085+
OpCooperativeVectorMatrixMulAddNV = 5292,
20502086
OpCooperativeMatrixConvertNV = 5293,
20512087
OpEmitMeshTasksEXT = 5294,
20522088
OpSetMeshOutputsEXT = 5295,
20532089
OpGroupNonUniformPartitionNV = 5296,
20542090
OpWritePackedPrimitiveIndices4x8NV = 5299,
20552091
OpFetchMicroTriangleVertexPositionNV = 5300,
20562092
OpFetchMicroTriangleVertexBarycentricNV = 5301,
2093+
OpCooperativeVectorLoadNV = 5302,
2094+
OpCooperativeVectorStoreNV = 5303,
20572095
OpReportIntersectionKHR = 5334,
20582096
OpReportIntersectionNV = 5334,
20592097
OpIgnoreIntersectionNV = 5335,

include/spirv/unified1/spirv.core.grammar.json

+233
Original file line numberDiff line numberDiff line change
@@ -5967,6 +5967,93 @@
59675967
"extensions" : [ "SPV_NV_shader_image_footprint" ],
59685968
"version" : "None"
59695969
},
5970+
{
5971+
"opname" : "OpTypeCooperativeVectorNV",
5972+
"class" : "Reserved",
5973+
"opcode" : 5288,
5974+
"operands" : [
5975+
{ "kind" : "IdResult" },
5976+
{ "kind" : "IdRef", "name" : "'Component Type'" },
5977+
{ "kind" : "IdRef", "name" : "'Components'" }
5978+
],
5979+
"capabilities" : [ "CooperativeVectorNV" ],
5980+
"version" : "None"
5981+
},
5982+
{
5983+
"opname" : "OpCooperativeVectorMatrixMulNV",
5984+
"class" : "Reserved",
5985+
"opcode" : 5289,
5986+
"operands" : [
5987+
{ "kind" : "IdResultType" },
5988+
{ "kind" : "IdResult" },
5989+
{ "kind" : "IdRef", "name" : "'Input'" },
5990+
{ "kind" : "IdRef", "name" : "'InputInterpretation'" },
5991+
{ "kind" : "IdRef", "name" : "'Matrix'" },
5992+
{ "kind" : "IdRef", "name" : "'MatrixOffset'" },
5993+
{ "kind" : "IdRef", "name" : "'MatrixInterpretation'" },
5994+
{ "kind" : "IdRef", "name" : "'N'" },
5995+
{ "kind" : "IdRef", "name" : "'K'" },
5996+
{ "kind" : "IdRef", "name" : "'MemoryLayout'" },
5997+
{ "kind" : "IdRef", "name" : "'Transpose'" },
5998+
{ "kind" : "IdRef", "name" : "'MatrixStride'", "quantifier": "?" },
5999+
{ "kind" : "CooperativeMatrixOperands", "quantifier" : "?" }
6000+
],
6001+
"capabilities" : [ "CooperativeVectorNV" ],
6002+
"version" : "None"
6003+
},
6004+
{
6005+
"opname" : "OpCooperativeVectorOuterProductAccumulateNV",
6006+
"class" : "Reserved",
6007+
"opcode" : 5290,
6008+
"operands" : [
6009+
{ "kind" : "IdRef", "name" : "'Pointer'" },
6010+
{ "kind" : "IdRef", "name" : "'Offset'" },
6011+
{ "kind" : "IdRef", "name" : "'A'" },
6012+
{ "kind" : "IdRef", "name" : "'B'" },
6013+
{ "kind" : "IdRef", "name" : "'MemoryLayout'" },
6014+
{ "kind" : "IdRef", "name" : "'MatrixInterpretation'" },
6015+
{ "kind" : "IdRef", "name" : "'MatrixStride'", "quantifier": "?" }
6016+
],
6017+
"capabilities" : [ "CooperativeVectorTrainingNV" ],
6018+
"version" : "None"
6019+
},
6020+
{
6021+
"opname" : "OpCooperativeVectorReduceSumAccumulateNV",
6022+
"class" : "Reserved",
6023+
"opcode" : 5291,
6024+
"operands" : [
6025+
{ "kind" : "IdRef", "name" : "'Pointer'" },
6026+
{ "kind" : "IdRef", "name" : "'Offset'" },
6027+
{ "kind" : "IdRef", "name" : "'V'" }
6028+
],
6029+
"capabilities" : [ "CooperativeVectorTrainingNV" ],
6030+
"version" : "None"
6031+
},
6032+
{
6033+
"opname" : "OpCooperativeVectorMatrixMulAddNV",
6034+
"class" : "Reserved",
6035+
"opcode" : 5292,
6036+
"operands" : [
6037+
{ "kind" : "IdResultType" },
6038+
{ "kind" : "IdResult" },
6039+
{ "kind" : "IdRef", "name" : "'Input'" },
6040+
{ "kind" : "IdRef", "name" : "'InputInterpretation'" },
6041+
{ "kind" : "IdRef", "name" : "'Matrix'" },
6042+
{ "kind" : "IdRef", "name" : "'MatrixOffset'" },
6043+
{ "kind" : "IdRef", "name" : "'MatrixInterpretation'" },
6044+
{ "kind" : "IdRef", "name" : "'Bias'" },
6045+
{ "kind" : "IdRef", "name" : "'BiasOffset'" },
6046+
{ "kind" : "IdRef", "name" : "'BiasInterpretation'" },
6047+
{ "kind" : "IdRef", "name" : "'N'" },
6048+
{ "kind" : "IdRef", "name" : "'K'" },
6049+
{ "kind" : "IdRef", "name" : "'MemoryLayout'" },
6050+
{ "kind" : "IdRef", "name" : "'Transpose'" },
6051+
{ "kind" : "IdRef", "name" : "'MatrixStride'", "quantifier": "?" },
6052+
{ "kind" : "CooperativeMatrixOperands", "quantifier" : "?" }
6053+
],
6054+
"capabilities" : [ "CooperativeVectorNV" ],
6055+
"version" : "None"
6056+
},
59706057
{
59716058
"opname" : "OpCooperativeMatrixConvertNV",
59726059
"class" : "Conversion",
@@ -6060,6 +6147,33 @@
60606147
"capabilities" : [ "DisplacementMicromapNV" ],
60616148
"version" : "None"
60626149
},
6150+
{
6151+
"opname" : "OpCooperativeVectorLoadNV",
6152+
"class" : "Reserved",
6153+
"opcode" : 5302,
6154+
"operands" : [
6155+
{ "kind" : "IdResultType" },
6156+
{ "kind" : "IdResult" },
6157+
{ "kind" : "IdRef", "name" : "'Pointer'" },
6158+
{ "kind" : "IdRef", "name" : "'Offset'" },
6159+
{ "kind" : "MemoryAccess", "quantifier" : "?" }
6160+
],
6161+
"capabilities" : [ "CooperativeVectorNV" ],
6162+
"version" : "None"
6163+
},
6164+
{
6165+
"opname" : "OpCooperativeVectorStoreNV",
6166+
"class" : "Reserved",
6167+
"opcode" : 5303,
6168+
"operands" : [
6169+
{ "kind" : "IdRef", "name" : "'Pointer'" },
6170+
{ "kind" : "IdRef", "name" : "'Offset'" },
6171+
{ "kind" : "IdRef", "name" : "'Object'" },
6172+
{ "kind" : "MemoryAccess", "quantifier" : "?" }
6173+
],
6174+
"capabilities" : [ "CooperativeVectorNV" ],
6175+
"version" : "None"
6176+
},
60636177
{
60646178
"opname" : "OpReportIntersectionKHR",
60656179
"class" : "Reserved",
@@ -16221,6 +16335,12 @@
1622116335
"extensions" : [ "SPV_KHR_ray_tracing_position_fetch" ],
1622216336
"version" : "None"
1622316337
},
16338+
{
16339+
"enumerant" : "CooperativeVectorNV",
16340+
"value" : 5394,
16341+
"extensions" : [ "SPV_NV_cooperative_vector" ],
16342+
"version" : "None"
16343+
},
1622416344
{
1622516345
"enumerant" : "AtomicFloat16VectorNV",
1622616346
"value" : 5404,
@@ -16270,6 +16390,12 @@
1627016390
"extensions" : [ "SPV_NV_cooperative_matrix2" ],
1627116391
"version" : "None"
1627216392
},
16393+
{
16394+
"enumerant" : "CooperativeVectorTrainingNV",
16395+
"value" : 5435,
16396+
"extensions" : [ "SPV_NV_cooperative_vector" ],
16397+
"version" : "None"
16398+
},
1627316399
{
1627416400
"enumerant" : "TensorAddressingNV",
1627516401
"value" : 5439,
@@ -17174,6 +17300,113 @@
1717417300
"enumerants" : [
1717517301
]
1717617302
},
17303+
{
17304+
"category" : "ValueEnum",
17305+
"kind" : "CooperativeVectorMatrixLayout",
17306+
"enumerants" : [
17307+
{
17308+
"enumerant" : "RowMajorNV",
17309+
"value" : 0,
17310+
"version" : "None"
17311+
},
17312+
{
17313+
"enumerant" : "ColumnMajorNV",
17314+
"value" : 1,
17315+
"version" : "None"
17316+
},
17317+
{
17318+
"enumerant" : "InferencingOptimalNV",
17319+
"value" : 2,
17320+
"version" : "None"
17321+
},
17322+
{
17323+
"enumerant" : "TrainingOptimalNV",
17324+
"value" : 3,
17325+
"version" : "None"
17326+
}
17327+
]
17328+
},
17329+
{
17330+
"category" : "ValueEnum",
17331+
"kind" : "ComponentType",
17332+
"enumerants" : [
17333+
{
17334+
"enumerant" : "Float16NV",
17335+
"value" : 0,
17336+
"version" : "None"
17337+
},
17338+
{
17339+
"enumerant" : "Float32NV",
17340+
"value" : 1,
17341+
"version" : "None"
17342+
},
17343+
{
17344+
"enumerant" : "Float64NV",
17345+
"value" : 2,
17346+
"version" : "None"
17347+
},
17348+
{
17349+
"enumerant" : "SignedInt8NV",
17350+
"value" : 3,
17351+
"version" : "None"
17352+
},
17353+
{
17354+
"enumerant" : "SignedInt16NV",
17355+
"value" : 4,
17356+
"version" : "None"
17357+
},
17358+
{
17359+
"enumerant" : "SignedInt32NV",
17360+
"value" : 5,
17361+
"version" : "None"
17362+
},
17363+
{
17364+
"enumerant" : "SignedInt64NV",
17365+
"value" : 6,
17366+
"version" : "None"
17367+
},
17368+
{
17369+
"enumerant" : "UnsignedInt8NV",
17370+
"value" : 7,
17371+
"version" : "None"
17372+
},
17373+
{
17374+
"enumerant" : "UnsignedInt16NV",
17375+
"value" : 8,
17376+
"version" : "None"
17377+
},
17378+
{
17379+
"enumerant" : "UnsignedInt32NV",
17380+
"value" : 9,
17381+
"version" : "None"
17382+
},
17383+
{
17384+
"enumerant" : "UnsignedInt64NV",
17385+
"value" : 10,
17386+
"version" : "None"
17387+
},
17388+
{
17389+
"enumerant" : "SignedInt8PackedNV",
17390+
"value" : 1000491000,
17391+
"version" : "None"
17392+
},
17393+
{
17394+
"enumerant" : "UnsignedInt8PackedNV",
17395+
"value" : 1000491001,
17396+
"version" : "None"
17397+
},
17398+
{
17399+
"enumerant" : "FloatE4M3NV",
17400+
"value" : 1000491002,
17401+
"version" : "None"
17402+
},
17403+
{
17404+
"enumerant" : "FloatE5M2NV",
17405+
"value" : 1000491003,
17406+
"version" : "None"
17407+
}
17408+
]
17409+
},
1717717410
{
1717817411
"category" : "Id",
1717917412
"kind" : "IdResultType",

0 commit comments

Comments
 (0)