diff --git a/Project.toml b/Project.toml index 114c8c90..37db3052 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "oneAPI" uuid = "8f75cd03-7ff8-4ecb-9b8f-daf728133b1b" authors = ["Tim Besard "] -version = "2.0.1" +version = "2.0.2" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/oneAPI.jl b/src/oneAPI.jl index fd0e048a..9f5067a5 100644 --- a/src/oneAPI.jl +++ b/src/oneAPI.jl @@ -73,17 +73,20 @@ function __init__() precompiling = ccall(:jl_generating_output, Cint, ()) != 0 precompiling && return - if Sys.iswindows() - @warn """oneAPI.jl support for native Windows is experimental and incomplete. + if oneL0.NEO_jll.is_available() && oneL0.functional[] + if Sys.iswindows() + @warn """oneAPI.jl support for native Windows is experimental and incomplete. For the time being, it is recommended to use WSL or Linux instead.""" - else - # ensure that the OpenCL loader finds the ICD files from our artifacts - ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl + else + # ensure that the OpenCL loader finds the ICD files from our artifacts + ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl + end + + # XXX: work around an issue with SYCL/Level Zero interoperability + # (see JuliaGPU/oneAPI.jl#417) + ENV["SYCL_PI_LEVEL_ZERO_BATCH_SIZE"] = "1" end - - # XXX: work around an issue with SYCL/Level Zero interoperability - # (see JuliaGPU/oneAPI.jl#417) - ENV["SYCL_PI_LEVEL_ZERO_BATCH_SIZE"] = "1" + return nothing end function set_debug!(debug::Bool)