Hello! I would like to use some experimental SYCL features so I downloaded a recent nightly (sycl_linux.tar.gz) from Releases · intel/llvm · GitHub (tried with a few recent ones).
I would like to run on the CPU, but it is never found via LD_LIBRARY_PATH=/path-to/sycl/lib /path-to/sycl/bin/sycl-ls
. More precisely I see only:
[opencl:gpu][opencl:0] Intel(R) OpenCL HD Graphics, Intel(R) UHD Graphics 730 [0x4c8b] OpenCL 3.0 NEO [22.28.23726.1]
More verbosely (LD_LIBRARY_PATH=/path-to/sycl/lib SYCL_PI_TRACE=-1 /path-to/sycl/bin/sycl-ls 1>/dev/null)
, my output is:
LD_LIBRARY_PATH=/path-to/sycl/lib /path-to/sycl/bin/sycl-ls
SYCL_PI_TRACE[-1]: dlopen(/path-to/sycl/lib/libpi_level_zero.so) failed with </path-to/sycl/lib/libpi_level_zero.so: undefined symbol: zeImageViewCreateExt>
SYCL_PI_TRACE[-1]: dlopen(/path-to/sycl/lib/libpi_cuda.so) failed with <libcuda.so.1: cannot open shared object file: No such file or directory>
SYCL_PI_TRACE[-1]: dlopen(/path-to/sycl/lib/libpi_hip.so) failed with <libamdhip64.so.6: cannot open shared object file: No such file or directory>
SYCL_PI_TRACE[-1]: dlopen(/path-to/sycl/lib/libpi_native_cpu.so) failed with </path-to/sycl/lib/libpi_native_cpu.so: cannot open shared object file: No such file or directory>
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_opencl.so [ PluginVersion: 15.51.1 ]
SYCL_PI_TRACE[all]: Check if plugin is present. Failed to load plugin: libpi_level_zero.so
SYCL_PI_TRACE[all]: Check if plugin is present. Failed to load plugin: libpi_cuda.so
SYCL_PI_TRACE[all]: Check if plugin is present. Failed to load plugin: libpi_hip.so
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_unified_runtime.so [ PluginVersion: 15.51.1 ]
SYCL_PI_TRACE[all]: Check if plugin is present. Failed to load plugin: libpi_native_cpu.so
I am speculating it has to do with libpi_level_zero, as I installed it with sudo apt-get install intel-level-zero-gpu level-zero
(as per Level Zero — Intel® software for general purpose GPU capabilities documentation). Previously I was seeing:
SYCL_PI_TRACE[-1]: dlopen(/path-to/sycl/lib/libpi_level_zero.so) failed with <libze_loader.so.1: cannot open shared object file: No such file or directory>
instead of
LD_LIBRARY_PATH=/path-to/sycl/lib /path-to/sycl/bin/sycl-ls SYCL_PI_TRACE[-1]: dlopen(/path-to/sycl/lib/libpi_level_zero.so) failed with </path-to/sycl/lib/libpi_level_zero.so: undefined symbol: zeImageViewCreateExt>
And everything else was the same.
After installing level zero, I tried trivial things as (sudo) ldconfig, apt update, apt upgrade but nothing made a difference.
Orthogonally, I have the intel toolkits and I can sycl-ls
which would correctly display:
[opencl:acc:0] Intel(R) FPGA Emulation Platform for OpenCL(TM), Intel(R) FPGA Emulation Device 1.2 [2023.16.6.0.22_223734]
[opencl:cpu:1] Intel(R) OpenCL, 11th Gen Intel(R) Core(TM) i5-11400 @ 2.60GHz 3.0 [2023.16.6.0.22_223734]
[opencl:gpu:2] Intel(R) OpenCL HD Graphics, Intel(R) UHD Graphics 730 [0x4c8b] 3.0 [22.28.23726.1]
[ext_oneapi_level_zero:gpu:0] Intel(R) Level-Zero, Intel(R) UHD Graphics 730 [0x4c8b] 1.3 [1.3.23726]
And then being more specific:
SYCL_PI_TRACE=-1 sycl-ls 1>/dev/null
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_opencl.so [ PluginVersion: 12.27.1 ]
SYCL_PI_TRACE[basic]: Plugin found and successfully loaded: libpi_level_zero.so [ PluginVersion: 12.27.1 ]
SYCL_PI_TRACE[-1]: dlopen(/opt/intel/oneapi/compiler/2023.2.0/linux/lib/libpi_cuda.so) failed with </opt/intel/oneapi/compiler/2023.2.0/linux/lib/libpi_cuda.so: cannot open shared object file: No such file or directory>
SYCL_PI_TRACE[all]: Check if plugin is present. Failed to load plugin: libpi_cuda.so
SYCL_PI_TRACE[-1]: dlopen(/opt/intel/oneapi/compiler/2023.2.0/linux/lib/libpi_hip.so) failed with </opt/intel/oneapi/compiler/2023.2.0/linux/lib/libpi_hip.so: cannot open shared object file: No such file or directory>
SYCL_PI_TRACE[all]: Check if plugin is present. Failed to load plugin: libpi_hip.so
There are still some (I believe) expected errors, as I have no cuda or hip backend, but the level zero is successfully found in the intel tools case. So I believe issue has to do with it.
In any case, how can I teach SYCL from nightly recognize my CPU (and my other devices)?