-
Notifications
You must be signed in to change notification settings - Fork 797
Description
Describe the bug
sycl-ls
brings inconsistent results (using different release of libsycl.so.8
). It fails to recognize my HD Graphics 620 capabilities.
In some cases it detects the device as a SYCL usable GPU but in some others, it doesn't.
In all of the below attempts, the sycl-ls
binary tested below comes from https://github.com/intel/llvm/releases/download/nightly-2024-06-03/sycl_linux.tar.gz
Testing libsycl.so.8.0.0-0 from nightly-2024-06-03
$ ls -lh libsycl.so.8.0.0-0
5,4M june 3 2024 libsycl.so.8.0.0-0
$ LD_LIBRARY_PATH=/tmp/nightly-2024-06-03... sycl-ls
[opencl:cpu][opencl:0] Portable Computing Language, cpu-haswell-Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 PoCL HSTR: cpu-x86_64-pc-linux-gnu-haswell [5.0+debian]
[opencl:cpu][opencl:1] Intel(R) OpenCL, Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 (Build 0) [2025.20.6.0.04_224945]
[cuda:gpu][cuda:0] NVIDIA CUDA BACKEND, NVIDIA GeForce 940MX 5.0 [CUDA 12.2]
$ strace -e trace=openat sycl-ls 2>&1|grep libsycl.so|grep -v ENOENT
openat(AT_FDCWD, "/nightly-2024-06-03.../libsycl.so.8", O_RDONLY|O_CLOEXEC) = 3
Result:
The iGPU is wrongly seen as a CPU. The additional GeForce is found.
Using 2025 intel-oneapi-*
.deb packages
Installing intel-oneapi-common-var
and intel-oneapi-compiler-dpcpp-cpp-runtime-2025.2
(among 5+GB of packages)
$ ls -lh /opt/intel/oneapi/compiler/2025.2/lib/
12M juin 4 23:55 /opt/intel/oneapi/compiler/2025.2/lib/libsycl.so.8.0.0
(This newer libsycl is twice the size)
$ . /opt/intel/oneapi/setvars.sh
$ sycl-ls
[opencl:gpu][opencl:0] Intel(R) OpenCL, Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 (Build 0) [2025.20.6.0.04_224945]
strace excerpt.
(openat(AT_FDCWD, "/opt/intel/oneapi/compiler/2025.2/lib/libsycl.so.8", O_RDONLY|O_CLOEXEC) = 3)
Result
The Intel HD Graphics 620 is correctly identified as a GPU (no trace of GeForce). It's better, but still a bit weird
But it's more tricky than that.
I went on and compiled some code using Platform.get_backend()
modeled after original source code :
$ /opt/intel/oneapi/compiler/2025.2/bin/icpx -I/opt/intel/oneapi/compiler/2025.2/include -fsycl -ggdb -O0 test.cpp
and this are the results:
using nightly-2024-06-03's libsycl.so.8
[opencl:unknown][opencl:0] Intel(R) OpenCL, Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 (Build 0) [2025.20.6.0.04_224945]
[opencl:unknown][opencl:1] Portable Computing Language, cpu-haswell-Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 PoCL HSTR: cpu-x86_64-pc-linux-gnu-haswell [5.0+debian]
(no GeForce, "unknown" Intel devices)
and using the regular 2025.2 library:
[opencl:cpu][opencl:0] Intel(R) OpenCL, Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 (Build 0) [2025.20.6.0.04_224945]
(HD Graphics 620 found as CPU)
What's going on ?
To reproduce
Environment
- OS: Ubuntu 24.04
- Target device and vendor: HD Graphics 620
- DPC++ version: Intel(R) oneAPI DPC++/C++ Compiler 2025.2.0 (2025.2.0.20250605)
sycl-ls --verbose
Platforms: 3
Platform [#1]:
Version : OpenCL 3.0 LINUX
Name : Intel(R) OpenCL
Vendor : Intel(R) Corporation
Devices : 1
Device [#0]:
Type : cpu
Version : OpenCL 3.0 (Build 0)
Name : Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Vendor : Intel(R) Corporation
Driver : 2025.20.6.0.04_224945
Aspects : cpu fp16 fp64 online_compiler online_linker queue_profiling usm_device_allocations usm_host_allocations usm_shared_allocations usm_system_allocations usm_atomic_host_allocations usm_atomic_shared_allocations atomic64 ext_intel_device_info_uuid ext_oneapi_srgb ext_oneapi_native_assert ext_intel_legacy_image ext_oneapi_ballot_group ext_oneapi_fixed_size_group ext_oneapi_opportunistic_group ext_oneapi_tangle_group ext_oneapi_limited_graph ext_oneapi_private_alloca
info::device::sub_group_sizes: 4 8 16 32 64
Platform [#2]:
Version : OpenCL 3.0 PoCL 5.0+debian Linux, None+Asserts, RELOC, SPIR, LLVM 16.0.6, SLEEF, DISTRO, POCL_DEBUG
Name : Portable Computing Language
Vendor : The pocl project
Devices : 1
Device [#1]:
Type : cpu
Version : OpenCL 3.0 PoCL HSTR: cpu-x86_64-pc-linux-gnu-haswell
Name : cpu-haswell-Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Vendor : GenuineIntel
Driver : 5.0+debian
Aspects : cpu fp64 online_compiler online_linker queue_profiling usm_device_allocations usm_host_allocations usm_shared_allocations atomic64 ext_oneapi_srgb ext_intel_legacy_image ext_oneapi_ballot_group ext_oneapi_fixed_size_group ext_oneapi_opportunistic_group ext_oneapi_tangle_group ext_oneapi_limited_graph ext_oneapi_private_alloca
info::device::sub_group_sizes: 1 2 4 8 16 32 64 128 256 512
# unrelated
Platform [#3]:
Version : CUDA 12.2
Name : NVIDIA CUDA BACKEND
Vendor : NVIDIA Corporation
Devices : 1
Device [#0]:
Type : gpu
Version : 5.0
Name : NVIDIA GeForce 940MX
Vendor : NVIDIA Corporation
Driver : CUDA 12.2
Aspects : gpu fp64 online_compiler online_linker queue_profiling usm_device_allocations usm_host_allocations usm_shared_allocations ext_intel_pci_address ext_intel_device_info_uuid ext_intel_free_memory ext_intel_device_id ext_intel_memory_clock_rate ext_intel_memory_bus_widthImages are not fully supported by the CUDA BE, their support is disabled by default. Their partial support can be activated by setting SYCL_PI_CUDA_ENABLE_IMAGE_SUPPORT environment variable at runtime.
ext_oneapi_bindless_images ext_oneapi_bindless_images_shared_usm ext_oneapi_bindless_images_2d_usm ext_oneapi_interop_memory_import ext_oneapi_interop_semaphore_import ext_oneapi_mipmap ext_oneapi_mipmap_anisotropy ext_oneapi_mipmap_level_reference ext_oneapi_ballot_group ext_oneapi_fixed_size_group ext_oneapi_opportunistic_group ext_oneapi_graph ext_oneapi_limited_graph ext_oneapi_cubemap ext_oneapi_cubemap_seamless_filtering ext_oneapi_bindless_sampled_image_fetch_1d_usm ext_oneapi_bindless_sampled_image_fetch_2d_usm ext_oneapi_bindless_sampled_image_fetch_2d ext_oneapi_bindless_sampled_image_fetch_3d ext_oneapi_queue_profiling_tag
info::device::sub_group_sizes: 32
default_selector() : gpu, NVIDIA CUDA BACKEND, NVIDIA GeForce 940MX 5.0 [CUDA 12.2]
accelerator_selector() : No device of requested type available. -1 (PI_ERRO...
cpu_selector() : cpu, Intel(R) OpenCL, Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 (Build 0) [2025.20.6.0.04_224945]
gpu_selector() : gpu, NVIDIA CUDA BACKEND, NVIDIA GeForce 940MX 5.0 [CUDA 12.2]
custom_selector(gpu) : gpu, NVIDIA CUDA BACKEND, NVIDIA GeForce 940MX 5.0 [CUDA 12.2]
custom_selector(cpu) : cpu, Intel(R) OpenCL, Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz OpenCL 3.0 (Build 0) [2025.20.6.0.04_224945]
custom_selector(acc) : No device of requested type available. -1 (PI_ERRO...
Additional context
Trying to compile llama.cpp SYCL backend and have it recognize and use my GPU (ggml-org/llama.cpp#10929 (comment))