Skip to content

Commit 44efa29

Browse files
authored
[SM6.10] Update Values for Component Types (#8264)
I8 and U8 were in an inconsistent order compared to all the other previously defined types. The values are swapped now as they were only ever used for coopvec which never left preview and is removed from future releases. The upcoming LinAlg feature will depend on these values so they must be updated now.
1 parent 6098626 commit 44efa29

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

include/dxc/DXIL/DxilConstants.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ enum class ComponentType : uint32_t {
183183
PackedU8x32 = 18,
184184

185185
// BEGIN NEW FOR SM 6.9
186-
U8 = 19,
187-
I8 = 20,
186+
I8 = 19,
187+
U8 = 20,
188188
F8_E4M3 = 21,
189189
F8_E5M2 = 22,
190190
// END

tools/clang/lib/Headers/hlsl/dx/coopvec.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ enum DataType {
2424
DATA_TYPE_FLOAT32 = 9, // ComponentType::F32
2525
DATA_TYPE_SINT8_T4_PACKED = 17, // ComponentType::PackedS8x32
2626
DATA_TYPE_UINT8_T4_PACKED = 18, // ComponentType::PackedU8x32
27-
DATA_TYPE_UINT8 = 19, // ComponentType::U8
28-
DATA_TYPE_SINT8 = 20, // ComponentType::I8
27+
DATA_TYPE_SINT8 = 19, // ComponentType::I8
28+
DATA_TYPE_UINT8 = 20, // ComponentType::U8
2929
DATA_TYPE_FLOAT8_E4M3 = 21, // ComponentType::F8_E4M3
3030
// (1 sign, 4 exp, 3 mantissa bits)
3131
DATA_TYPE_FLOAT8_E5M2 = 22, // ComponentType::F8_E5M2

tools/clang/test/CodeGenDXIL/hlsl/coopvec/mat-vec-mul.hlsl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export vector<float, 8> Test2(vector<uint, 6> Input) {
2323
Buf, 0, 0};
2424

2525
// note the stride argument is dropped.
26-
// CHECK: %{{.+}} = call <8 x float> @dx.op.matVecMul.v8f32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 19, i32 8, i32 24, i32 2, i1 false, i32 0, i1 false)
26+
// CHECK: %{{.+}} = call <8 x float> @dx.op.matVecMul.v8f32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 20, i32 8, i32 24, i32 2, i1 false, i32 0, i1 false)
2727
return Mul<float>(Matrix,
2828
MakeInterpretedVector<DATA_TYPE_UINT8_T4_PACKED>(Input));
2929
}
@@ -35,7 +35,7 @@ export vector<float, 8> Test3(vector<uint, 6> Input) {
3535
MatrixRef<DATA_TYPE_UINT8, 8, 6 * 4, MATRIX_LAYOUT_ROW_MAJOR> Matrix = {
3636
Buf, 0, 6 * 4 * 8};
3737

38-
// CHECK: %{{.+}} = call <8 x float> @dx.op.matVecMul.v8f32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 19, i32 8, i32 24, i32 0, i1 false, i32 192, i1 false)
38+
// CHECK: %{{.+}} = call <8 x float> @dx.op.matVecMul.v8f32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 20, i32 8, i32 24, i32 0, i1 false, i32 192, i1 false)
3939
return Mul<float>(Matrix,
4040
MakeInterpretedVector<DATA_TYPE_UINT8_T4_PACKED>(Input));
4141
}
@@ -47,7 +47,7 @@ export vector<uint16_t, 8> Test4(vector<uint, 6> Input) {
4747
MatrixRef<DATA_TYPE_UINT8, 8, 6 * 4, MATRIX_LAYOUT_ROW_MAJOR> Matrix = {
4848
Buf, 0, 6 * 4 * 8};
4949

50-
// CHECK: %{{.+}} = call <8 x i16> @dx.op.matVecMul.v8i16.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 19, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
50+
// CHECK: %{{.+}} = call <8 x i16> @dx.op.matVecMul.v8i16.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 20, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
5151
return Mul<uint16_t>(Matrix,
5252
MakeInterpretedVector<DATA_TYPE_UINT8_T4_PACKED>(Input));
5353

@@ -60,7 +60,7 @@ export vector<uint, 8> Test5(vector<uint, 6> Input) {
6060
MatrixRef<DATA_TYPE_UINT8, 8, 6 * 4, MATRIX_LAYOUT_ROW_MAJOR> Matrix = {
6161
Buf, 0, 6 * 4 * 8};
6262

63-
// CHECK: %{{.+}} = call <8 x i32> @dx.op.matVecMul.v8i32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 19, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
63+
// CHECK: %{{.+}} = call <8 x i32> @dx.op.matVecMul.v8i32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 20, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
6464
return Mul<uint>(Matrix,
6565
MakeInterpretedVector<DATA_TYPE_UINT8_T4_PACKED>(Input));
6666

@@ -73,7 +73,7 @@ export vector<uint, 8> Test5(vector<uint8_t4_packed, 6> Input) {
7373
MatrixRef<DATA_TYPE_UINT8, 8, 6 * 4, MATRIX_LAYOUT_ROW_MAJOR> Matrix = {
7474
Buf, 0, 6 * 4 * 8};
7575

76-
// CHECK: %{{.+}} = call <8 x i32> @dx.op.matVecMul.v8i32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 19, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
76+
// CHECK: %{{.+}} = call <8 x i32> @dx.op.matVecMul.v8i32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 18, %dx.types.Handle %{{.+}}, i32 0, i32 20, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
7777
return Mul<uint>(Matrix,
7878
MakeInterpretedVector<DATA_TYPE_UINT8_T4_PACKED>(Input));
7979

@@ -86,7 +86,7 @@ export vector<uint, 8> Test5(vector<int8_t4_packed, 6> Input) {
8686
MatrixRef<DATA_TYPE_UINT8, 8, 6 * 4, MATRIX_LAYOUT_ROW_MAJOR> Matrix = {
8787
Buf, 0, 6 * 4 * 8};
8888

89-
// CHECK: %{{.+}} = call <8 x i32> @dx.op.matVecMul.v8i32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 17, %dx.types.Handle %{{.+}}, i32 0, i32 19, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
89+
// CHECK: %{{.+}} = call <8 x i32> @dx.op.matVecMul.v8i32.v6i32(i32 305, <6 x i32> %{{.+}}, i1 true, i32 17, %dx.types.Handle %{{.+}}, i32 0, i32 20, i32 8, i32 24, i32 0, i1 false, i32 192, i1 true)
9090
return Mul<uint>(Matrix,
9191
MakeInterpretedVector<DATA_TYPE_SINT8_T4_PACKED>(Input));
9292

0 commit comments

Comments
 (0)