Skip to content

Commit f304830

Browse files
authored
[SM6.10] LinAlg Validation: Rework Error Messages (#8776)
Fixes #8768 Updates error messages to name specific things such as the failing matrix so that an operation with multiple failures on different matrices won't repeat an identical failure message each time
1 parent 39baaad commit f304830

13 files changed

Lines changed: 215 additions & 169 deletions

docs/DXIL.rst

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3209,23 +3209,24 @@ INSTR.ILLEGALDXILOPCODE DXILOpCode must be valid o
32093209
INSTR.ILLEGALDXILOPFUNCTION '%0' is not a DXILOpFuncition for DXILOpcode '%1'.
32103210
INSTR.IMMBIASFORSAMPLEB bias amount for sample_b must be in the range [%0,%1], but %2 was specified as an immediate.
32113211
INSTR.INBOUNDSACCESS Access to out-of-bounds memory is disallowed.
3212-
INSTR.LINALGILLEGALCOMPONENTTYPE Component Type '%0' not allowed in LinAlg Matrix.
3213-
INSTR.LINALGILLEGALKDIM Matrix K Dimension out of bounds. K=%0 must be >= %1 and <= %2.
3214-
INSTR.LINALGMATRIXDIMKVECKMISMATCH %0 vector size '%1' must be %2 for matrix with K '%3' and Type '%4'
3215-
INSTR.LINALGMATRIXDIMMISMATCH Matrix Dimension '%0x%1' does not match expected dimension %2x%3.
3216-
INSTR.LINALGMATRIXDIMVECTORMISMATCH %0 vector size '%1' must match matrix %2 dimension '%3'
3217-
INSTR.LINALGMATRIXLAYOUTREQSTRIDE Matrix layout '%0' requires stride 0.
3212+
INSTR.LINALGILLEGALCOMPONENTTYPE Component type '%0' from %1 not allowed in LinAlg Matrix operations.
3213+
INSTR.LINALGILLEGALKDIM %0 matrix K dimension out of bounds. K=%1 must be >= %2 and <= %3.
3214+
INSTR.LINALGMATRIX2PARTSMUSTMATCH %0 matrix %1 '%2' must match %3 matrix %4 '%5'.
3215+
INSTR.LINALGMATRIXDIMKVECKMISMATCH %0 vector size '%1' must be %2 for input matrix with K '%3' and Type '%4'
3216+
INSTR.LINALGMATRIXDIMVECTORMISMATCH %0 vector size '%1' must match input matrix M dimension '%2'
3217+
INSTR.LINALGMATRIXLAYOUTREQSTRIDE %0 with layout '%1' requires stride 0.
32183218
INSTR.LINALGMATRIXLOADTHREADREQUIRESBAB Loading matrix with Thread scope requires ByteAddressBuffer.
3219-
INSTR.LINALGMATRIXNOTEXACTMATCH Matrix '%0' must exactly match matrix '%1'.
3220-
INSTR.LINALGMATRIXOUTPUTBIASVECMISMATCH Output vector element type '%0' must match Bias vector element type '%1'
3219+
INSTR.LINALGMATRIXNOTEXACTMATCH %0 matrix '%1' must exactly match %2 matrix '%3'.
3220+
INSTR.LINALGMATRIXOUTPUTBIASVECMISMATCH Output vector element type '%0' must match bias vector element type '%1'
32213221
INSTR.LINALGMATRIXREQUIRESLAYOUT2 %0 requires layout %1 or %2.
32223222
INSTR.LINALGMATRIXREQUIRESRWBAB %0 requires RWByteAddressBuffer.
3223-
INSTR.LINALGMATRIXSCOPEMISMATCH Matrix Scope '%0' does not match expected scope %1.
3224-
INSTR.LINALGMATRIXSCOPEMISMATCH2 Matrix Scope '%0' does not match expected scope %1 or %2.
3225-
INSTR.LINALGMATRIXSCOPEREQLAYOUT2 Matrix scope '%0' requires layout %1 or %2.
3223+
INSTR.LINALGMATRIXSCOPEMISMATCH %0 matrix scope '%1' does not match expected scope %2.
3224+
INSTR.LINALGMATRIXSCOPEMISMATCH2 %0 matrix scope '%1' does not match expected scope %2 or %3.
3225+
INSTR.LINALGMATRIXSCOPEREQLAYOUT2 %0 matrix with scope '%1' requires layout %2 or %3 for %4.
32263226
INSTR.LINALGMATRIXUNSIGNEDFLOATTYPENOTALLOWED Float-like type '%0' must be signed
3227-
INSTR.LINALGMATRIXUSEMISMATCH Matrix Use '%0' does not match expected use %1.
3228-
INSTR.LINALGMATRIXUSEMISMATCH2 Matrix Use '%0' does not match expected use %1 or %2.
3227+
INSTR.LINALGMATRIXUSEMISMATCH %0 matrix use '%1' does not match expected use %2.
3228+
INSTR.LINALGMATRIXUSEMISMATCH2 %0 matrix use '%1' does not match expected use %2 or %3.
3229+
INSTR.LINALGMETADATAMISSING %0 matrix must have well-formed metadata.
32293230
INSTR.MAYREORDERTHREADUNDEFCOHERENCEHINTPARAM Use of undef coherence hint or num coherence hint bits in MaybeReorderThread.
32303231
INSTR.MINPRECISIONNOTPRECISE Instructions marked precise may not refer to minprecision values.
32313232
INSTR.MINPRECISONBITCAST Bitcast on minprecison types is not allowed.

lib/DxilValidation/DxilValidation.cpp

Lines changed: 131 additions & 92 deletions
Large diffs are not rendered by default.

tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-copyconvert.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,27 +20,27 @@ define void @main() {
2020

2121
%1 = call %dx.types.LinAlgMatrixC2M5N4U1S2 @dx.op.linAlgFillMatrix.mC2M5N4U1S2.i32(i32 -2147483636, i32 1) ; LinAlgFillMatrix(value)
2222

23-
; CHECK: Function: main: error: Matrix Dimension '8x4' does not match expected dimension 5x4.
23+
; CHECK: Function: main: error: Destination matrix dimension '8x4' must match source matrix dimension '5x4'.
2424
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgCopyConvertMatrix.mC4M8N4U1S2.mC2M5N4U1S2
2525
%2 = call %dx.types.LinAlgMatrixC4M8N4U1S2 @dx.op.linAlgCopyConvertMatrix.mC4M8N4U1S2.mC2M5N4U1S2(i32 -2147483635, %dx.types.LinAlgMatrixC2M5N4U1S2 %1, i1 false) ; LinAlgCopyConvertMatrix(srcMatrix,transpose)
2626

27-
; CHECK-NEXT: Function: main: error: Matrix Dimension '5x8' does not match expected dimension 5x4.
27+
; CHECK-NEXT: Function: main: error: Destination matrix dimension '5x8' must match source matrix dimension '5x4'.
2828
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgCopyConvertMatrix.mC4M5N8U1S2.mC2M5N4U1S2
2929
%3 = call %dx.types.LinAlgMatrixC4M5N8U1S2 @dx.op.linAlgCopyConvertMatrix.mC4M5N8U1S2.mC2M5N4U1S2(i32 -2147483635, %dx.types.LinAlgMatrixC2M5N4U1S2 %1, i1 false) ; LinAlgCopyConvertMatrix(srcMatrix,transpose)
3030

31-
; CHECK-NEXT: Function: main: error: Matrix Dimension '5x4' does not match expected dimension 4x5.
31+
; CHECK-NEXT: Function: main: error: Destination matrix dimension '5x4' must match source matrix dimension '4x5'.
3232
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgCopyConvertMatrix.mC4M5N4U1S2.mC2M5N4U1S2
3333
%4 = call %dx.types.LinAlgMatrixC4M5N4U1S2 @dx.op.linAlgCopyConvertMatrix.mC4M5N4U1S2.mC2M5N4U1S2(i32 -2147483635, %dx.types.LinAlgMatrixC2M5N4U1S2 %1, i1 true) ; LinAlgCopyConvertMatrix(srcMatrix,transpose)
3434

35-
; CHECK-NEXT: Function: main: error: Matrix Scope 'Wave' does not match expected scope ThreadGroup.
35+
; CHECK-NEXT: Function: main: error: Destination matrix scope 'Wave' must match source matrix scope 'ThreadGroup'.
3636
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgCopyConvertMatrix.mC2M4N5U1S1.mC2M5N4U1S2
3737
%5 = call %dx.types.LinAlgMatrixC2M4N5U1S1 @dx.op.linAlgCopyConvertMatrix.mC2M4N5U1S1.mC2M5N4U1S2(i32 -2147483635, %dx.types.LinAlgMatrixC2M5N4U1S2 %1, i1 true) ; LinAlgCopyConvertMatrix(srcMatrix,transpose)
3838

3939
%6 = call %dx.types.LinAlgMatrixC2M4N5U1S0 @dx.op.linAlgMatrixLoadFromDescriptor.mC2M4N5U1S0(i32 -2147483634, %dx.types.Handle %bab, i32 0, i32 0, i32 0, i32 128) ; LinAlgMatrixLoadFromDescriptor(handle,offset,stride,layout,align)
4040

41-
; CHECK-NEXT: Function: main: error: Matrix Scope 'Thread' does not match expected scope Wave or ThreadGroup.
41+
; CHECK-NEXT: Function: main: error: Destination matrix scope 'Thread' does not match expected scope Wave or ThreadGroup.
4242
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgCopyConvertMatrix.mC2M4N5U1S0.mC2M4N5U1S0
43-
; CHECK-NEXT: Function: main: error: Matrix Scope 'Thread' does not match expected scope Wave or ThreadGroup.
43+
; CHECK-NEXT: Function: main: error: Source matrix scope 'Thread' does not match expected scope Wave or ThreadGroup.
4444
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgCopyConvertMatrix.mC2M4N5U1S0.mC2M4N5U1S0
4545
%7 = call %dx.types.LinAlgMatrixC2M4N5U1S0 @dx.op.linAlgCopyConvertMatrix.mC2M4N5U1S0.mC2M4N5U1S0(i32 -2147483635, %dx.types.LinAlgMatrixC2M4N5U1S0 %6, i1 false) ; LinAlgCopyConvertMatrix(srcMatrix,transpose)
4646

tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-illegal-component-type.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ define void @main() {
1313
%1 = call %dx.types.Handle @dx.op.createHandleFromBinding(i32 217, %dx.types.ResBind zeroinitializer, i32 0, i1 false) ; CreateHandleFromBinding(bind,index,nonUniformIndex)
1414
%2 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 11, i32 0 }) ; AnnotateHandle(res,props) resource: ByteAddressBuffer
1515

16-
; CHECK: Function: main: error: Component Type 'Invalid' not allowed in LinAlg Matrix.
16+
; CHECK: Function: main: error: Component type 'Invalid' from return matrix not allowed in LinAlg Matrix operations.
1717
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromDescriptor.mC0M16N16U0S0
1818
; Matrix<Invalid, 16, 16, A, Thread>
1919
%3 = call %dx.types.LinAlgMatrixC0M16N16U0S0 @dx.op.linAlgMatrixLoadFromDescriptor.mC0M16N16U0S0(i32 -2147483634, %dx.types.Handle %2, i32 0, i32 0, i32 0, i32 128) ; LinAlgMatrixLoadFromDescriptor(handle,offset,stride,layout,align)

tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixaccumulate.ll

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,29 @@ define void @main() {
1818
%5 = call %dx.types.LinAlgMatrixC8M4N4U1S1 @dx.op.linAlgFillMatrix.mC8M4N4U1S1.i32(i32 -2147483636, i32 6) ; LinAlgFillMatrix(value)
1919
%6 = call %dx.types.LinAlgMatrixC8M8N8U0S2 @dx.op.linAlgFillMatrix.mC8M8N8U0S2.i32(i32 -2147483636, i32 7) ; LinAlgFillMatrix(value)
2020

21-
; CHECK: Function: main: error: Matrix 'dx.types.LinAlgMatrixC8M4N4U2S2' must exactly match matrix 'dx.types.LinAlgMatrixC8M4N4U0S2'.
21+
; CHECK: Function: main: error: Return matrix 'dx.types.LinAlgMatrixC8M4N4U2S2' must exactly match arg 1 matrix 'dx.types.LinAlgMatrixC8M4N4U0S2'.
2222
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U0S2.mC8M4N4U0S2
2323
%7 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U0S2.mC8M4N4U0S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U0S2 %2, %dx.types.LinAlgMatrixC8M4N4U0S2 %2) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)
2424

