Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[SYCL] UR enum values are already typed, avoid explicit casts #18287

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

Merged
merged 4 commits into from
May 2, 2025

Conversation

aelovikov-intel
Copy link
Contributor

@aelovikov-intel aelovikov-intel commented May 1, 2025

Apparently, get_info<info::device::opencl_c_version> was returning garbage because its UrCode is __SYCL_TRAIT_HANDLED_IN_RT while no special handling was in fact done for it. Since it's deprecated anyway I'm not trying to fix that but just throw an exception instead.

Before this change:

$ llvm-lit -a Basic/info.cpp  2>&1 | grep 'OpenCL C version:'
# | OpenCL C version: ^C
# | OpenCL C version: ^D
# | OpenCL C version: ^E
# | OpenCL C version: ^C
$ sycl-ls
[level_zero:gpu][level_zero:0] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Data Center GPU Max 1550 12.60.7 [1.6.31294.120000]
[level_zero:gpu][level_zero:1] Intel(R) oneAPI Unified Runtime over Level-Zero, Intel(R) Data Center GPU Max 1550 12.60.7 [1.6.31294.120000]
[opencl:fpga][opencl:0] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device OpenCL 1.2  [2024.18.10.0.08_160000]
[opencl:cpu][opencl:1] Intel(R) OpenCL, Genuine Intel(R) CPU 0000%@ OpenCL 3.0 (Build 0) [2024.18.10.0.08_160000]
[opencl:gpu][opencl:2] Intel(R) OpenCL Graphics, Intel(R) Data Center GPU Max 1550 OpenCL 3.0 NEO  [24.39.31294.12]
[opencl:gpu][opencl:3] Intel(R) OpenCL Graphics, Intel(R) Data Center GPU Max 1550 OpenCL 3.0 NEO  [24.39.31294.12]

Apparently, `get_info<info::device::opencl_c_version>` was returning
garbage because its `UrCode` is `__SYCL_TRAIT_HANDLED_IN_RT` while no
special handling was in fact done for it. Since it's deprecated anyway
I'm not trying to fix that but just throw an exception instead.
@aelovikov-intel aelovikov-intel requested a review from a team as a code owner May 1, 2025 15:42
@aelovikov-intel aelovikov-intel requested a review from a team May 1, 2025 15:43
@aelovikov-intel aelovikov-intel marked this pull request as draft May 1, 2025 16:16
@aelovikov-intel aelovikov-intel marked this pull request as ready for review May 1, 2025 18:57
@aelovikov-intel
Copy link
Contributor Author

@uditagarwal97 , ping.

@aelovikov-intel aelovikov-intel merged commit 53fced1 into intel:sycl May 2, 2025
37 of 38 checks passed
@aelovikov-intel aelovikov-intel deleted the ur-code branch May 2, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants