Currently an OpenCL 3.0 device with CL_DEVICE_COMPILER_AVAILABLE set to CL_FALSE that reports "SPIR-V_1.0" for CL_DEVICE_IL_VERSION can not pass test_spirv_new as:
When running test_spirv_new directly it attempts to use clBuildProgram (I think all the tests should just SKIP in this case).
When passing --compilation-mode binary to test_spirv_new it does not use the same offline compiler script as the rest of the CTS.
Said offline compiler script specification states that the input is OpenCL C. Changing this specification may be disruptive to implementations that support SPIR-V (or they may all already support this, I don't know).
A workaround is for such a device to just report "" for CL_DEVICE_IL_VERSION as the utility of supporting SPIR-V without a compiler is low (but doing so is consistent with OpenCL C, where clCreateProgramWithSource works even if CL_DEVICE_COMPILER_AVAILABLE is CL_FALSE).
I have NOT put this in the 3.0 project due to the potential disruption is point 3. above, and the availability of a workaround. If someone thinks otherwise then please add this to the 3.0 project.
Currently an OpenCL 3.0 device with
CL_DEVICE_COMPILER_AVAILABLE
set toCL_FALSE
that reports"SPIR-V_1.0"
forCL_DEVICE_IL_VERSION
can not passtest_spirv_new
as:test_spirv_new
directly it attempts to useclBuildProgram
(I think all the tests should just SKIP in this case).--compilation-mode binary
totest_spirv_new
it does not use the same offline compiler script as the rest of the CTS.A workaround is for such a device to just report
""
forCL_DEVICE_IL_VERSION
as the utility of supporting SPIR-V without a compiler is low (but doing so is consistent with OpenCL C, whereclCreateProgramWithSource
works even ifCL_DEVICE_COMPILER_AVAILABLE
isCL_FALSE
).