-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[SPIRV] Avoid OpQuantizeToF16 in SPIR-V kernel test #158086
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.ll
SPIR-V test during CI runs inllvm-project
.The failure occurs because the SPIR-V instruction
OpQuantizeToF16
requires theCapability::Shader
. However, the function ininteger-casts.ll
is written as a kernel function and executed in a kernel environment. Therefore,Capability::Kernel
is emitted instead ofCapability::Shader
. To fix this, we remove theQuantizeToF16
test frominteger-casts.ll
in this PR.