[SPIRV] Avoid OpQuantizeToF16 in SPIR-V kernel test#158086
Conversation
|
@llvm/pr-subscribers-backend-spir-v Author: None (YixingZhang007) ChangesFull diff: https://github.com/llvm/llvm-project/pull/158086.diff 1 Files Affected:
diff --git a/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll b/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll
index 6a4b4f593bf3b..667c8adfdba4b 100644
--- a/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll
+++ b/llvm/test/CodeGen/SPIRV/instructions/integer-casts.ll
@@ -258,7 +258,6 @@ define <4 x i32> @u16tou32v4(<4 x i16> %a) {
; CHECK: %[[#]] = OpUConvert [[U32]] %[[#]]
; CHECK: %[[#]] = OpSConvert [[U32]] %[[#]]
; CHECK: %[[#]] = OpFConvert [[F16]] %[[#]]
-; CHECK: %[[#]] = OpQuantizeToF16 [[F32]] %[[#]]
; CHECK: %[[#]] = OpSatConvertSToU [[U64]] %[[#]]
; CHECK: %[[#]] = OpSatConvertUToS [[U64]] %[[#]]
; CHECK: %[[#]] = OpConvertPtrToU [[U64]] [[Arg1]]
@@ -281,7 +280,6 @@ define dso_local spir_kernel void @test_wrappers(ptr addrspace(4) %arg, i64 %arg
%r5 = call spir_func i32 @__spirv_UConvert(i64 1)
%r6 = call spir_func i32 @__spirv_SConvert(i64 1)
%r7 = call spir_func half @__spirv_FConvert(float 0.000000e+00)
- %r8 = call spir_func float @__spirv_QuantizeToF16(float 0.000000e+00)
%r9 = call spir_func i64 @__spirv_SatConvertSToU(i64 1)
%r10 = call spir_func i64 @__spirv_SatConvertUToS(i64 1)
%r11 = call spir_func i64 @__spirv_ConvertPtrToU(ptr addrspace(4) %arg)
@@ -305,7 +303,6 @@ declare dso_local spir_func float @__spirv_ConvertUToF(i32)
declare dso_local spir_func i32 @__spirv_UConvert(i64)
declare dso_local spir_func i32 @__spirv_SConvert(i64)
declare dso_local spir_func half @__spirv_FConvert(float)
-declare dso_local spir_func float @__spirv_QuantizeToF16(float)
declare dso_local spir_func i64 @__spirv_SatConvertSToU(i64)
declare dso_local spir_func i64 @__spirv_SatConvertUToS(i64)
declare dso_local spir_func i64 @__spirv_ConvertPtrToU(ptr addrspace(4))
|
|
After this change, we no longer have test coverage for |
7a3ffff to
a5046dc
Compare
ce5642c to
ae9c07a
Compare
maarquitos14
left a comment
There was a problem hiding this comment.
LGTM. Can we spin off the OpQuantizeToF16 test to a new test and mark as xfail/unsupported, so we don't reduce test coverage?
Thanks for the suggestion! I have added the test for OpQuantizeToF16 in quantizeto16.ll and marked it as XFAIL. |
This PR resolves the current failure in the `integer-casts.ll` SPIR-V test during CI runs in `llvm-project`. The failure occurs because the SPIR-V instruction `OpQuantizeToF16` requires the `Capability::Shader`. However, the function in `integer-casts.ll` is written as a kernel function and executed in a kernel environment. Therefore, `Capability::Kernel` is emitted instead of `Capability::Shader`. To fix this, we remove the `QuantizeToF16` test from`integer-casts.ll` in this PR.
This PR resolves the current failure in the
integer-casts.llSPIR-V test during CI runs inllvm-project.The failure occurs because the SPIR-V instruction
OpQuantizeToF16requires theCapability::Shader. However, the function ininteger-casts.llis written as a kernel function and executed in a kernel environment. Therefore,Capability::Kernelis emitted instead ofCapability::Shader. To fix this, we remove theQuantizeToF16test frominteger-casts.llin this PR.