25-
; CHECK-NEXT: Function: main: error: Matrix Use 'A' does not match expected use Accumulator.
25+
; CHECK-NEXT: Function: main: error: Return matrix use 'A' does not match expected use Accumulator.
2626
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U0S2.mC8M4N4U0S2.mC8M4N4U0S2
2727
%8 = call %dx.types.LinAlgMatrixC8M4N4U0S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U0S2.mC8M4N4U0S2.mC8M4N4U0S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U0S2 %2, %dx.types.LinAlgMatrixC8M4N4U0S2 %2) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)
2828

29-
; CHECK-NEXT: Function: main: error: Matrix Use 'Accumulator' does not match expected use A or B.
29+
; CHECK-NEXT: Function: main: error: Arg 2 matrix use 'Accumulator' does not match expected use A or B.
3030
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U2S2
3131
%9 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U2S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S2 %1, %dx.types.LinAlgMatrixC8M4N4U2S2 %1) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)
3232

33-
; CHECK-NEXT: Function: main: error: Matrix Scope 'Wave' does not match expected scope ThreadGroup.
33+
; CHECK-NEXT: Function: main: error: Return matrix scope 'ThreadGroup' must match Arg 2 matrix scope 'Wave'.
3434
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U1S1
3535
%10 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U1S1(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S2 %1, %dx.types.LinAlgMatrixC8M4N4U1S1 %5) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)
3636

