|
| 1 | +; REQUIRES: dxil-1-10 |
| 2 | +; RUN: not %dxv %s 2>&1 | FileCheck %s |
| 3 | +target datalayout = "e-m:e-p:32:32-i1:32-i8:32-i16:32-i32:32-i64:64-f16:32-f32:32-f64:64-n8:16:32:64" |
| 4 | +target triple = "dxil-ms-dx" |
| 5 | + |
| 6 | +%dx.types.LinAlgMatrixC8M4N4U2S2 = type { i8* } |
| 7 | +%dx.types.LinAlgMatrixC8M4N4U0S2 = type { i8* } |
| 8 | +%dx.types.LinAlgMatrixC8M4N4U2S0 = type { i8* } |
| 9 | +%dx.types.LinAlgMatrixC8M4N4U1S0 = type { i8* } |
| 10 | +%dx.types.LinAlgMatrixC8M4N4U1S1 = type { i8* } |
| 11 | +%dx.types.LinAlgMatrixC8M8N8U0S2 = type { i8* } |
| 12 | + |
| 13 | +define void @main() { |
| 14 | + %1 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgFillMatrix.mC8M4N4U2S2.i32(i32 -2147483636, i32 1) ; LinAlgFillMatrix(value) |
| 15 | + %2 = call %dx.types.LinAlgMatrixC8M4N4U0S2 @dx.op.linAlgFillMatrix.mC8M4N4U0S2.i32(i32 -2147483636, i32 2) ; LinAlgFillMatrix(value) |
| 16 | + %3 = call %dx.types.LinAlgMatrixC8M4N4U2S0 @dx.op.linAlgFillMatrix.mC8M4N4U2S0.i32(i32 -2147483636, i32 4) ; LinAlgFillMatrix(value) |
| 17 | + %4 = call %dx.types.LinAlgMatrixC8M4N4U1S0 @dx.op.linAlgFillMatrix.mC8M4N4U1S0.i32(i32 -2147483636, i32 5) ; LinAlgFillMatrix(value) |
| 18 | + %5 = call %dx.types.LinAlgMatrixC8M4N4U1S1 @dx.op.linAlgFillMatrix.mC8M4N4U1S1.i32(i32 -2147483636, i32 6) ; LinAlgFillMatrix(value) |
| 19 | + %6 = call %dx.types.LinAlgMatrixC8M8N8U0S2 @dx.op.linAlgFillMatrix.mC8M8N8U0S2.i32(i32 -2147483636, i32 7) ; LinAlgFillMatrix(value) |
| 20 | + |
| 21 | + ; CHECK: Function: main: error: Matrix 'dx.types.LinAlgMatrixC8M4N4U2S2' must exactly match matrix 'dx.types.LinAlgMatrixC8M4N4U0S2'. |
| 22 | + ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U0S2.mC8M4N4U0S2 |
| 23 | + %7 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U0S2.mC8M4N4U0S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U0S2 %2, %dx.types.LinAlgMatrixC8M4N4U0S2 %2) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS) |
| 24 | + |
| 25 | + ; CHECK-NEXT: Function: main: error: Matrix Use 'A' does not match expected use Accumulator. |
| 26 | + ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U0S2.mC8M4N4U0S2.mC8M4N4U0S2 |
| 27 | + %8 = call %dx.types.LinAlgMatrixC8M4N4U0S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U0S2.mC8M4N4U0S2.mC8M4N4U0S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U0S2 %2, %dx.types.LinAlgMatrixC8M4N4U0S2 %2) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS) |
| 28 | + |
| 29 | + ; CHECK-NEXT: Function: main: error: Matrix Use 'Accumulator' does not match expected use A or B. |
| 30 | + ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U2S2 |
| 31 | + %9 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U2S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S2 %1, %dx.types.LinAlgMatrixC8M4N4U2S2 %1) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS) |
| 32 | + |
| 33 | + ; CHECK-NEXT: Function: main: error: Matrix Scope 'Wave' does not match expected scope ThreadGroup. |
| 34 | + ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U1S1 |
| 35 | + %10 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U1S1(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S2 %1, %dx.types.LinAlgMatrixC8M4N4U1S1 %5) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS) |
| 36 | + |
| 37 | + ; CHECK-NEXT: Function: main: error: Matrix Scope 'Thread' not allowed in LinAlgMatrixAccumulate operation. |
| 38 | + ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S0.mC8M4N4U2S0.mC8M4N4U1S0 |
| 39 | + %11 = call %dx.types.LinAlgMatrixC8M4N4U2S0 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S0.mC8M4N4U2S0.mC8M4N4U1S0(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S0 %3, %dx.types.LinAlgMatrixC8M4N4U1S0 %4) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS) |
| 40 | + |
| 41 | + ; CHECK-NEXT: Function: main: error: Matrix Dimension '8x8' does not match expected dimension 4x4. |
| 42 | + ; CHECK-NEXT: note: at {{.*}} @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M8N8U0S2 |
| 43 | + %12 = call %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M8N8U0S2(i32 -2147483624, %dx.types.LinAlgMatrixC8M4N4U2S2 %1, %dx.types.LinAlgMatrixC8M8N8U0S2 %6) ; LinAlgMatrixAccumulate(matrixLHS,matrixRHS) |
| 44 | + |
| 45 | + ; CHECK-NEXT: Validation failed |
| 46 | + |
| 47 | + ret void |
| 48 | +} |
| 49 | + |
| 50 | +; Function Attrs: nounwind |
| 51 | +declare %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgFillMatrix.mC8M4N4U2S2.i32(i32, i32) #0 |
| 52 | + |
| 53 | +; Function Attrs: nounwind |
| 54 | +declare %dx.types.LinAlgMatrixC8M4N4U0S2 @dx.op.linAlgFillMatrix.mC8M4N4U0S2.i32(i32, i32) #0 |
| 55 | + |
| 56 | +; Function Attrs: nounwind |
| 57 | +declare %dx.types.LinAlgMatrixC8M4N4U2S0 @dx.op.linAlgFillMatrix.mC8M4N4U2S0.i32(i32, i32) #0 |
| 58 | + |
| 59 | +; Function Attrs: nounwind |
| 60 | +declare %dx.types.LinAlgMatrixC8M4N4U1S0 @dx.op.linAlgFillMatrix.mC8M4N4U1S0.i32(i32, i32) #0 |
| 61 | + |
| 62 | +; Function Attrs: nounwind |
| 63 | +declare %dx.types.LinAlgMatrixC8M4N4U1S1 @dx.op.linAlgFillMatrix.mC8M4N4U1S1.i32(i32, i32) #0 |
| 64 | + |
| 65 | +; Function Attrs: nounwind |
| 66 | +declare %dx.types.LinAlgMatrixC8M8N8U0S2 @dx.op.linAlgFillMatrix.mC8M8N8U0S2.i32(i32, i32) #0 |
| 67 | + |
| 68 | +; Function Attrs: nounwind |
| 69 | +declare %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U0S2.mC8M4N4U0S2(i32, %dx.types.LinAlgMatrixC8M4N4U0S2, %dx.types.LinAlgMatrixC8M4N4U0S2) #0 |
| 70 | + |
| 71 | +; Function Attrs: nounwind |
| 72 | +declare %dx.types.LinAlgMatrixC8M4N4U0S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U0S2.mC8M4N4U0S2.mC8M4N4U0S2(i32, %dx.types.LinAlgMatrixC8M4N4U0S2, %dx.types.LinAlgMatrixC8M4N4U0S2) #0 |
| 73 | + |
| 74 | +; Function Attrs: nounwind |
| 75 | +declare %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U2S2(i32, %dx.types.LinAlgMatrixC8M4N4U2S2, %dx.types.LinAlgMatrixC8M4N4U2S2) #0 |
| 76 | + |
| 77 | +; Function Attrs: nounwind |
| 78 | +declare %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M4N4U1S1(i32, %dx.types.LinAlgMatrixC8M4N4U2S2, %dx.types.LinAlgMatrixC8M4N4U1S1) #0 |
| 79 | + |
| 80 | +; Function Attrs: nounwind |
| 81 | +declare %dx.types.LinAlgMatrixC8M4N4U2S0 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S0.mC8M4N4U2S0.mC8M4N4U1S0(i32, %dx.types.LinAlgMatrixC8M4N4U2S0, %dx.types.LinAlgMatrixC8M4N4U1S0) #0 |
| 82 | + |
| 83 | +; Function Attrs: nounwind |
| 84 | +declare %dx.types.LinAlgMatrixC8M4N4U2S2 @dx.op.linAlgMatrixAccumulate.mC8M4N4U2S2.mC8M4N4U2S2.mC8M8N8U0S2(i32, %dx.types.LinAlgMatrixC8M4N4U2S2, %dx.types.LinAlgMatrixC8M8N8U0S2) #0 |
| 85 | + |
| 86 | +attributes #0 = { nounwind } |
| 87 | + |
| 88 | +!dx.targetTypes = !{!0, !1, !2, !3, !4, !5} |
| 89 | +!llvm.ident = !{!6} |
| 90 | +!dx.version = !{!7} |
| 91 | +!dx.valver = !{!7} |
| 92 | +!dx.shaderModel = !{!8} |
| 93 | +!dx.entryPoints = !{!9} |
| 94 | + |
| 95 | +!0 = !{%dx.types.LinAlgMatrixC8M4N4U2S2 undef, i32 8, i32 4, i32 4, i32 2, i32 2} |
| 96 | +!1 = !{%dx.types.LinAlgMatrixC8M4N4U0S2 undef, i32 8, i32 4, i32 4, i32 0, i32 2} |
| 97 | +!2 = !{%dx.types.LinAlgMatrixC8M4N4U2S0 undef, i32 8, i32 4, i32 4, i32 2, i32 0} |
| 98 | +!3 = !{%dx.types.LinAlgMatrixC8M4N4U1S0 undef, i32 8, i32 4, i32 4, i32 1, i32 0} |
| 99 | +!4 = !{%dx.types.LinAlgMatrixC8M4N4U1S1 undef, i32 8, i32 4, i32 4, i32 1, i32 1} |
| 100 | +!5 = !{%dx.types.LinAlgMatrixC8M8N8U0S2 undef, i32 8, i32 8, i32 8, i32 0, i32 2} |
| 101 | +!6 = !{!"dxc(private) 1.9.0.5391 (linalg-validation-copyconvert, 977f44792-dirty)"} |
| 102 | +!7 = !{i32 1, i32 10} |
| 103 | +!8 = !{!"cs", i32 6, i32 10} |
| 104 | +!9 = !{void ()* @main, !"main", null, null, !10} |
| 105 | +!10 = !{i32 4, !11} |
| 106 | +!11 = !{i32 1, i32 1, i32 1} |
0 commit comments