Skip to content

Commit 638c4f1

Browse files
committed
apply suggestion
Signed-off-by: Sidorov, Dmitry <[email protected]>
1 parent 1df3121 commit 638c4f1

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

lib/SPIRV/libSPIRV/SPIRVInstruction.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3346,7 +3346,7 @@ class SPIRVBfloat16ConversionINTELInstBase : public SPIRVUnaryInst<OC> {
33463346
"cooperative matrices only when SPV_INTEL_joint_matrix is "
33473347
"enabled\n");
33483348
assert(InCompTy->isTypeCooperativeMatrixKHR() &&
3349-
"Input must also be a matrix");
3349+
"Input must also be a cooperative matrix");
33503350
ResCompTy = static_cast<SPIRVTypeCooperativeMatrixKHR *>(ResCompTy)
33513351
->getCompType();
33523352
InCompTy =
@@ -3755,7 +3755,7 @@ class SPIRVTensorFloat32RoundingINTELInstBase : public SPIRVUnaryInst<OC> {
37553755
"cooperative matrices only when SPV_INTEL_joint_matrix is "
37563756
"enabled\n");
37573757
assert(InCompTy->isTypeCooperativeMatrixKHR() &&
3758-
"Input must also be a matrix");
3758+
"Input must also be a cooperative matrix");
37593759
ResCompTy = static_cast<SPIRVTypeCooperativeMatrixKHR *>(ResCompTy)
37603760
->getCompType();
37613761
InCompTy =

test/extensions/INTEL/SPV_INTEL_joint_matrix/bf16_conversion_instructions.ll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@
99
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc --spirv-target-env=SPV-IR
1010
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-SPV-IR
1111

12+
; RUN: not llvm-spirv %t.bc --spirv-ext=+SPV_KHR_cooperative_matrix,+SPV_INTEL_bfloat16_conversion 2>&1 \
13+
; RUN: | FileCheck %s --check-prefix=CHECK-ERROR
14+
15+
; CHECK-ERROR: InvalidInstruction: Can't translate llvm instruction:
16+
; CHECK-ERROR-NEXT: ConvertFToBF16INTEL
17+
; CHECK-ERROR-NEXT: Can be used with cooperative matrices only when SPV_INTEL_joint_matrix is enabled
18+
1219
; CHECK-SPIRV-DAG: Capability CooperativeMatrixKHR
1320
; CHECK-SPIRV-DAG: Capability Bfloat16ConversionINTEL
1421
; CHECK-SPIRV-DAG: Capability JointMatrixBF16ComponentTypeINTEL

test/extensions/INTEL/SPV_INTEL_joint_matrix/tf32_conversion_instructions.ll

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@
66
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
77
; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
88

9+
; RUN: not llvm-spirv %t.bc --spirv-ext=+SPV_KHR_cooperative_matrix,+SPV_INTEL_tensor_float32_conversion 2>&1 \
10+
; RUN: | FileCheck %s --check-prefix=CHECK-ERROR
11+
12+
; CHECK-ERROR: InvalidInstruction: Can't translate llvm instruction:
13+
; CHECK-ERROR-NEXT: RoundFToTF32INTEL
14+
; CHECK-ERROR-NEXT: Can be used with cooperative matrices only when SPV_INTEL_joint_matrix is enabled
15+
916
; CHECK-SPIRV-DAG: Capability CooperativeMatrixKHR
1017
; CHECK-SPIRV-DAG: Capability TensorFloat32RoundingINTEL
1118
; CHECK-SPIRV-DAG: Capability JointMatrixTF32ComponentTypeINTEL

0 commit comments

Comments
 (0)