[SYCL] Implement native_specialization_constant()#8613
Conversation
native_specialization_constant() returns true only in JIT mode on opencl & level-zero backends (because only SPIR-V supports them)
|
/verify with intel/llvm-test-suite#1651 |
|
Infrastructure problem on OpenCL backend. |
I would prefer the team to fix the infrastructure problem and pass all tests "on OpenCL backend" before merging. This patch potentially can introduce a regression, which pre-commit didn't catch due to "Infrastructure problem". |
Are we supposed to report this kind of issues to Tools team or do we have to fix them ourselves? |
|
AFAIK, Tools team responsible for Jenkins system only. |
| return !IsAOTBinary(MBinImage->getRawData().DeviceTargetSpec) && | ||
| (MContext.get_backend() == backend::opencl || | ||
| MContext.get_backend() == backend::ext_oneapi_level_zero); |
There was a problem hiding this comment.
Those checks should be re-ordered: we should do less expensive backend checks first and only then do more expensive string comparison checks.
| return ( | ||
| (strcmp(Format, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_X86_64) == | ||
| 0) || | ||
| (strcmp(Format, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_GEN) == 0) || | ||
| (strcmp(Format, __SYCL_PI_DEVICE_BINARY_TARGET_SPIRV64_FPGA) == 0)); |
There was a problem hiding this comment.
Can we instead do something like Format != JIT SPIR TARGET? I understand that it might be more tricky, because that target string is probably a substring of AOT targets, but it should allow us to do less string comparisons.
|
@AlexeySachkov okay, I'll make a follow-up patch |
To apply comments from: #8613
native_specialization_constant() returns true only in JIT mode on opencl & level-zero backends (because only SPIR-V supports them)