Remove CL_DEVICE_HALF_FP_CONFIG when cl_khr_fp16 is not supported (#2354)

Specification does not require to return an error when querying
CL_DEVICE_HALF_FP_CONFIG and cl_khr_fp16 is not supported.

Fix #2339
This commit is contained in:
Romaric Jodin
2025-05-06 18:33:34 +02:00
committed by GitHub
parent 9917ed2790
commit 3f7889bdbd

View File

@@ -1243,13 +1243,6 @@ REGISTER_TEST(consistency_requirements_fp16)
}
else
{
error = clGetDeviceInfo(device, CL_DEVICE_HALF_FP_CONFIG, sizeof(value),
&value, nullptr);
test_failure_error(
error, CL_INVALID_VALUE,
"cl_khr_fp16 is not available; CL_DEVICE_HALF_FP_CONFIG must fail "
"with CL_INVALID_VALUE");
error = clGetDeviceInfo(device, CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF,
sizeof(value), &value, nullptr);
test_error(