Skip to content

Commit 3724302

Browse files
committed
Make package loadable on macOS
1 parent 32b77c6 commit 3724302

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "oneAPI"
22
uuid = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b"
33
authors = ["Tim Besard <tim.besard@gmail.com>"]
4-
version = "2.0.1"
4+
version = "2.0.2"
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"

src/oneAPI.jl

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,20 @@ function __init__()
7373
precompiling = ccall(:jl_generating_output, Cint, ()) != 0
7474
precompiling && return
7575

76-
if Sys.iswindows()
77-
@warn """oneAPI.jl support for native Windows is experimental and incomplete.
76+
if oneL0.NEO_jll.is_available() && oneL0.functional[]
77+
if Sys.iswindows()
78+
@warn """oneAPI.jl support for native Windows is experimental and incomplete.
7879
For the time being, it is recommended to use WSL or Linux instead."""
79-
else
80-
# ensure that the OpenCL loader finds the ICD files from our artifacts
81-
ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl
80+
else
81+
# ensure that the OpenCL loader finds the ICD files from our artifacts
82+
ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl
83+
end
84+
85+
# XXX: work around an issue with SYCL/Level Zero interoperability
86+
# (see JuliaGPU/oneAPI.jl#417)
87+
ENV["SYCL_PI_LEVEL_ZERO_BATCH_SIZE"] = "1"
8288
end
83-
84-
# XXX: work around an issue with SYCL/Level Zero interoperability
85-
# (see JuliaGPU/oneAPI.jl#417)
86-
ENV["SYCL_PI_LEVEL_ZERO_BATCH_SIZE"] = "1"
89+
return nothing
8790
end
8891

8992
function set_debug!(debug::Bool)

0 commit comments

Comments
 (0)