Skip to content

Commit d369a07

Browse files
authored
Use a generic OpenCL ICD loader. (#417)
1 parent 7973a89 commit d369a07

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/oneAPI.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,14 @@ function __init__()
8484
For the time being, it is recommended to use WSL or Linux instead."""
8585
end
8686

87-
if Sys.islinux()
88-
# ensure that the OpenCL runtime dispatcher finds the ICD files from our artifacts
89-
ENV["OCL_ICD_VENDORS"] = oneL0.NEO_jll.libigdrcl
87+
if oneL0.NEO_jll.is_available()
88+
# ensure that the OpenCL loader finds the ICD files from our artifacts
89+
ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl
9090
end
91+
92+
# XXX: work around an issue with SYCL/Level Zero interoperability
93+
# (see JuliaGPU/oneAPI.jl#417)
94+
ENV["SYCL_PI_LEVEL_ZERO_BATCH_SIZE"] = "1"
9195
end
9296

9397
function set_debug!(debug::Bool)

0 commit comments

Comments
 (0)