37-
; CHECK-NEXT: Function: main: error: Matrix Scope 'Thread' does not match expected scope Wave or ThreadGroup.
37+
; CHECK-NEXT: Function: main: error: Arg 2 matrix scope 'Thread' does not match expected scope Wave or ThreadGroup.
38+
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S0.mC8M4N4U2S0.mC8M4N4U1S0
39+
; CHECK-NEXT: Function: main: error: Return matrix scope 'Thread' does not match expected scope Wave or ThreadGroup.
3840
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S0.mC8M4N4U2S0.mC8M4N4U1S0
3941
%11 = call %dx.types.LinAlgMatrixC8M4N4U2S0 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S0.mC8M4N4U2S0.mC8M4N4U1S0(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S0 %3, %dx.types.LinAlgMatrixC8M4N4U1S0 %4) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)
4042

41-
; CHECK-NEXT: Function: main: error: Matrix Dimension '8x8' does not match expected dimension 4x4.
43+
; CHECK-NEXT: Function: main: error: Arg 2 matrix dimension '8x8' must match return matrix dimension '4x4'.
4244
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M8N8U0S2
4345
%12 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M8N8U0S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S2 %1, %dx.types.LinAlgMatrixC8M8N8U0S2 %6) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS)
4446

tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixaccumulatetodescriptor.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ define void @main() {
3232
%12 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer
3333
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S0(i32 -2147483621, %dx.types.LinAlgMatrixC8M4N4U2S0 %4, %dx.types.Handle %12, i32 0, i32 0, i32 %11, i32 128) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
3434

35-
; CHECK-NEXT: Function: main: error: Matrix scope 'Thread' requires layout OuterProductOptimal or OuterProductOptimalTranspose.
35+
; CHECK-NEXT: Function: main: error: Input matrix with scope 'Thread' requires layout OuterProductOptimal or OuterProductOptimalTranspose for LinAlgMatrixAccumulateToDescriptor.
3636
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S0
3737
%13 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer
3838
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S0(i32 -2147483621, %dx.types.LinAlgMatrixC8M4N4U2S0 %4, %dx.types.Handle %13, i32 0, i32 0, i32 0, i32 128) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
@@ -62,17 +62,17 @@ define void @main() {
6262
%18 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer
6363
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S0(i32 -2147483621, %dx.types.LinAlgMatrixC8M4N4U2S0 %4, %dx.types.Handle %18, i32 0, i32 0, i32 4, i32 215) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
6464

65-
; CHECK-NEXT: Function: main: error: Matrix layout 'OuterProductOptimal' requires stride 0.
65+
; CHECK-NEXT: Function: main: error: LinAlgMatrixAccumulateToDescriptor with layout 'OuterProductOptimal' requires stride 0.
6666
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S0
6767
%19 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer
6868
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S0(i32 -2147483621, %dx.types.LinAlgMatrixC8M4N4U2S0 %4, %dx.types.Handle %19, i32 0, i32 1, i32 4, i32 128) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
6969

70-
; CHECK-NEXT: Function: main: error: Matrix scope 'Wave' requires layout RowMajor or ColumnMajor.
70+
; CHECK-NEXT: Function: main: error: Input matrix with scope 'Wave' requires layout RowMajor or ColumnMajor for LinAlgMatrixAccumulateToDescriptor.
7171
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S1
7272
%20 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer
7373
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U2S1(i32 -2147483621, %dx.types.LinAlgMatrixC8M4N4U2S1 %6, %dx.types.Handle %20, i32 0, i32 0, i32 3, i32 256) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)
7474

75-
; CHECK-NEXT: Function: main: error: Matrix Use 'A' does not match expected use Accumulator.
75+
; CHECK-NEXT: Function: main: error: Input matrix use 'A' does not match expected use Accumulator.
7676
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U0S0
7777
%21 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer
7878
call void @dx.op.linAlgMatrixAccumulateToDescriptor.mC8M4N4U0S0(i32 -2147483621, %dx.types.LinAlgMatrixC8M4N4U0S0 %8, %dx.types.Handle %21, i32 0, i32 0, i32 4, i32 128) ; LinAlgMatrixAccumulateToDescriptor(matrix,handle,offset,stride,layout,align)

tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixloadfromdescriptor.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ define void @main() {
2727
%4 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %3, %dx.types.ResourceProperties { i32 11, i32 0 }) ; AnnotateHandle(res,props) resource: ByteAddressBuffer
2828

2929

30-
; CHECK: Function: main: error: Matrix scope 'ThreadGroup' requires layout RowMajor or ColumnMajor.
30+
; CHECK: Function: main: error: Return matrix with scope 'ThreadGroup' requires layout RowMajor or ColumnMajor for LinAlgMatrixLoadFromDescriptor.
3131
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromDescriptor.mC8M4N4U2S2
3232
%5 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixLoadFromDescriptor.mC8M4N4U2S2(i32 -2147483634, %dx.types.Handle %4, i32 0, i32 0, i32 4, i32 128) ; LinAlgMatrixLoadFromDescriptor(handle,offset,stride,layout,align)
3333
%6 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %3, %dx.types.ResourceProperties { i32 11, i32 0 }) ; AnnotateHandle(res,props) resource: ByteAddressBuffer
3434

