Skip to content

Commit b1cef36

Browse files
committed
NEO link fix
1 parent a9e4ae7 commit b1cef36

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/oneAPI.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,15 @@ function __init__()
8888
else
8989
# ensure that the OpenCL loader finds the ICD files from our artifacts
9090
ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl
91+
92+
# ensure that libsycl's bundled ze_lib finds NEO's libze_intel_gpu via
93+
# path-based driver discovery (it does not reuse the JLL-loaded module).
94+
# Required when no system NEO is installed.
95+
neo_libdir = dirname(oneL0.NEO_jll.libze_intel_gpu)
96+
ld = get(ENV, "LD_LIBRARY_PATH", "")
97+
if !occursin(neo_libdir, ld)
98+
ENV["LD_LIBRARY_PATH"] = isempty(ld) ? neo_libdir : "$neo_libdir:$ld"
99+
end
91100
end
92101

93102
# XXX: work around an issue with SYCL/Level Zero interoperability

0 commit comments

Comments
 (0)