-
Notifications
You must be signed in to change notification settings - Fork 744
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
[SYCL] Implement native_specialization_constant() #8613
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)