Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove WaveMatrix #6807

Merged
merged 10 commits into from
Aug 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions docs/DXIL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2337,18 +2337,18 @@ ID Name Description
223 TextureGatherRaw Gather raw elements from 4 texels with no type conversions (SRV type is constrained)
224 SampleCmpLevel samples a texture and compares a single component against the specified comparison value
225 TextureStoreSample stores texel data at specified sample index
226 WaveMatrix_Annotate Annotate a wave matrix pointer with the type information
227 WaveMatrix_Depth Returns depth (K) value for matrix of specified type
228 WaveMatrix_Fill Fill wave matrix with scalar value
229 WaveMatrix_LoadRawBuf Load wave matrix from raw buffer
230 WaveMatrix_LoadGroupShared Load wave matrix from group shared array
231 WaveMatrix_StoreRawBuf Store wave matrix to raw buffer
232 WaveMatrix_StoreGroupShared Store wave matrix to group shared array
233 WaveMatrix_Multiply Mutiply left and right wave matrix and store in accumulator
234 WaveMatrix_MultiplyAccumulate Mutiply left and right wave matrix and accumulate into accumulator
235 WaveMatrix_ScalarOp Perform scalar operation on each element of wave matrix
236 WaveMatrix_SumAccumulate Sum rows or columns of an input matrix into an existing accumulator fragment matrix
237 WaveMatrix_Add Element-wise accumulate, or broadcast add of fragment into accumulator
226 Reserved0 Reserved
227 Reserved1 Reserved
228 Reserved2 Reserved
229 Reserved3 Reserved
230 Reserved4 Reserved
231 Reserved5 Reserved
232 Reserved6 Reserved
233 Reserved7 Reserved
234 Reserved8 Reserved
235 Reserved9 Reserved
236 Reserved10 Reserved
237 Reserved11 Reserved
238 AllocateNodeOutputRecords returns a handle for the output records
239 GetNodeRecordPtr retrieve node input/output record pointer in address space 6
240 IncrementOutputCount Select the next logical output count for an EmptyNodeOutput for the whole group or per thread.
Expand Down
80 changes: 20 additions & 60 deletions include/dxc/DXIL/DxilConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,20 @@ inline bool IsFeedbackTexture(DXIL::ResourceKind ResourceKind) {
// OPCODE-ENUM:BEGIN
// Enumeration for operations specified by DXIL
enum class OpCode : unsigned {
//
Reserved0 = 226, // Reserved
Reserved1 = 227, // Reserved
Reserved10 = 236, // Reserved
Reserved11 = 237, // Reserved
Reserved2 = 228, // Reserved
Reserved3 = 229, // Reserved
Reserved4 = 230, // Reserved
Reserved5 = 231, // Reserved
Reserved6 = 232, // Reserved
Reserved7 = 233, // Reserved
Reserved8 = 234, // Reserved
Reserved9 = 235, // Reserved
coopp marked this conversation as resolved.
Show resolved Hide resolved

// Amplification shader instructions
DispatchMesh = 173, // Amplification shader intrinsic DispatchMesh

Expand Down Expand Up @@ -946,27 +960,6 @@ enum class OpCode : unsigned {
WaveReadLaneAt = 117, // returns the value from the specified lane
WaveReadLaneFirst = 118, // returns the value from the first lane

// WaveMatrix
WaveMatrix_Add = 237, // Element-wise accumulate, or broadcast add of fragment
// into accumulator
WaveMatrix_Annotate =
226, // Annotate a wave matrix pointer with the type information
WaveMatrix_Depth =
227, // Returns depth (K) value for matrix of specified type
WaveMatrix_Fill = 228, // Fill wave matrix with scalar value
WaveMatrix_LoadGroupShared = 230, // Load wave matrix from group shared array
WaveMatrix_LoadRawBuf = 229, // Load wave matrix from raw buffer
WaveMatrix_Multiply =
233, // Mutiply left and right wave matrix and store in accumulator
WaveMatrix_MultiplyAccumulate =
234, // Mutiply left and right wave matrix and accumulate into accumulator
WaveMatrix_ScalarOp =
235, // Perform scalar operation on each element of wave matrix
WaveMatrix_StoreGroupShared = 232, // Store wave matrix to group shared array
WaveMatrix_StoreRawBuf = 231, // Store wave matrix to raw buffer
WaveMatrix_SumAccumulate = 236, // Sum rows or columns of an input matrix into
// an existing accumulator fragment matrix

// Work Graph intrinsics
FinishedCrossGroupSharing = 243, // returns true if the current thread group
// is the last to access the input
Expand Down Expand Up @@ -1003,6 +996,9 @@ enum class OpCode : unsigned {
// OPCODECLASS-ENUM:BEGIN
// Groups for DXIL operations with equivalent function templates
enum class OpCodeClass : unsigned {
//
Reserved,

// Amplification shader instructions
DispatchMesh,

Expand Down Expand Up @@ -1278,18 +1274,6 @@ enum class OpCodeClass : unsigned {
WaveReadLaneAt,
WaveReadLaneFirst,

// WaveMatrix
WaveMatrix_Accumulate,
WaveMatrix_Annotate,
WaveMatrix_Depth,
WaveMatrix_Fill,
WaveMatrix_LoadGroupShared,
WaveMatrix_LoadRawBuf,
WaveMatrix_Multiply,
WaveMatrix_ScalarOp,
WaveMatrix_StoreGroupShared,
WaveMatrix_StoreRawBuf,

// Work Graph intrinsics
FinishedCrossGroupSharing,
damyanp marked this conversation as resolved.
Show resolved Hide resolved
GetInputRecordCount,
Expand All @@ -1306,9 +1290,9 @@ enum class OpCodeClass : unsigned {
NumOpClasses_Dxil_1_5 = 143,
NumOpClasses_Dxil_1_6 = 149,
NumOpClasses_Dxil_1_7 = 153,
NumOpClasses_Dxil_1_8 = 183,
NumOpClasses_Dxil_1_8 = 174,

NumOpClasses = 183 // exclusive last value of enumeration
NumOpClasses = 174 // exclusive last value of enumeration
};
// OPCODECLASS-ENUM:END

Expand Down Expand Up @@ -1816,29 +1800,6 @@ enum class SamplerFeedbackType : uint8_t {
LastEntry = 2
};

enum class WaveMatrixKind : uint8_t {
Left = 0,
Right = 1,
LeftColAcc = 2,
RightRowAcc = 3,
Accumulator = 4,
NumKinds = 5,
MaskSide = 1,
MaskClass = 6, // 0 = Left/Right, 2 = Fragment, 4 = Accumulator
};

/* <py::lines('WAVEMATRIXSCALAROPCODE-ENUM')>hctdb_instrhelp.get_enum_decl("WaveMatrixScalarOpCode")</py>*/
// WAVEMATRIXSCALAROPCODE-ENUM:BEGIN
// Operation for WaveMatrix_ScalarOp
enum class WaveMatrixScalarOpCode : unsigned {
Add = 0,
Divide = 3,
Invalid = 4,
Multiply = 2,
Subtract = 1,
};
// WAVEMATRIXSCALAROPCODE-ENUM:END

// Corresponds to MEMORY_TYPE_FLAG enums in HLSL
enum class MemoryTypeFlag : uint32_t {
UavMemory = 0x00000001, // UAV_MEMORY
Expand Down Expand Up @@ -1921,8 +1882,7 @@ const uint64_t ShaderFeatureInfo_SampleCmpGradientOrBias = 0x80000000;
const uint64_t ShaderFeatureInfo_ExtendedCommandInfo = 0x100000000;

// Experimental SM 6.9+ - Reserved, not yet supported.
// WaveMMA slots in between two SM 6.6 feature bits.
const uint64_t ShaderFeatureInfo_WaveMMA = 0x8000000;
const uint64_t ShaderFeatureInfo_Reserved = 0x8000000;

// Maximum count without rolling over into another 64-bit field is 40,
// so the last flag we can use for a feature requirement is: 0x8000000000
Expand Down
Loading
Loading