diff --git a/include/spirv/unified1/spirv.bf b/include/spirv/unified1/spirv.bf index 19a126114..d79f27ee7 100644 --- a/include/spirv/unified1/spirv.bf +++ b/include/spirv/unified1/spirv.bf @@ -1204,6 +1204,12 @@ namespace Spv AtomicFloat16VectorNV = 5404, RayTracingDisplacementMicromapNV = 5409, RawAccessChainsNV = 5414, + CooperativeMatrixReductionsNV = 5430, + CooperativeMatrixConversionsNV = 5431, + CooperativeMatrixPerElementOperationsNV = 5432, + CooperativeMatrixTensorAddressingNV = 5433, + CooperativeMatrixBlockLoadsNV = 5434, + TensorAddressingNV = 5439, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1437,6 +1443,46 @@ namespace Spv Max = 0x7fffffff, } + [AllowDuplicates, CRepr] public enum CooperativeMatrixReduceShift + { + Row = 0, + Column = 1, + CooperativeMatrixReduce2x2 = 2, + Max = 0x7fffffff, + } + + [AllowDuplicates, CRepr] public enum CooperativeMatrixReduceMask + { + MaskNone = 0, + Row = 0x00000001, + Column = 0x00000002, + CooperativeMatrixReduce2x2 = 0x00000004, + } + + [AllowDuplicates, CRepr] public enum TensorClampMode + { + Undefined = 0, + Constant = 1, + ClampToEdge = 2, + Repeat = 3, + RepeatMirrored = 4, + Max = 0x7fffffff, + } + + [AllowDuplicates, CRepr] public enum TensorAddressingOperandsShift + { + TensorView = 0, + DecodeFunc = 1, + Max = 0x7fffffff, + } + + [AllowDuplicates, CRepr] public enum TensorAddressingOperandsMask + { + MaskNone = 0, + TensorView = 0x00000001, + DecodeFunc = 0x00000002, + } + [AllowDuplicates, CRepr] public enum InitializationModeQualifier { InitOnDeviceReprogramINTEL = 0, @@ -1958,6 +2004,7 @@ namespace Spv OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, @@ -1982,9 +2029,26 @@ namespace Spv OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, diff --git a/include/spirv/unified1/spirv.core.grammar.json b/include/spirv/unified1/spirv.core.grammar.json index 223958dc4..e73a2fc06 100644 --- a/include/spirv/unified1/spirv.core.grammar.json +++ b/include/spirv/unified1/spirv.core.grammar.json @@ -5951,6 +5951,18 @@ "extensions" : [ "SPV_NV_shader_image_footprint" ], "version" : "None" }, + { + "opname" : "OpCooperativeMatrixConvertNV", + "class" : "Conversion", + "opcode" : 5293, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" } + ], + "capabilities" : [ "CooperativeMatrixConversionsNV" ], + "version" : "None" + }, { "opname" : "OpEmitMeshTasksEXT", "class" : "Reserved", @@ -6265,6 +6277,195 @@ "extensions" : [ "SPV_EXT_fragment_shader_interlock" ], "version" : "None" }, + { + "opname" : "OpCooperativeMatrixReduceNV", + "class" : "Arithmetic", + "opcode" : 5366, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" }, + { "kind" : "CooperativeMatrixReduce", "name" : "'Reduce'" }, + { "kind" : "IdRef", "name" : "'CombineFunc'" } + ], + "capabilities" : [ "CooperativeMatrixReductionsNV" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixLoadTensorNV", + "class" : "Memory", + "opcode" : 5367, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "IdRef", "name" : "'TensorLayout'" }, + { "kind" : "MemoryAccess", "name" : "'Memory Operand'"}, + { "kind" : "TensorAddressingOperands", "name" : "'Tensor Addressing Operands'"} + ], + "capabilities" : [ "CooperativeMatrixTensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixStoreTensorNV", + "class" : "Memory", + "opcode" : 5368, + "operands" : [ + { "kind" : "IdRef", "name" : "'Pointer'" }, + { "kind" : "IdRef", "name" : "'Object'" }, + { "kind" : "IdRef", "name" : "'TensorLayout'" }, + { "kind" : "MemoryAccess", "name" : "'Memory Operand'"}, + { "kind" : "TensorAddressingOperands", "name" : "'Tensor Addressing Operands'"} + ], + "capabilities" : [ "CooperativeMatrixTensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixPerElementOpNV", + "class" : "Function", + "opcode" : 5369, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" }, + { "kind" : "IdRef", "name" : "'Func'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operands'" } + ], + "capabilities" : [ "CooperativeMatrixPerElementOperationsNV" ], + "version" : "None" + }, + { + "opname" : "OpTypeTensorLayoutNV", + "class" : "Type-Declaration", + "opcode" : 5370, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Dim'" }, + { "kind" : "IdRef", "name" : "'ClampMode'" } + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTypeTensorViewNV", + "class" : "Type-Declaration", + "opcode" : 5371, + "operands" : [ + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Dim'" }, + { "kind" : "IdRef", "name" : "'HasDimensions'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'p'" } + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpCreateTensorLayoutNV", + "class" : "Reserved", + "opcode" : 5372, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTensorLayoutSetDimensionNV", + "class" : "Reserved", + "opcode" : 5373, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorLayout'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Dim'" } + + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTensorLayoutSetStrideNV", + "class" : "Reserved", + "opcode" : 5374, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorLayout'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Stride'" } + + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTensorLayoutSliceNV", + "class" : "Reserved", + "opcode" : 5375, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorLayout'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Operands'" } + + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTensorLayoutSetClampValueNV", + "class" : "Reserved", + "opcode" : 5376, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorLayout'" }, + { "kind" : "IdRef", "name" : "'Value'" } + + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpCreateTensorViewNV", + "class" : "Reserved", + "opcode" : 5377, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" } + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTensorViewSetDimensionNV", + "class" : "Reserved", + "opcode" : 5378, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorView'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Dim'" } + + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTensorViewSetStrideNV", + "class" : "Reserved", + "opcode" : 5379, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorView'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'Stride'" } + + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, { "opname" : "OpDemoteToHelperInvocation", "class" : "Control-Flow", @@ -6285,6 +6486,48 @@ "extensions" : [ "SPV_EXT_demote_to_helper_invocation" ], "version" : "None" }, + { + "opname" : "OpTensorViewSetClipNV", + "class" : "Reserved", + "opcode" : 5382, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorView'" }, + { "kind" : "IdRef", "name" : "'ClipRowOffset'" }, + { "kind" : "IdRef", "name" : "'ClipRowSpan'" }, + { "kind" : "IdRef", "name" : "'ClipColOffset'" }, + { "kind" : "IdRef", "name" : "'ClipColSpan'" } + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpTensorLayoutSetBlockSizeNV", + "class" : "Reserved", + "opcode" : 5384, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'TensorLayout'" }, + { "kind" : "IdRef", "quantifier" : "*", "name" : "'BlockSize'" } + + ], + "capabilities" : [ "TensorAddressingNV" ], + "version" : "None" + }, + { + "opname" : "OpCooperativeMatrixTransposeNV", + "class" : "Conversion", + "opcode" : 5390, + "operands" : [ + { "kind" : "IdResultType" }, + { "kind" : "IdResult" }, + { "kind" : "IdRef", "name" : "'Matrix'" } + ], + "capabilities" : [ "CooperativeMatrixConversionsNV" ], + "version" : "None" + }, { "opname" : "OpConvertUToImageNV", "class" : "Reserved", @@ -15847,6 +16090,42 @@ "extensions" : [ "SPV_NV_raw_access_chains" ], "version" : "None" }, + { + "enumerant" : "CooperativeMatrixReductionsNV", + "value" : 5430, + "extensions" : [ "SPV_NV_cooperative_matrix2" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixConversionsNV", + "value" : 5431, + "extensions" : [ "SPV_NV_cooperative_matrix2" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixPerElementOperationsNV", + "value" : 5432, + "extensions" : [ "SPV_NV_cooperative_matrix2" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixTensorAddressingNV", + "value" : 5433, + "extensions" : [ "SPV_NV_cooperative_matrix2" ], + "version" : "None" + }, + { + "enumerant" : "CooperativeMatrixBlockLoadsNV", + "value" : 5434, + "extensions" : [ "SPV_NV_cooperative_matrix2" ], + "version" : "None" + }, + { + "enumerant" : "TensorAddressingNV", + "value" : 5439, + "extensions" : [ "SPV_NV_tensor_addressing" ], + "version" : "None" + }, { "enumerant" : "SubgroupShuffleINTEL", "value" : 5568, @@ -16455,6 +16734,87 @@ } ] }, + { + "category" : "BitEnum", + "kind" : "CooperativeMatrixReduce", + "enumerants" : [ + { + "enumerant" : "Row", + "value" : "0x0001", + "version" : "None" + }, + { + "enumerant" : "Column", + "value" : "0x0002", + "version" : "None" + }, + { + "enumerant" : "2x2", + "value" : "0x0004", + "version" : "None" + } + ] + }, + { + "category" : "ValueEnum", + "kind" : "TensorClampMode", + "enumerants" : [ + { + "enumerant" : "Undefined", + "value" : 0, + "version": "None" + }, + { + "enumerant" : "Constant", + "value" : 1, + "version": "None" + }, + { + "enumerant" : "ClampToEdge", + "value" : 2, + "version": "None" + }, + { + "enumerant" : "Repeat", + "value" : 3, + "version": "None" + }, + { + "enumerant" : "RepeatMirrored", + "value" : 4, + "version": "None" + } + ] + }, + { + "category" : "BitEnum", + "kind" : "TensorAddressingOperands", + "enumerants" : [ + { + "enumerant" : "None", + "value" : "0x0000", + "version" : "None" + }, + { + "enumerant" : "TensorView", + "value" : "0x0001", + "parameters" : [ + { "kind" : "IdRef" } + ], + "capabilities" : [ "CooperativeMatrixTensorAddressingNV" ], + "version" : "None" + }, + { + "enumerant" : "DecodeFunc", + "value" : "0x0002", + "parameters" : [ + { "kind" : "IdRef" } + ], + "capabilities" : [ "CooperativeMatrixBlockLoadsNV" ], + "version" : "None" + } + ] + }, { "category" : "ValueEnum", "kind" : "InitializationModeQualifier", diff --git a/include/spirv/unified1/spirv.cs b/include/spirv/unified1/spirv.cs index 0952ce6f6..3d900a5a4 100644 --- a/include/spirv/unified1/spirv.cs +++ b/include/spirv/unified1/spirv.cs @@ -1203,6 +1203,12 @@ public enum Capability AtomicFloat16VectorNV = 5404, RayTracingDisplacementMicromapNV = 5409, RawAccessChainsNV = 5414, + CooperativeMatrixReductionsNV = 5430, + CooperativeMatrixConversionsNV = 5431, + CooperativeMatrixPerElementOperationsNV = 5432, + CooperativeMatrixTensorAddressingNV = 5433, + CooperativeMatrixBlockLoadsNV = 5434, + TensorAddressingNV = 5439, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1436,6 +1442,46 @@ public enum CooperativeMatrixUse Max = 0x7fffffff, } + public enum CooperativeMatrixReduceShift + { + Row = 0, + Column = 1, + CooperativeMatrixReduce2x2 = 2, + Max = 0x7fffffff, + } + + public enum CooperativeMatrixReduceMask + { + MaskNone = 0, + Row = 0x00000001, + Column = 0x00000002, + CooperativeMatrixReduce2x2 = 0x00000004, + } + + public enum TensorClampMode + { + Undefined = 0, + Constant = 1, + ClampToEdge = 2, + Repeat = 3, + RepeatMirrored = 4, + Max = 0x7fffffff, + } + + public enum TensorAddressingOperandsShift + { + TensorView = 0, + DecodeFunc = 1, + Max = 0x7fffffff, + } + + public enum TensorAddressingOperandsMask + { + MaskNone = 0, + TensorView = 0x00000001, + DecodeFunc = 0x00000002, + } + public enum InitializationModeQualifier { InitOnDeviceReprogramINTEL = 0, @@ -1957,6 +2003,7 @@ public enum Op OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, @@ -1981,9 +2028,26 @@ public enum Op OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, diff --git a/include/spirv/unified1/spirv.h b/include/spirv/unified1/spirv.h index 715741a26..f588d6625 100644 --- a/include/spirv/unified1/spirv.h +++ b/include/spirv/unified1/spirv.h @@ -1174,6 +1174,12 @@ typedef enum SpvCapability_ { SpvCapabilityAtomicFloat16VectorNV = 5404, SpvCapabilityRayTracingDisplacementMicromapNV = 5409, SpvCapabilityRawAccessChainsNV = 5414, + SpvCapabilityCooperativeMatrixReductionsNV = 5430, + SpvCapabilityCooperativeMatrixConversionsNV = 5431, + SpvCapabilityCooperativeMatrixPerElementOperationsNV = 5432, + SpvCapabilityCooperativeMatrixTensorAddressingNV = 5433, + SpvCapabilityCooperativeMatrixBlockLoadsNV = 5434, + SpvCapabilityTensorAddressingNV = 5439, SpvCapabilitySubgroupShuffleINTEL = 5568, SpvCapabilitySubgroupBufferBlockIOINTEL = 5569, SpvCapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1391,6 +1397,41 @@ typedef enum SpvCooperativeMatrixUse_ { SpvCooperativeMatrixUseMax = 0x7fffffff, } SpvCooperativeMatrixUse; +typedef enum SpvCooperativeMatrixReduceShift_ { + SpvCooperativeMatrixReduceRowShift = 0, + SpvCooperativeMatrixReduceColumnShift = 1, + SpvCooperativeMatrixReduce2x2Shift = 2, + SpvCooperativeMatrixReduceMax = 0x7fffffff, +} SpvCooperativeMatrixReduceShift; + +typedef enum SpvCooperativeMatrixReduceMask_ { + SpvCooperativeMatrixReduceMaskNone = 0, + SpvCooperativeMatrixReduceRowMask = 0x00000001, + SpvCooperativeMatrixReduceColumnMask = 0x00000002, + SpvCooperativeMatrixReduce2x2Mask = 0x00000004, +} SpvCooperativeMatrixReduceMask; + +typedef enum SpvTensorClampMode_ { + SpvTensorClampModeUndefined = 0, + SpvTensorClampModeConstant = 1, + SpvTensorClampModeClampToEdge = 2, + SpvTensorClampModeRepeat = 3, + SpvTensorClampModeRepeatMirrored = 4, + SpvTensorClampModeMax = 0x7fffffff, +} SpvTensorClampMode; + +typedef enum SpvTensorAddressingOperandsShift_ { + SpvTensorAddressingOperandsTensorViewShift = 0, + SpvTensorAddressingOperandsDecodeFuncShift = 1, + SpvTensorAddressingOperandsMax = 0x7fffffff, +} SpvTensorAddressingOperandsShift; + +typedef enum SpvTensorAddressingOperandsMask_ { + SpvTensorAddressingOperandsMaskNone = 0, + SpvTensorAddressingOperandsTensorViewMask = 0x00000001, + SpvTensorAddressingOperandsDecodeFuncMask = 0x00000002, +} SpvTensorAddressingOperandsMask; + typedef enum SpvInitializationModeQualifier_ { SpvInitializationModeQualifierInitOnDeviceReprogramINTEL = 0, SpvInitializationModeQualifierInitOnDeviceResetINTEL = 1, @@ -1903,6 +1944,7 @@ typedef enum SpvOp_ { SpvOpReorderThreadWithHintNV = 5280, SpvOpTypeHitObjectNV = 5281, SpvOpImageSampleFootprintNV = 5283, + SpvOpCooperativeMatrixConvertNV = 5293, SpvOpEmitMeshTasksEXT = 5294, SpvOpSetMeshOutputsEXT = 5295, SpvOpGroupNonUniformPartitionNV = 5296, @@ -1927,9 +1969,26 @@ typedef enum SpvOp_ { SpvOpCooperativeMatrixLengthNV = 5362, SpvOpBeginInvocationInterlockEXT = 5364, SpvOpEndInvocationInterlockEXT = 5365, + SpvOpCooperativeMatrixReduceNV = 5366, + SpvOpCooperativeMatrixLoadTensorNV = 5367, + SpvOpCooperativeMatrixStoreTensorNV = 5368, + SpvOpCooperativeMatrixPerElementOpNV = 5369, + SpvOpTypeTensorLayoutNV = 5370, + SpvOpTypeTensorViewNV = 5371, + SpvOpCreateTensorLayoutNV = 5372, + SpvOpTensorLayoutSetDimensionNV = 5373, + SpvOpTensorLayoutSetStrideNV = 5374, + SpvOpTensorLayoutSliceNV = 5375, + SpvOpTensorLayoutSetClampValueNV = 5376, + SpvOpCreateTensorViewNV = 5377, + SpvOpTensorViewSetDimensionNV = 5378, + SpvOpTensorViewSetStrideNV = 5379, SpvOpDemoteToHelperInvocation = 5380, SpvOpDemoteToHelperInvocationEXT = 5380, SpvOpIsHelperInvocationEXT = 5381, + SpvOpTensorViewSetClipNV = 5382, + SpvOpTensorLayoutSetBlockSizeNV = 5384, + SpvOpCooperativeMatrixTransposeNV = 5390, SpvOpConvertUToImageNV = 5391, SpvOpConvertUToSamplerNV = 5392, SpvOpConvertImageToUNV = 5393, @@ -2660,6 +2719,7 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; case SpvOpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case SpvOpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixConvertNV: *hasResult = true; *hasResultType = true; break; case SpvOpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case SpvOpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case SpvOpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; @@ -2682,8 +2742,25 @@ inline void SpvHasResultAndType(SpvOp opcode, bool *hasResult, bool *hasResultTy case SpvOpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; case SpvOpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case SpvOpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; + case SpvOpCooperativeMatrixReduceNV: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixLoadTensorNV: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixStoreTensorNV: *hasResult = false; *hasResultType = false; break; + case SpvOpCooperativeMatrixPerElementOpNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTypeTensorLayoutNV: *hasResult = true; *hasResultType = false; break; + case SpvOpTypeTensorViewNV: *hasResult = true; *hasResultType = false; break; + case SpvOpCreateTensorLayoutNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorLayoutSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorLayoutSetStrideNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorLayoutSliceNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorLayoutSetClampValueNV: *hasResult = true; *hasResultType = true; break; + case SpvOpCreateTensorViewNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorViewSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorViewSetStrideNV: *hasResult = true; *hasResultType = true; break; case SpvOpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; case SpvOpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorViewSetClipNV: *hasResult = true; *hasResultType = true; break; + case SpvOpTensorLayoutSetBlockSizeNV: *hasResult = true; *hasResultType = true; break; + case SpvOpCooperativeMatrixTransposeNV: *hasResult = true; *hasResultType = true; break; case SpvOpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; case SpvOpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; case SpvOpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; @@ -3794,6 +3871,12 @@ inline const char* SpvCapabilityToString(SpvCapability value) { case SpvCapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; case SpvCapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; case SpvCapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case SpvCapabilityCooperativeMatrixReductionsNV: return "CooperativeMatrixReductionsNV"; + case SpvCapabilityCooperativeMatrixConversionsNV: return "CooperativeMatrixConversionsNV"; + case SpvCapabilityCooperativeMatrixPerElementOperationsNV: return "CooperativeMatrixPerElementOperationsNV"; + case SpvCapabilityCooperativeMatrixTensorAddressingNV: return "CooperativeMatrixTensorAddressingNV"; + case SpvCapabilityCooperativeMatrixBlockLoadsNV: return "CooperativeMatrixBlockLoadsNV"; + case SpvCapabilityTensorAddressingNV: return "TensorAddressingNV"; case SpvCapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; case SpvCapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; case SpvCapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; @@ -3962,6 +4045,17 @@ inline const char* SpvCooperativeMatrixUseToString(SpvCooperativeMatrixUse value } } +inline const char* SpvTensorClampModeToString(SpvTensorClampMode value) { + switch (value) { + case SpvTensorClampModeUndefined: return "Undefined"; + case SpvTensorClampModeConstant: return "Constant"; + case SpvTensorClampModeClampToEdge: return "ClampToEdge"; + case SpvTensorClampModeRepeat: return "Repeat"; + case SpvTensorClampModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + inline const char* SpvInitializationModeQualifierToString(SpvInitializationModeQualifier value) { switch (value) { case SpvInitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; @@ -4469,6 +4563,7 @@ inline const char* SpvOpToString(SpvOp value) { case SpvOpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; case SpvOpTypeHitObjectNV: return "OpTypeHitObjectNV"; case SpvOpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case SpvOpCooperativeMatrixConvertNV: return "OpCooperativeMatrixConvertNV"; case SpvOpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; case SpvOpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; case SpvOpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; @@ -4491,8 +4586,25 @@ inline const char* SpvOpToString(SpvOp value) { case SpvOpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; case SpvOpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case SpvOpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case SpvOpCooperativeMatrixReduceNV: return "OpCooperativeMatrixReduceNV"; + case SpvOpCooperativeMatrixLoadTensorNV: return "OpCooperativeMatrixLoadTensorNV"; + case SpvOpCooperativeMatrixStoreTensorNV: return "OpCooperativeMatrixStoreTensorNV"; + case SpvOpCooperativeMatrixPerElementOpNV: return "OpCooperativeMatrixPerElementOpNV"; + case SpvOpTypeTensorLayoutNV: return "OpTypeTensorLayoutNV"; + case SpvOpTypeTensorViewNV: return "OpTypeTensorViewNV"; + case SpvOpCreateTensorLayoutNV: return "OpCreateTensorLayoutNV"; + case SpvOpTensorLayoutSetDimensionNV: return "OpTensorLayoutSetDimensionNV"; + case SpvOpTensorLayoutSetStrideNV: return "OpTensorLayoutSetStrideNV"; + case SpvOpTensorLayoutSliceNV: return "OpTensorLayoutSliceNV"; + case SpvOpTensorLayoutSetClampValueNV: return "OpTensorLayoutSetClampValueNV"; + case SpvOpCreateTensorViewNV: return "OpCreateTensorViewNV"; + case SpvOpTensorViewSetDimensionNV: return "OpTensorViewSetDimensionNV"; + case SpvOpTensorViewSetStrideNV: return "OpTensorViewSetStrideNV"; case SpvOpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; case SpvOpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case SpvOpTensorViewSetClipNV: return "OpTensorViewSetClipNV"; + case SpvOpTensorLayoutSetBlockSizeNV: return "OpTensorLayoutSetBlockSizeNV"; + case SpvOpCooperativeMatrixTransposeNV: return "OpCooperativeMatrixTransposeNV"; case SpvOpConvertUToImageNV: return "OpConvertUToImageNV"; case SpvOpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; case SpvOpConvertImageToUNV: return "OpConvertImageToUNV"; diff --git a/include/spirv/unified1/spirv.hpp b/include/spirv/unified1/spirv.hpp index 7a74d665e..76e07a6b5 100644 --- a/include/spirv/unified1/spirv.hpp +++ b/include/spirv/unified1/spirv.hpp @@ -1170,6 +1170,12 @@ enum Capability { CapabilityAtomicFloat16VectorNV = 5404, CapabilityRayTracingDisplacementMicromapNV = 5409, CapabilityRawAccessChainsNV = 5414, + CapabilityCooperativeMatrixReductionsNV = 5430, + CapabilityCooperativeMatrixConversionsNV = 5431, + CapabilityCooperativeMatrixPerElementOperationsNV = 5432, + CapabilityCooperativeMatrixTensorAddressingNV = 5433, + CapabilityCooperativeMatrixBlockLoadsNV = 5434, + CapabilityTensorAddressingNV = 5439, CapabilitySubgroupShuffleINTEL = 5568, CapabilitySubgroupBufferBlockIOINTEL = 5569, CapabilitySubgroupImageBlockIOINTEL = 5570, @@ -1387,6 +1393,41 @@ enum CooperativeMatrixUse { CooperativeMatrixUseMax = 0x7fffffff, }; +enum CooperativeMatrixReduceShift { + CooperativeMatrixReduceRowShift = 0, + CooperativeMatrixReduceColumnShift = 1, + CooperativeMatrixReduce2x2Shift = 2, + CooperativeMatrixReduceMax = 0x7fffffff, +}; + +enum CooperativeMatrixReduceMask { + CooperativeMatrixReduceMaskNone = 0, + CooperativeMatrixReduceRowMask = 0x00000001, + CooperativeMatrixReduceColumnMask = 0x00000002, + CooperativeMatrixReduce2x2Mask = 0x00000004, +}; + +enum TensorClampMode { + TensorClampModeUndefined = 0, + TensorClampModeConstant = 1, + TensorClampModeClampToEdge = 2, + TensorClampModeRepeat = 3, + TensorClampModeRepeatMirrored = 4, + TensorClampModeMax = 0x7fffffff, +}; + +enum TensorAddressingOperandsShift { + TensorAddressingOperandsTensorViewShift = 0, + TensorAddressingOperandsDecodeFuncShift = 1, + TensorAddressingOperandsMax = 0x7fffffff, +}; + +enum TensorAddressingOperandsMask { + TensorAddressingOperandsMaskNone = 0, + TensorAddressingOperandsTensorViewMask = 0x00000001, + TensorAddressingOperandsDecodeFuncMask = 0x00000002, +}; + enum InitializationModeQualifier { InitializationModeQualifierInitOnDeviceReprogramINTEL = 0, InitializationModeQualifierInitOnDeviceResetINTEL = 1, @@ -1899,6 +1940,7 @@ enum Op { OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, @@ -1923,9 +1965,26 @@ enum Op { OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, @@ -2656,6 +2715,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; case OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixConvertNV: *hasResult = true; *hasResultType = true; break; case OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; @@ -2678,8 +2738,25 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; case OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixReduceNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixLoadTensorNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixStoreTensorNV: *hasResult = false; *hasResultType = false; break; + case OpCooperativeMatrixPerElementOpNV: *hasResult = true; *hasResultType = true; break; + case OpTypeTensorLayoutNV: *hasResult = true; *hasResultType = false; break; + case OpTypeTensorViewNV: *hasResult = true; *hasResultType = false; break; + case OpCreateTensorLayoutNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetStrideNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSliceNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetClampValueNV: *hasResult = true; *hasResultType = true; break; + case OpCreateTensorViewNV: *hasResult = true; *hasResultType = true; break; + case OpTensorViewSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case OpTensorViewSetStrideNV: *hasResult = true; *hasResultType = true; break; case OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; case OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; + case OpTensorViewSetClipNV: *hasResult = true; *hasResultType = true; break; + case OpTensorLayoutSetBlockSizeNV: *hasResult = true; *hasResultType = true; break; + case OpCooperativeMatrixTransposeNV: *hasResult = true; *hasResultType = true; break; case OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; case OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; case OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; @@ -3790,6 +3867,12 @@ inline const char* CapabilityToString(Capability value) { case CapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; case CapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; case CapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case CapabilityCooperativeMatrixReductionsNV: return "CooperativeMatrixReductionsNV"; + case CapabilityCooperativeMatrixConversionsNV: return "CooperativeMatrixConversionsNV"; + case CapabilityCooperativeMatrixPerElementOperationsNV: return "CooperativeMatrixPerElementOperationsNV"; + case CapabilityCooperativeMatrixTensorAddressingNV: return "CooperativeMatrixTensorAddressingNV"; + case CapabilityCooperativeMatrixBlockLoadsNV: return "CooperativeMatrixBlockLoadsNV"; + case CapabilityTensorAddressingNV: return "TensorAddressingNV"; case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; @@ -3958,6 +4041,17 @@ inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { } } +inline const char* TensorClampModeToString(TensorClampMode value) { + switch (value) { + case TensorClampModeUndefined: return "Undefined"; + case TensorClampModeConstant: return "Constant"; + case TensorClampModeClampToEdge: return "ClampToEdge"; + case TensorClampModeRepeat: return "Repeat"; + case TensorClampModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { switch (value) { case InitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; @@ -4465,6 +4559,7 @@ inline const char* OpToString(Op value) { case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case OpCooperativeMatrixConvertNV: return "OpCooperativeMatrixConvertNV"; case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; @@ -4487,8 +4582,25 @@ inline const char* OpToString(Op value) { case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpCooperativeMatrixReduceNV: return "OpCooperativeMatrixReduceNV"; + case OpCooperativeMatrixLoadTensorNV: return "OpCooperativeMatrixLoadTensorNV"; + case OpCooperativeMatrixStoreTensorNV: return "OpCooperativeMatrixStoreTensorNV"; + case OpCooperativeMatrixPerElementOpNV: return "OpCooperativeMatrixPerElementOpNV"; + case OpTypeTensorLayoutNV: return "OpTypeTensorLayoutNV"; + case OpTypeTensorViewNV: return "OpTypeTensorViewNV"; + case OpCreateTensorLayoutNV: return "OpCreateTensorLayoutNV"; + case OpTensorLayoutSetDimensionNV: return "OpTensorLayoutSetDimensionNV"; + case OpTensorLayoutSetStrideNV: return "OpTensorLayoutSetStrideNV"; + case OpTensorLayoutSliceNV: return "OpTensorLayoutSliceNV"; + case OpTensorLayoutSetClampValueNV: return "OpTensorLayoutSetClampValueNV"; + case OpCreateTensorViewNV: return "OpCreateTensorViewNV"; + case OpTensorViewSetDimensionNV: return "OpTensorViewSetDimensionNV"; + case OpTensorViewSetStrideNV: return "OpTensorViewSetStrideNV"; case OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpTensorViewSetClipNV: return "OpTensorViewSetClipNV"; + case OpTensorLayoutSetBlockSizeNV: return "OpTensorLayoutSetBlockSizeNV"; + case OpCooperativeMatrixTransposeNV: return "OpCooperativeMatrixTransposeNV"; case OpConvertUToImageNV: return "OpConvertUToImageNV"; case OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; case OpConvertImageToUNV: return "OpConvertImageToUNV"; @@ -4805,6 +4917,14 @@ inline CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask a, inline CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } inline CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } inline CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } +inline CooperativeMatrixReduceMask operator|(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) | unsigned(b)); } +inline CooperativeMatrixReduceMask operator&(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) & unsigned(b)); } +inline CooperativeMatrixReduceMask operator^(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) ^ unsigned(b)); } +inline CooperativeMatrixReduceMask operator~(CooperativeMatrixReduceMask a) { return CooperativeMatrixReduceMask(~unsigned(a)); } +inline TensorAddressingOperandsMask operator|(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) | unsigned(b)); } +inline TensorAddressingOperandsMask operator&(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) & unsigned(b)); } +inline TensorAddressingOperandsMask operator^(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) ^ unsigned(b)); } +inline TensorAddressingOperandsMask operator~(TensorAddressingOperandsMask a) { return TensorAddressingOperandsMask(~unsigned(a)); } inline RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } inline RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } inline RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } diff --git a/include/spirv/unified1/spirv.hpp11 b/include/spirv/unified1/spirv.hpp11 index a87711eba..94a4902ac 100644 --- a/include/spirv/unified1/spirv.hpp11 +++ b/include/spirv/unified1/spirv.hpp11 @@ -1170,6 +1170,12 @@ enum class Capability : unsigned { AtomicFloat16VectorNV = 5404, RayTracingDisplacementMicromapNV = 5409, RawAccessChainsNV = 5414, + CooperativeMatrixReductionsNV = 5430, + CooperativeMatrixConversionsNV = 5431, + CooperativeMatrixPerElementOperationsNV = 5432, + CooperativeMatrixTensorAddressingNV = 5433, + CooperativeMatrixBlockLoadsNV = 5434, + TensorAddressingNV = 5439, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1387,6 +1393,41 @@ enum class CooperativeMatrixUse : unsigned { Max = 0x7fffffff, }; +enum class CooperativeMatrixReduceShift : unsigned { + Row = 0, + Column = 1, + CooperativeMatrixReduce2x2 = 2, + Max = 0x7fffffff, +}; + +enum class CooperativeMatrixReduceMask : unsigned { + MaskNone = 0, + Row = 0x00000001, + Column = 0x00000002, + CooperativeMatrixReduce2x2 = 0x00000004, +}; + +enum class TensorClampMode : unsigned { + Undefined = 0, + Constant = 1, + ClampToEdge = 2, + Repeat = 3, + RepeatMirrored = 4, + Max = 0x7fffffff, +}; + +enum class TensorAddressingOperandsShift : unsigned { + TensorView = 0, + DecodeFunc = 1, + Max = 0x7fffffff, +}; + +enum class TensorAddressingOperandsMask : unsigned { + MaskNone = 0, + TensorView = 0x00000001, + DecodeFunc = 0x00000002, +}; + enum class InitializationModeQualifier : unsigned { InitOnDeviceReprogramINTEL = 0, InitOnDeviceResetINTEL = 1, @@ -1899,6 +1940,7 @@ enum class Op : unsigned { OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, @@ -1923,9 +1965,26 @@ enum class Op : unsigned { OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, @@ -2656,6 +2715,7 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpReorderThreadWithHintNV: *hasResult = false; *hasResultType = false; break; case Op::OpTypeHitObjectNV: *hasResult = true; *hasResultType = false; break; case Op::OpImageSampleFootprintNV: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixConvertNV: *hasResult = true; *hasResultType = true; break; case Op::OpEmitMeshTasksEXT: *hasResult = false; *hasResultType = false; break; case Op::OpSetMeshOutputsEXT: *hasResult = false; *hasResultType = false; break; case Op::OpGroupNonUniformPartitionNV: *hasResult = true; *hasResultType = true; break; @@ -2678,8 +2738,25 @@ inline void HasResultAndType(Op opcode, bool *hasResult, bool *hasResultType) { case Op::OpCooperativeMatrixLengthNV: *hasResult = true; *hasResultType = true; break; case Op::OpBeginInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; case Op::OpEndInvocationInterlockEXT: *hasResult = false; *hasResultType = false; break; + case Op::OpCooperativeMatrixReduceNV: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixLoadTensorNV: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixStoreTensorNV: *hasResult = false; *hasResultType = false; break; + case Op::OpCooperativeMatrixPerElementOpNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTypeTensorLayoutNV: *hasResult = true; *hasResultType = false; break; + case Op::OpTypeTensorViewNV: *hasResult = true; *hasResultType = false; break; + case Op::OpCreateTensorLayoutNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorLayoutSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorLayoutSetStrideNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorLayoutSliceNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorLayoutSetClampValueNV: *hasResult = true; *hasResultType = true; break; + case Op::OpCreateTensorViewNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorViewSetDimensionNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorViewSetStrideNV: *hasResult = true; *hasResultType = true; break; case Op::OpDemoteToHelperInvocation: *hasResult = false; *hasResultType = false; break; case Op::OpIsHelperInvocationEXT: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorViewSetClipNV: *hasResult = true; *hasResultType = true; break; + case Op::OpTensorLayoutSetBlockSizeNV: *hasResult = true; *hasResultType = true; break; + case Op::OpCooperativeMatrixTransposeNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertUToImageNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertUToSamplerNV: *hasResult = true; *hasResultType = true; break; case Op::OpConvertImageToUNV: *hasResult = true; *hasResultType = true; break; @@ -3790,6 +3867,12 @@ inline const char* CapabilityToString(Capability value) { case CapabilityAtomicFloat16VectorNV: return "AtomicFloat16VectorNV"; case CapabilityRayTracingDisplacementMicromapNV: return "RayTracingDisplacementMicromapNV"; case CapabilityRawAccessChainsNV: return "RawAccessChainsNV"; + case CapabilityCooperativeMatrixReductionsNV: return "CooperativeMatrixReductionsNV"; + case CapabilityCooperativeMatrixConversionsNV: return "CooperativeMatrixConversionsNV"; + case CapabilityCooperativeMatrixPerElementOperationsNV: return "CooperativeMatrixPerElementOperationsNV"; + case CapabilityCooperativeMatrixTensorAddressingNV: return "CooperativeMatrixTensorAddressingNV"; + case CapabilityCooperativeMatrixBlockLoadsNV: return "CooperativeMatrixBlockLoadsNV"; + case CapabilityTensorAddressingNV: return "TensorAddressingNV"; case CapabilitySubgroupShuffleINTEL: return "SubgroupShuffleINTEL"; case CapabilitySubgroupBufferBlockIOINTEL: return "SubgroupBufferBlockIOINTEL"; case CapabilitySubgroupImageBlockIOINTEL: return "SubgroupImageBlockIOINTEL"; @@ -3958,6 +4041,17 @@ inline const char* CooperativeMatrixUseToString(CooperativeMatrixUse value) { } } +inline const char* TensorClampModeToString(TensorClampMode value) { + switch (value) { + case TensorClampModeUndefined: return "Undefined"; + case TensorClampModeConstant: return "Constant"; + case TensorClampModeClampToEdge: return "ClampToEdge"; + case TensorClampModeRepeat: return "Repeat"; + case TensorClampModeRepeatMirrored: return "RepeatMirrored"; + default: return "Unknown"; + } +} + inline const char* InitializationModeQualifierToString(InitializationModeQualifier value) { switch (value) { case InitializationModeQualifierInitOnDeviceReprogramINTEL: return "InitOnDeviceReprogramINTEL"; @@ -4465,6 +4559,7 @@ inline const char* OpToString(Op value) { case OpReorderThreadWithHintNV: return "OpReorderThreadWithHintNV"; case OpTypeHitObjectNV: return "OpTypeHitObjectNV"; case OpImageSampleFootprintNV: return "OpImageSampleFootprintNV"; + case OpCooperativeMatrixConvertNV: return "OpCooperativeMatrixConvertNV"; case OpEmitMeshTasksEXT: return "OpEmitMeshTasksEXT"; case OpSetMeshOutputsEXT: return "OpSetMeshOutputsEXT"; case OpGroupNonUniformPartitionNV: return "OpGroupNonUniformPartitionNV"; @@ -4487,8 +4582,25 @@ inline const char* OpToString(Op value) { case OpCooperativeMatrixLengthNV: return "OpCooperativeMatrixLengthNV"; case OpBeginInvocationInterlockEXT: return "OpBeginInvocationInterlockEXT"; case OpEndInvocationInterlockEXT: return "OpEndInvocationInterlockEXT"; + case OpCooperativeMatrixReduceNV: return "OpCooperativeMatrixReduceNV"; + case OpCooperativeMatrixLoadTensorNV: return "OpCooperativeMatrixLoadTensorNV"; + case OpCooperativeMatrixStoreTensorNV: return "OpCooperativeMatrixStoreTensorNV"; + case OpCooperativeMatrixPerElementOpNV: return "OpCooperativeMatrixPerElementOpNV"; + case OpTypeTensorLayoutNV: return "OpTypeTensorLayoutNV"; + case OpTypeTensorViewNV: return "OpTypeTensorViewNV"; + case OpCreateTensorLayoutNV: return "OpCreateTensorLayoutNV"; + case OpTensorLayoutSetDimensionNV: return "OpTensorLayoutSetDimensionNV"; + case OpTensorLayoutSetStrideNV: return "OpTensorLayoutSetStrideNV"; + case OpTensorLayoutSliceNV: return "OpTensorLayoutSliceNV"; + case OpTensorLayoutSetClampValueNV: return "OpTensorLayoutSetClampValueNV"; + case OpCreateTensorViewNV: return "OpCreateTensorViewNV"; + case OpTensorViewSetDimensionNV: return "OpTensorViewSetDimensionNV"; + case OpTensorViewSetStrideNV: return "OpTensorViewSetStrideNV"; case OpDemoteToHelperInvocation: return "OpDemoteToHelperInvocation"; case OpIsHelperInvocationEXT: return "OpIsHelperInvocationEXT"; + case OpTensorViewSetClipNV: return "OpTensorViewSetClipNV"; + case OpTensorLayoutSetBlockSizeNV: return "OpTensorLayoutSetBlockSizeNV"; + case OpCooperativeMatrixTransposeNV: return "OpCooperativeMatrixTransposeNV"; case OpConvertUToImageNV: return "OpConvertUToImageNV"; case OpConvertUToSamplerNV: return "OpConvertUToSamplerNV"; case OpConvertImageToUNV: return "OpConvertImageToUNV"; @@ -4805,6 +4917,14 @@ constexpr CooperativeMatrixOperandsMask operator|(CooperativeMatrixOperandsMask constexpr CooperativeMatrixOperandsMask operator&(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) & unsigned(b)); } constexpr CooperativeMatrixOperandsMask operator^(CooperativeMatrixOperandsMask a, CooperativeMatrixOperandsMask b) { return CooperativeMatrixOperandsMask(unsigned(a) ^ unsigned(b)); } constexpr CooperativeMatrixOperandsMask operator~(CooperativeMatrixOperandsMask a) { return CooperativeMatrixOperandsMask(~unsigned(a)); } +constexpr CooperativeMatrixReduceMask operator|(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) | unsigned(b)); } +constexpr CooperativeMatrixReduceMask operator&(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) & unsigned(b)); } +constexpr CooperativeMatrixReduceMask operator^(CooperativeMatrixReduceMask a, CooperativeMatrixReduceMask b) { return CooperativeMatrixReduceMask(unsigned(a) ^ unsigned(b)); } +constexpr CooperativeMatrixReduceMask operator~(CooperativeMatrixReduceMask a) { return CooperativeMatrixReduceMask(~unsigned(a)); } +constexpr TensorAddressingOperandsMask operator|(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) | unsigned(b)); } +constexpr TensorAddressingOperandsMask operator&(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) & unsigned(b)); } +constexpr TensorAddressingOperandsMask operator^(TensorAddressingOperandsMask a, TensorAddressingOperandsMask b) { return TensorAddressingOperandsMask(unsigned(a) ^ unsigned(b)); } +constexpr TensorAddressingOperandsMask operator~(TensorAddressingOperandsMask a) { return TensorAddressingOperandsMask(~unsigned(a)); } constexpr RawAccessChainOperandsMask operator|(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) | unsigned(b)); } constexpr RawAccessChainOperandsMask operator&(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) & unsigned(b)); } constexpr RawAccessChainOperandsMask operator^(RawAccessChainOperandsMask a, RawAccessChainOperandsMask b) { return RawAccessChainOperandsMask(unsigned(a) ^ unsigned(b)); } diff --git a/include/spirv/unified1/spirv.json b/include/spirv/unified1/spirv.json index 221777330..ededc78bb 100644 --- a/include/spirv/unified1/spirv.json +++ b/include/spirv/unified1/spirv.json @@ -1146,6 +1146,12 @@ "AtomicFloat16VectorNV": 5404, "RayTracingDisplacementMicromapNV": 5409, "RawAccessChainsNV": 5414, + "CooperativeMatrixReductionsNV": 5430, + "CooperativeMatrixConversionsNV": 5431, + "CooperativeMatrixPerElementOperationsNV": 5432, + "CooperativeMatrixTensorAddressingNV": 5433, + "CooperativeMatrixBlockLoadsNV": 5434, + "TensorAddressingNV": 5439, "SubgroupShuffleINTEL": 5568, "SubgroupBufferBlockIOINTEL": 5569, "SubgroupImageBlockIOINTEL": 5570, @@ -1369,6 +1375,37 @@ "MatrixAccumulatorKHR": 2 } }, + { + "Name": "CooperativeMatrixReduce", + "Type": "Bit", + "Values": + { + "Row": 0, + "Column": 1, + "CooperativeMatrixReduce2x2": 2 + } + }, + { + "Name": "TensorClampMode", + "Type": "Value", + "Values": + { + "Undefined": 0, + "Constant": 1, + "ClampToEdge": 2, + "Repeat": 3, + "RepeatMirrored": 4 + } + }, + { + "Name": "TensorAddressingOperands", + "Type": "Bit", + "Values": + { + "TensorView": 0, + "DecodeFunc": 1 + } + }, { "Name": "InitializationModeQualifier", "Type": "Value", @@ -1900,6 +1937,7 @@ "OpReorderThreadWithHintNV": 5280, "OpTypeHitObjectNV": 5281, "OpImageSampleFootprintNV": 5283, + "OpCooperativeMatrixConvertNV": 5293, "OpEmitMeshTasksEXT": 5294, "OpSetMeshOutputsEXT": 5295, "OpGroupNonUniformPartitionNV": 5296, @@ -1924,9 +1962,26 @@ "OpCooperativeMatrixLengthNV": 5362, "OpBeginInvocationInterlockEXT": 5364, "OpEndInvocationInterlockEXT": 5365, + "OpCooperativeMatrixReduceNV": 5366, + "OpCooperativeMatrixLoadTensorNV": 5367, + "OpCooperativeMatrixStoreTensorNV": 5368, + "OpCooperativeMatrixPerElementOpNV": 5369, + "OpTypeTensorLayoutNV": 5370, + "OpTypeTensorViewNV": 5371, + "OpCreateTensorLayoutNV": 5372, + "OpTensorLayoutSetDimensionNV": 5373, + "OpTensorLayoutSetStrideNV": 5374, + "OpTensorLayoutSliceNV": 5375, + "OpTensorLayoutSetClampValueNV": 5376, + "OpCreateTensorViewNV": 5377, + "OpTensorViewSetDimensionNV": 5378, + "OpTensorViewSetStrideNV": 5379, "OpDemoteToHelperInvocation": 5380, "OpDemoteToHelperInvocationEXT": 5380, "OpIsHelperInvocationEXT": 5381, + "OpTensorViewSetClipNV": 5382, + "OpTensorLayoutSetBlockSizeNV": 5384, + "OpCooperativeMatrixTransposeNV": 5390, "OpConvertUToImageNV": 5391, "OpConvertUToSamplerNV": 5392, "OpConvertImageToUNV": 5393, diff --git a/include/spirv/unified1/spirv.lua b/include/spirv/unified1/spirv.lua index 1dea2cab8..ba4c4ac82 100644 --- a/include/spirv/unified1/spirv.lua +++ b/include/spirv/unified1/spirv.lua @@ -1161,6 +1161,12 @@ spv = { AtomicFloat16VectorNV = 5404, RayTracingDisplacementMicromapNV = 5409, RawAccessChainsNV = 5414, + CooperativeMatrixReductionsNV = 5430, + CooperativeMatrixConversionsNV = 5431, + CooperativeMatrixPerElementOperationsNV = 5432, + CooperativeMatrixTensorAddressingNV = 5433, + CooperativeMatrixBlockLoadsNV = 5434, + TensorAddressingNV = 5439, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1378,6 +1384,41 @@ spv = { Max = 0x7fffffff, }, + CooperativeMatrixReduceShift = { + Row = 0, + Column = 1, + CooperativeMatrixReduce2x2 = 2, + Max = 0x7fffffff, + }, + + CooperativeMatrixReduceMask = { + MaskNone = 0, + Row = 0x00000001, + Column = 0x00000002, + CooperativeMatrixReduce2x2 = 0x00000004, + }, + + TensorClampMode = { + Undefined = 0, + Constant = 1, + ClampToEdge = 2, + Repeat = 3, + RepeatMirrored = 4, + Max = 0x7fffffff, + }, + + TensorAddressingOperandsShift = { + TensorView = 0, + DecodeFunc = 1, + Max = 0x7fffffff, + }, + + TensorAddressingOperandsMask = { + MaskNone = 0, + TensorView = 0x00000001, + DecodeFunc = 0x00000002, + }, + InitializationModeQualifier = { InitOnDeviceReprogramINTEL = 0, InitOnDeviceResetINTEL = 1, @@ -1890,6 +1931,7 @@ spv = { OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, @@ -1914,9 +1956,26 @@ spv = { OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, diff --git a/include/spirv/unified1/spirv.py b/include/spirv/unified1/spirv.py index ef394dbfb..aa32e6afe 100644 --- a/include/spirv/unified1/spirv.py +++ b/include/spirv/unified1/spirv.py @@ -1132,6 +1132,12 @@ 'AtomicFloat16VectorNV' : 5404, 'RayTracingDisplacementMicromapNV' : 5409, 'RawAccessChainsNV' : 5414, + 'CooperativeMatrixReductionsNV' : 5430, + 'CooperativeMatrixConversionsNV' : 5431, + 'CooperativeMatrixPerElementOperationsNV' : 5432, + 'CooperativeMatrixTensorAddressingNV' : 5433, + 'CooperativeMatrixBlockLoadsNV' : 5434, + 'TensorAddressingNV' : 5439, 'SubgroupShuffleINTEL' : 5568, 'SubgroupBufferBlockIOINTEL' : 5569, 'SubgroupImageBlockIOINTEL' : 5570, @@ -1335,6 +1341,38 @@ 'MatrixAccumulatorKHR' : 2, }, + 'CooperativeMatrixReduceShift' : { + 'Row' : 0, + 'Column' : 1, + 'CooperativeMatrixReduce2x2' : 2, + }, + + 'CooperativeMatrixReduceMask' : { + 'MaskNone' : 0, + 'Row' : 0x00000001, + 'Column' : 0x00000002, + 'CooperativeMatrixReduce2x2' : 0x00000004, + }, + + 'TensorClampMode' : { + 'Undefined' : 0, + 'Constant' : 1, + 'ClampToEdge' : 2, + 'Repeat' : 3, + 'RepeatMirrored' : 4, + }, + + 'TensorAddressingOperandsShift' : { + 'TensorView' : 0, + 'DecodeFunc' : 1, + }, + + 'TensorAddressingOperandsMask' : { + 'MaskNone' : 0, + 'TensorView' : 0x00000001, + 'DecodeFunc' : 0x00000002, + }, + 'InitializationModeQualifier' : { 'InitOnDeviceReprogramINTEL' : 0, 'InitOnDeviceResetINTEL' : 1, @@ -1840,6 +1878,7 @@ 'OpReorderThreadWithHintNV' : 5280, 'OpTypeHitObjectNV' : 5281, 'OpImageSampleFootprintNV' : 5283, + 'OpCooperativeMatrixConvertNV' : 5293, 'OpEmitMeshTasksEXT' : 5294, 'OpSetMeshOutputsEXT' : 5295, 'OpGroupNonUniformPartitionNV' : 5296, @@ -1864,9 +1903,26 @@ 'OpCooperativeMatrixLengthNV' : 5362, 'OpBeginInvocationInterlockEXT' : 5364, 'OpEndInvocationInterlockEXT' : 5365, + 'OpCooperativeMatrixReduceNV' : 5366, + 'OpCooperativeMatrixLoadTensorNV' : 5367, + 'OpCooperativeMatrixStoreTensorNV' : 5368, + 'OpCooperativeMatrixPerElementOpNV' : 5369, + 'OpTypeTensorLayoutNV' : 5370, + 'OpTypeTensorViewNV' : 5371, + 'OpCreateTensorLayoutNV' : 5372, + 'OpTensorLayoutSetDimensionNV' : 5373, + 'OpTensorLayoutSetStrideNV' : 5374, + 'OpTensorLayoutSliceNV' : 5375, + 'OpTensorLayoutSetClampValueNV' : 5376, + 'OpCreateTensorViewNV' : 5377, + 'OpTensorViewSetDimensionNV' : 5378, + 'OpTensorViewSetStrideNV' : 5379, 'OpDemoteToHelperInvocation' : 5380, 'OpDemoteToHelperInvocationEXT' : 5380, 'OpIsHelperInvocationEXT' : 5381, + 'OpTensorViewSetClipNV' : 5382, + 'OpTensorLayoutSetBlockSizeNV' : 5384, + 'OpCooperativeMatrixTransposeNV' : 5390, 'OpConvertUToImageNV' : 5391, 'OpConvertUToSamplerNV' : 5392, 'OpConvertImageToUNV' : 5393, diff --git a/include/spirv/unified1/spv.d b/include/spirv/unified1/spv.d index e91ecca50..fa801f9df 100644 --- a/include/spirv/unified1/spv.d +++ b/include/spirv/unified1/spv.d @@ -1206,6 +1206,12 @@ enum Capability : uint AtomicFloat16VectorNV = 5404, RayTracingDisplacementMicromapNV = 5409, RawAccessChainsNV = 5414, + CooperativeMatrixReductionsNV = 5430, + CooperativeMatrixConversionsNV = 5431, + CooperativeMatrixPerElementOperationsNV = 5432, + CooperativeMatrixTensorAddressingNV = 5433, + CooperativeMatrixBlockLoadsNV = 5434, + TensorAddressingNV = 5439, SubgroupShuffleINTEL = 5568, SubgroupBufferBlockIOINTEL = 5569, SubgroupImageBlockIOINTEL = 5570, @@ -1439,6 +1445,46 @@ enum CooperativeMatrixUse : uint Max = 0x7fffffff, } +enum CooperativeMatrixReduceShift : uint +{ + Row = 0, + Column = 1, + _2x2 = 2, + Max = 0x7fffffff, +} + +enum CooperativeMatrixReduceMask : uint +{ + MaskNone = 0, + Row = 0x00000001, + Column = 0x00000002, + _2x2 = 0x00000004, +} + +enum TensorClampMode : uint +{ + Undefined = 0, + Constant = 1, + ClampToEdge = 2, + Repeat = 3, + RepeatMirrored = 4, + Max = 0x7fffffff, +} + +enum TensorAddressingOperandsShift : uint +{ + TensorView = 0, + DecodeFunc = 1, + Max = 0x7fffffff, +} + +enum TensorAddressingOperandsMask : uint +{ + MaskNone = 0, + TensorView = 0x00000001, + DecodeFunc = 0x00000002, +} + enum InitializationModeQualifier : uint { InitOnDeviceReprogramINTEL = 0, @@ -1960,6 +2006,7 @@ enum Op : uint OpReorderThreadWithHintNV = 5280, OpTypeHitObjectNV = 5281, OpImageSampleFootprintNV = 5283, + OpCooperativeMatrixConvertNV = 5293, OpEmitMeshTasksEXT = 5294, OpSetMeshOutputsEXT = 5295, OpGroupNonUniformPartitionNV = 5296, @@ -1984,9 +2031,26 @@ enum Op : uint OpCooperativeMatrixLengthNV = 5362, OpBeginInvocationInterlockEXT = 5364, OpEndInvocationInterlockEXT = 5365, + OpCooperativeMatrixReduceNV = 5366, + OpCooperativeMatrixLoadTensorNV = 5367, + OpCooperativeMatrixStoreTensorNV = 5368, + OpCooperativeMatrixPerElementOpNV = 5369, + OpTypeTensorLayoutNV = 5370, + OpTypeTensorViewNV = 5371, + OpCreateTensorLayoutNV = 5372, + OpTensorLayoutSetDimensionNV = 5373, + OpTensorLayoutSetStrideNV = 5374, + OpTensorLayoutSliceNV = 5375, + OpTensorLayoutSetClampValueNV = 5376, + OpCreateTensorViewNV = 5377, + OpTensorViewSetDimensionNV = 5378, + OpTensorViewSetStrideNV = 5379, OpDemoteToHelperInvocation = 5380, OpDemoteToHelperInvocationEXT = 5380, OpIsHelperInvocationEXT = 5381, + OpTensorViewSetClipNV = 5382, + OpTensorLayoutSetBlockSizeNV = 5384, + OpCooperativeMatrixTransposeNV = 5390, OpConvertUToImageNV = 5391, OpConvertUToSamplerNV = 5392, OpConvertImageToUNV = 5393, diff --git a/tools/buildHeaders/jsonToSpirv.cpp b/tools/buildHeaders/jsonToSpirv.cpp index 46cf83e7d..44ca7c08d 100644 --- a/tools/buildHeaders/jsonToSpirv.cpp +++ b/tools/buildHeaders/jsonToSpirv.cpp @@ -268,6 +268,9 @@ EnumValues PackedVectorFormatParams; EnumValues CooperativeMatrixOperandsParams; EnumValues CooperativeMatrixLayoutParams; EnumValues CooperativeMatrixUseParams; +EnumValues CooperativeMatrixReduceParams; +EnumValues TensorClampModeParams; +EnumValues TensorAddressingOperandsParams; EnumValues InitializationModeQualifierParams; EnumValues HostAccessQualifierParams; EnumValues LoadCacheControlParams; @@ -425,10 +428,16 @@ ClassOptionality ToOperandClassAndOptionality(const std::string& operandKind, co type = OperandPackedVectorFormat; } else if (operandKind == "CooperativeMatrixOperands") { type = OperandCooperativeMatrixOperands; + } else if (operandKind == "TensorAddressingOperands") { + type = OperandTensorAddressingOperands; } else if (operandKind == "CooperativeMatrixLayout") { type = OperandCooperativeMatrixLayout; } else if (operandKind == "CooperativeMatrixUse") { type = OperandCooperativeMatrixUse; + } else if (operandKind == "CooperativeMatrixReduce") { + type = OperandCooperativeMatrixReduce; + } else if (operandKind == "TensorClampMode") { + type = OperandTensorClampMode; } else if (operandKind == "InitializationModeQualifier") { type = OperandInitializationModeQualifier; } else if (operandKind == "HostAccessQualifier") { @@ -809,10 +818,16 @@ void jsonToSpirv(const std::string& jsonPath, bool buildingHeaders) establishOperandClass(enumName, OperandPackedVectorFormat, &PackedVectorFormatParams, operandEnum, category); } else if (enumName == "CooperativeMatrixOperands") { establishOperandClass(enumName, OperandCooperativeMatrixOperands, &CooperativeMatrixOperandsParams, operandEnum, category); + } else if (enumName == "TensorAddressingOperands") { + establishOperandClass(enumName, OperandTensorAddressingOperands, &TensorAddressingOperandsParams, operandEnum, category); } else if (enumName == "CooperativeMatrixLayout") { establishOperandClass(enumName, OperandCooperativeMatrixLayout, &CooperativeMatrixLayoutParams, operandEnum, category); } else if (enumName == "CooperativeMatrixUse") { establishOperandClass(enumName, OperandCooperativeMatrixUse, &CooperativeMatrixUseParams, operandEnum, category); + } else if (enumName == "CooperativeMatrixReduce") { + establishOperandClass(enumName, OperandCooperativeMatrixReduce, &CooperativeMatrixReduceParams, operandEnum, category); + } else if (enumName == "TensorClampMode") { + establishOperandClass(enumName, OperandTensorClampMode, &TensorClampModeParams, operandEnum, category); } else if (enumName == "InitializationModeQualifier") { establishOperandClass(enumName, OperandInitializationModeQualifier, &InitializationModeQualifierParams, operandEnum, category); } else if (enumName == "HostAccessQualifier") { diff --git a/tools/buildHeaders/jsonToSpirv.h b/tools/buildHeaders/jsonToSpirv.h index 19376cad9..263abb05f 100644 --- a/tools/buildHeaders/jsonToSpirv.h +++ b/tools/buildHeaders/jsonToSpirv.h @@ -99,6 +99,9 @@ enum OperandClass { OperandCooperativeMatrixOperands, OperandCooperativeMatrixLayout, OperandCooperativeMatrixUse, + OperandCooperativeMatrixReduce, + OperandTensorClampMode, + OperandTensorAddressingOperands, OperandInitializationModeQualifier, OperandHostAccessQualifier, OperandLoadCacheControl,