3535

36-
; CHECK-NEXT: Function: main: error: Matrix layout 'OuterProductOptimal' requires stride 0.
36+
; CHECK-NEXT: Function: main: error: LinAlgMatrixLoadFromDescriptor with layout 'OuterProductOptimal' requires stride 0.
3737
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixLoadFromDescriptor.mC8M4N4U2S0
3838
%7 = call %dx.types.LinAlgMatrixC8M4N4U2S0 @dx.op.linAlgMatrixLoadFromDescriptor.mC8M4N4U2S0(i32 -2147483634, %dx.types.Handle %6, i32 0, i32 4, i32 4, i32 128) ; LinAlgMatrixLoadFromDescriptor(handle,offset,stride,layout,align)
3939
%8 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %2, %dx.types.ResourceProperties { i32 12, i32 4 }) ; AnnotateHandle(res,props) resource: StructuredBuffer<stride=4>

tools/clang/test/LitDXILValidation/LinAlgMatrix/linalgmatrix-matrixstoretodescriptor.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ define void @main() {
5252
%13 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %1, %dx.types.ResourceProperties { i32 4107, i32 0 }) ; AnnotateHandle(res,props) resource: RWByteAddressBuffer
5353
call void @dx.op.linAlgMatrixStoreToDescriptor.mC8M4N4U0S1(i32 -2147483628, %dx.types.LinAlgMatrixC8M4N4U0S1 %4, %dx.types.Handle %13, i32 0, i32 0, i32 %11, i32 256) ; LinAlgMatrixStoreToDescriptor(matrix,handle,offset,stride,layout,align)
5454

55-
; CHECK-NEXT: Function: main: error: Matrix Scope 'Thread' does not match expected scope Wave or ThreadGroup.
55+
; CHECK-NEXT: Function: main: error: Input matrix scope 'Thread' does not match expected scope Wave or ThreadGroup.
5656
; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixStoreToDescriptor.mC8M4N4U2S0
5757
%14 = call %dx.types.Handle @dx.op.annotateHandle(i32 216, %dx.types.Handle %2, %dx.types.ResourceProperties { i32 11, i32 0 }) ; AnnotateHandle(res,props) resource: ByteAddressBuffer
5858
%15 = call %dx.types.LinAlgMatrixC8M4N4U2S0 @dx.op.linAlgMatrixLoadFromDescriptor.mC8M4N4U2S0(i32 -2147483634, %dx.types.Handle %14, i32 0, i32 0, i32 4, i32 128) ; LinAlgMatrixLoadFromDescriptor(handle,offset,stride,layout,align)

0 commit comments

Comments
 (0)