From 2580bb02f7a079ab1c0106b5960a21ed1627bca0 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Thu, 15 May 2025 03:47:43 +0000 Subject: Add new coopmat2 functions: Reduce and Transpose (#7027) This commit adds three new functions for CoopMat as described in the proposal document, Cooperative matrix 2 proposal spec#12 The new functions are: CoopMat::Transpose CoopMat::ReduceRow CoopMat::ReduceColumn CoopMat::ReduceRowAndColumn CoopMat::Reduce2x2 --- source/slang/core.meta.slang | 12 + source/slang/hlsl.meta.slang | 537 +++++++++++++++++++++++++-------- source/slang/slang-capabilities.capdef | 54 ++++ source/slang/slang-emit-spirv-ops.h | 1 + 4 files changed, 470 insertions(+), 134 deletions(-) (limited to 'source') diff --git a/source/slang/core.meta.slang b/source/slang/core.meta.slang index 5911c997c..140c9ba16 100644 --- a/source/slang/core.meta.slang +++ b/source/slang/core.meta.slang @@ -3478,6 +3478,18 @@ enum MemoryOrder SeqCst = $(kIRMemoryOrder_SeqCst), } +// https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#_scope_id +enum MemoryScope +{ + CrossDevice = 0, + Device = 1, + Workgroup = 2, + Subgroup = 3, + Invocation = 4, + QueueFamily = 5, + ShaderCallKHR = 6, +}; + /// Represents types that can be used in any atomic operations. /// Implemented by builtin scalar types: `int`, `uint`, `int64_t`, `uint64_t`, `int8_t`, `uint8_t`, `int16_t`, `uint16_t`, `float`, `double` and `half`. [sealed] interface IAtomicable {} diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 2382d4a9a..829d5ce97 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -22509,13 +22509,52 @@ extension RasterizerOrderedStructuredBuffer : IR int getCount() { uint count; uint stride; this.GetDimensions(count, stride); return count; } } +namespace linalg +{ + +// +// Cooperative Matrix enums +// + +enum CoopMatMatrixUse +{ + MatrixA = 0, + MatrixB = 1, + MatrixAccumulator = 2, +}; + +enum CoopMatMatrixLayout +{ + RowMajor = 0, + ColumnMajor = 1, +}; + +enum CoopMatClampMode +{ + Undefined, + Constant, + ClampToEdge, + Repeat, + RepeatMirrored +}; + + // // Cooperative Matrix type // __intrinsic_type($(kIROp_CoopMatrixType)) [require(cooperative_matrix)] -struct CoopMat : IArray, IArithmetic +__generic< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse +> +struct CoopMat + : IArray + , IArithmetic { // // Initialization @@ -22535,21 +22574,25 @@ struct CoopMat(CoopMat other) + [require(cooperative_matrix_conversion)] + __init< + U : __BuiltinArithmeticType + >(CoopMat other) { this.copyFrom(other); } [ForceInline] + [require(cooperative_matrix)] __init(This x) { this = x; } // Required for `IArithmetic`. - [OverloadRank(-10)] [ForceInline] + [OverloadRank(-10)] + [require(cooperative_matrix)] __init(int i) { this = CoopMat(T(i)); @@ -22559,9 +22602,11 @@ struct CoopMat(CoopMat other) + [mutating] + [require(cooperative_matrix_conversion)] + void copyFrom< + U : __BuiltinArithmeticType + >(CoopMat other) { if (__isFloat() && __isInt()) this = __int_to_float_cast(other); @@ -22598,25 +22648,13 @@ struct CoopMat __indexRef(int index); + /// Returns the count as an integer value. [ForceInline] + [require(cooperative_matrix)] [__NoSideEffect] int getCount() { - return getLength(); - } - - [ForceInline] - [__NoSideEffect] - int getRowCount() - { - return M; - } - - [ForceInline] - [__NoSideEffect] - int getColumnCount() - { - return N; + return GetLength(); } __subscript(int index) -> T @@ -22635,14 +22673,111 @@ struct CoopMat; + }; + } + + /// Returns the number of rows in the matrix. + [ForceInline] + [__NoSideEffect] + static int GetRowCount() + { + return M; + } + + /// Returns the number of columns in the matrix. + [ForceInline] + [__NoSideEffect] + static int GetColumnCount() + { + return N; + } + + [require(cooperative_matrix_conversion)] + CoopMat Transpose() { return spirv_asm { - result:$$uint = OpCooperativeMatrixLengthKHR $$This; + OpCapability CooperativeMatrixConversionsNV; + OpExtension "SPV_NV_cooperative_matrix2"; + result:$$CoopMat = OpCooperativeMatrixTransposeNV $this; + }; + } + + [require(cooperative_matrix_reduction)] + CoopMat ReduceRow< + let RN : int + >(functype(T, T) -> T combineOp) + { + return spirv_asm + { + OpCapability CooperativeMatrixReductionsNV; + OpExtension "SPV_NV_cooperative_matrix2"; + result:$$CoopMat = OpCooperativeMatrixReduceNV $this Row $combineOp; + }; + } + + [require(cooperative_matrix_reduction)] + CoopMat ReduceColumn< + let RM : int + >(functype(T, T) -> T combineOp) + { + return spirv_asm + { + OpCapability CooperativeMatrixReductionsNV; + OpExtension "SPV_NV_cooperative_matrix2"; + result:$$CoopMat = OpCooperativeMatrixReduceNV $this Column $combineOp; + }; + } + + [require(cooperative_matrix_reduction)] + CoopMat ReduceRowAndColumn< + let RM : int, + let RN : int + >(functype(T, T) -> T combineOp) + { + return spirv_asm + { + OpCapability CooperativeMatrixReductionsNV; + OpExtension "SPV_NV_cooperative_matrix2"; + result:$$CoopMat = OpCooperativeMatrixReduceNV $this Row|Column $combineOp; + }; + } + + [require(cooperative_matrix_reduction)] + CoopMat Reduce2x2(functype(T, T)->T combineOp) + { + return spirv_asm + { + OpCapability CooperativeMatrixReductionsNV; + OpExtension "SPV_NV_cooperative_matrix2"; + result:$$CoopMat = OpCooperativeMatrixReduceNV $this 0x4 $combineOp; + }; + } + + [require(cooperative_matrix_map_element)] + This MapElement(functype(uint32_t, uint32_t, T)->T mapOp) + { + return spirv_asm + { + OpCapability CooperativeMatrixPerElementOperationsNV; + OpExtension "SPV_NV_cooperative_matrix2"; + result:$$CoopMat = OpCooperativeMatrixPerElementOpNV $this $mapOp; }; } @@ -22650,16 +22785,24 @@ struct CoopMat(RWStructuredBuffer buffer, uint element, uint stride) { - return store(__getEquivalentStructuredBuffer(buffer), element, stride, matrixLayout); + __Store(buffer, element, stride, matrixLayout); + } + + [require(cooperative_matrix)] + void Store< + let matrixLayout : CoopMatMatrixLayout + >(RWByteAddressBuffer buffer, uint element, uint stride) + { + __Store(__getEquivalentStructuredBuffer(buffer), element, stride, matrixLayout); } - [ForceInline] [require(cooperative_matrix)] - void store(RWStructuredBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + internal void __Store(RWStructuredBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) { let zero = 0; let alignment = 16U; @@ -22671,10 +22814,10 @@ struct CoopMat(T* buffer, uint element, uint stride) { let alignment = 16U; return spirv_asm @@ -22684,9 +22827,12 @@ struct CoopMat(__ref groupshared T[U] data, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + [require(cooperative_matrix)] + void Store< + let matrixLayout : CoopMatMatrixLayout, + let V : int + >(__ref groupshared T[V] data, uint element, uint stride) { let alignment = 16U; spirv_asm @@ -22697,10 +22843,13 @@ struct CoopMat(__ref groupshared U[V] data, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + void Store< + let matrixLayout : CoopMatMatrixLayout, + U, + let V : int + >(__ref groupshared U[V] data, uint element, uint stride) { let alignment = 16U; spirv_asm @@ -22711,10 +22860,14 @@ struct CoopMat(__ref groupshared vector[V] data, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + void Store< + let matrixLayout : CoopMatMatrixLayout, + U, + let V : int, + let L : int + >(__ref groupshared vector[V] data, uint element, uint stride) { let alignment = 16U; spirv_asm @@ -22725,30 +22878,34 @@ struct CoopMat load(ByteAddressBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout + >(ByteAddressBuffer buffer, uint element, uint stride) { - return load(__getEquivalentStructuredBuffer(buffer), element, stride, matrixLayout); + return Load(__getEquivalentStructuredBuffer(buffer), element, stride); } [__NoSideEffect] - [ForceInline] [require(cooperative_matrix)] - static CoopMat load(RWByteAddressBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout + >(RWByteAddressBuffer buffer, uint element, uint stride) { - return load(__getEquivalentStructuredBuffer(buffer), element, stride, matrixLayout); + return Load(__getEquivalentStructuredBuffer(buffer), element, stride); } [__NoSideEffect] - [ForceInline] [require(cooperative_matrix)] - static CoopMat load(StructuredBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout + >(StructuredBuffer buffer, uint element, uint stride) { let zero = 0; let alignment = 16U; @@ -22761,9 +22918,10 @@ struct CoopMat load(RWStructuredBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout + >(RWStructuredBuffer buffer, uint element, uint stride) { let zero = 0; let alignment = 16U; @@ -22775,10 +22933,12 @@ struct CoopMat load(T* buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout + >(T* buffer, uint element, uint stride) { let alignment = 16; return spirv_asm @@ -22790,7 +22950,10 @@ struct CoopMat load(__constref groupshared T[U] data, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout, + let V : int + >(__constref groupshared T[V] data, uint element, uint stride) { let alignment = 16U; return spirv_asm @@ -22803,7 +22966,11 @@ struct CoopMat loadAny(__constref groupshared U[V] data, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout, + U, + let V : int + >(__constref groupshared U[V] data, uint element, uint stride) { let alignment = 16U; return spirv_asm @@ -22816,7 +22983,12 @@ struct CoopMat loadAny(__constref groupshared vector[V] data, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) + static This Load< + let matrixLayout : CoopMatMatrixLayout, + U, + let V : int, + let L : int + >(__constref groupshared vector[V] data, uint element, uint stride) { let alignment = 16U; return spirv_asm @@ -22849,7 +23021,7 @@ struct CoopMat coopMatLoad(ByteAddressBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) +CoopMat coopMatLoad< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse, + let matrixLayout : CoopMatMatrixLayout +>( + ByteAddressBuffer buffer, + uint element, + uint stride) { - return CoopMat.load(buffer, element, stride, matrixLayout); + return CoopMat.Load(buffer, element, stride); } [ForceInline] [require(cooperative_matrix)] -CoopMat coopMatLoad(RWByteAddressBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) +CoopMat coopMatLoad< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse, + let matrixLayout : CoopMatMatrixLayout +>( + RWByteAddressBuffer buffer, + uint element, + uint stride) { - return CoopMat.load(buffer, element, stride, matrixLayout); + return CoopMat.Load(buffer, element, stride); } [ForceInline] [require(cooperative_matrix)] -CoopMat coopMatLoad(StructuredBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) +CoopMat coopMatLoad< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse, + let matrixLayout : CoopMatMatrixLayout +>( + StructuredBuffer buffer, + uint element, + uint stride) { - return CoopMat.load(buffer, element, stride, matrixLayout); + return CoopMat.Load(buffer, element, stride); } [ForceInline] [require(cooperative_matrix)] -CoopMat coopMatLoad(RWStructuredBuffer buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) +CoopMat coopMatLoad< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse, + let matrixLayout : CoopMatMatrixLayout +>( + RWStructuredBuffer buffer, + uint element, + uint stride) { - return CoopMat.load(buffer, element, stride, matrixLayout); + return CoopMat.Load(buffer, element, stride); } [ForceInline] [require(cooperative_matrix)] -CoopMat coopMatLoad(T* buffer, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) +CoopMat coopMatLoad< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse, + let matrixLayout : CoopMatMatrixLayout +>( + T* buffer, + uint element, + uint stride) { - return CoopMat.load(buffer, element, stride, matrixLayout); + return CoopMat.Load(buffer, element, stride); } [ForceInline] [require(cooperative_matrix)] -CoopMat coopMatLoad(__constref groupshared T[U] data, uint element, uint stride, constexpr CoopMatMatrixLayout matrixLayout) +CoopMat coopMatLoad< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse, + let matrixLayout : CoopMatMatrixLayout, + let U : int +>( + __constref groupshared T[U] data, + uint element, + uint stride) { - return CoopMat.load(data, element, stride, matrixLayout); + return CoopMat.Load(data, element, stride); } + // // Cooperative Matrix casting // -__generic +[require(cooperative_matrix_conversion)] __intrinsic_op($(kIROp_IntCast)) -[require(cooperative_matrix)] -CoopMat __int_cast(CoopMat val); - -__generic +CoopMat __int_cast< + T : __BuiltinArithmeticType, + U : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse +>(CoopMat val); + +[require(cooperative_matrix_conversion)] __intrinsic_op($(kIROp_FloatCast)) -[require(cooperative_matrix)] -CoopMat __real_cast(CoopMat val); - -__generic +CoopMat __real_cast< + T : __BuiltinArithmeticType, + U : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse +>(CoopMat val); + +[require(cooperative_matrix_conversion)] __intrinsic_op($(kIROp_CastIntToFloat)) -[require(cooperative_matrix)] -CoopMat __int_to_float_cast(CoopMat val); - -__generic +CoopMat __int_to_float_cast< + T : __BuiltinArithmeticType, + U : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse +>(CoopMat val); + +[require(cooperative_matrix_conversion)] __intrinsic_op($(kIROp_CastFloatToInt)) -[require(cooperative_matrix)] -CoopMat __float_to_int_cast(CoopMat val); +CoopMat __float_to_int_cast< + T : __BuiltinArithmeticType, + U : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse +>(CoopMat val); // // Cooperative Matrix multiplication with scalar // -__generic -[ForceInline] [require(cooperative_matrix)] -CoopMat operator *(CoopMat lhs, const T rhs) +CoopMat operator *< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse +>(CoopMat lhs, const T rhs) { return spirv_asm { @@ -22991,64 +23255,69 @@ CoopMat operator *(CoopMat lhs, const T rhs) }; } -__generic -[ForceInline] [require(cooperative_matrix)] -CoopMat operator *(const T lhs, CoopMat rhs) +CoopMat operator *< + T : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let N : int, + let R : CoopMatMatrixUse +>(const T lhs, CoopMat rhs) { return rhs * lhs; } // -// Cooperative Matrix enums -// - -enum CoopMatScope -{ - Device = 1, - Workgroup = 2, - Subgroup = 3, - QueueFamily = 5, -}; - -enum CoopMatMatrixUse -{ - MatrixA = 0, - MatrixB = 1, - MatrixAccumulator = 2, -}; - -enum CoopMatMatrixLayout -{ - RowMajor = 0, - ColumnMajor = 1, -}; - -enum CoopMatMatrixOperands -{ - None = 0x0, - MatrixASigned = 0x1, - MatrixBSigned = 0x2, - MatrixCSigned = 0x4, - MatrixResultSigned = 0x8, - SaturatingAccumulation = 0x10, -}; - -// -// Cooperative Matrix multiply accumulate +// Cooperative Matrix Multiply-Accumulate // [require(cooperative_matrix)] -__generic -CoopMat coopMatMulAdd(CoopMat matA, CoopMat matB, CoopMat matC, constexpr CoopMatMatrixOperands operands) +CoopMat coopMatMulAdd< + T : __BuiltinArithmeticType, + let saturatingAccumulation : bool, + U : __BuiltinArithmeticType, + V : __BuiltinArithmeticType, + W : __BuiltinArithmeticType, + let S : MemoryScope, + let M : int, + let K : int, + let N : int +>( + CoopMat matA, + CoopMat matB, + CoopMat matC) { - static_assert((RA == CoopMatMatrixUse::MatrixA) && (RB == CoopMatMatrixUse::MatrixB) && (RC == CoopMatMatrixUse::MatrixAccumulator), "matrix uses for `coopMatMulAdd` matrix parameters must be `MatrixA`, `MatrixB` and `MatrixAccumulator`"); + // https://github.com/KhronosGroup/SPIRV-Registry/blob/main/extensions/KHR/SPV_KHR_cooperative_matrix.asciidoc#3x-cooperative-matrix-operands + int operands = 0; // NoneKHR + if (__isSignedInt()) + { + operands |= 0x01; // MatrixASignedComponentsKHR + } + if (__isSignedInt()) + { + operands |= 0x02; // MatrixBSignedComponentsKHR + } + if (__isSignedInt()) + { + operands |= 0x04; // MatrixCSignedComponentsKHR + } + if (__isSignedInt()) + { + operands |= 0x08; // MatrixResultSignedComponentsKHR + } + if (saturatingAccumulation) + { + operands |= 0x10; // SaturatingAccumulationKHR + } + return spirv_asm { - result:$$CoopMat = OpCooperativeMatrixMulAddKHR $matA $matB $matC !operands; + result:$$CoopMat = OpCooperativeMatrixMulAddKHR $matA $matB $matC !operands; }; } +} // namespace linalg + // // Cooperative Vector // diff --git a/source/slang/slang-capabilities.capdef b/source/slang/slang-capabilities.capdef index f509835aa..b909fa0f9 100644 --- a/source/slang/slang-capabilities.capdef +++ b/source/slang/slang-capabilities.capdef @@ -575,6 +575,18 @@ def SPV_NV_cooperative_vector : _spirv_1_6 + SPV_EXT_replicated_composites; /// [EXT] def SPV_KHR_cooperative_matrix : _spirv_1_6 + SPV_EXT_physical_storage_buffer; +/// Represents the SPIR-V extension for SPV_NV_cooperative_matrix2. +/// [EXT] +def SPV_NV_cooperative_matrix2 : _spirv_1_6 + SPV_KHR_cooperative_matrix; + +/// Represents the SPIR-V extension for SPV_NV_tensor_addressing. +/// [EXT] +def SPV_NV_tensor_addressing : _spirv_1_6; + +/// Represents the SPIR-V extension for SPV_KHR_vulkan_memory_model. +/// [EXT] +def SPV_KHR_vulkan_memory_model : _spirv_1_3; + // SPIRV Capabilities. /// Represents the SPIR-V capability for atomic float 32 add operations. @@ -737,6 +749,30 @@ def spvCooperativeVectorTrainingNV : SPV_NV_cooperative_vector; /// [EXT] def spvCooperativeMatrixKHR : SPV_KHR_cooperative_matrix; +/// Represents the SPIR-V capability for cooperative matrix 2 +/// [EXT] +def spvCooperativeMatrixReductionsNV : SPV_NV_cooperative_matrix2; + +/// Represents the SPIR-V capability for cooperative matrix 2 +/// [EXT] +def spvCooperativeMatrixConversionsNV : SPV_NV_cooperative_matrix2; + +/// Represents the SPIR-V capability for cooperative matrix 2 +/// [EXT] +def spvCooperativeMatrixPerElementOperationsNV : SPV_NV_cooperative_matrix2; + +/// Represents the SPIR-V capability for cooperative matrix 2 +/// [EXT] +def spvCooperativeMatrixTensorAddressingNV : SPV_NV_cooperative_matrix2; + +/// Represents the SPIR-V capability for cooperative matrix 2 +/// [EXT] +def spvCooperativeMatrixBlockLoadsNV : SPV_NV_cooperative_matrix2; + +/// Represents the SPIR-V capability for tensor addressing +/// [EXT] +def spvTensorAddressingNV : SPV_NV_tensor_addressing; + /// Represents the SPIR-V capability for maximal reconvergence. /// [EXT] def spvMaximalReconvergenceKHR : SPV_KHR_maximal_reconvergence; @@ -1129,6 +1165,24 @@ alias cooperative_vector_training = spvCooperativeVectorTrainingNV; /// Capabilities needed to use cooperative matrices alias cooperative_matrix = spvCooperativeMatrixKHR; +/// Capabilities needed to use reduction operations with cooperative matrix +/// [Compound] +alias cooperative_matrix_reduction = spvCooperativeMatrixReductionsNV; +/// Capabilities needed to convert cooperative matrices +/// [Compound] +alias cooperative_matrix_conversion = spvCooperativeMatrixConversionsNV; +/// Capabilities needed to use MapElement operation with cooperative matrix +/// [Compound] +alias cooperative_matrix_map_element = spvCooperativeMatrixPerElementOperationsNV; +/// Capabilities needed to load or store with tensor_addressing extension +/// [Compound] +alias cooperative_matrix_tensor_addressing = spvCooperativeMatrixTensorAddressingNV; +/// Capabilities needed to use decodeFunc with cooperative matrix load +/// [Compound] +alias cooperative_matrix_block_load = spvCooperativeMatrixBlockLoadsNV; +/// Capabilities needed to use tensor addressing +/// [Compound] +alias tensor_addressing = spvTensorAddressingNV; // Non-internal shader stages // diff --git a/source/slang/slang-emit-spirv-ops.h b/source/slang/slang-emit-spirv-ops.h index 017e58667..b716e470d 100644 --- a/source/slang/slang-emit-spirv-ops.h +++ b/source/slang/slang-emit-spirv-ops.h @@ -151,6 +151,7 @@ SpvInst* emitOpTypeCoopVec(IRInst* inst, const T1& componentType, const T2& comp componentCount); } +// https://github.khronos.org/SPIRV-Registry/extensions/NV/SPV_NV_cooperative_matrix.html#OpTypeCooperativeMatrixNV template SpvInst* emitOpTypeCoopMat( IRInst* inst, -- cgit v1.2.3