From e511956af70ae6a49d470dbda1e86876a68ce4e3 Mon Sep 17 00:00:00 2001 From: wheeheee <104880306+wheeheee@users.noreply.github.com> Date: Sun, 14 Jun 2026 21:24:55 +0800 Subject: [PATCH] Fix oneAPI.jl __init__ on Windows --- src/oneAPI.jl | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/oneAPI.jl b/src/oneAPI.jl index 3f30f7e2..f36f8171 100644 --- a/src/oneAPI.jl +++ b/src/oneAPI.jl @@ -131,13 +131,15 @@ function __init__() return end - if oneL0.NEO_jll.is_available() && oneL0.functional[] - if Sys.iswindows() + if oneL0.functional[] + @static 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 + if oneL0.NEO_jll.is_available() + # ensure that the OpenCL loader finds the ICD files from our artifacts + ENV["OCL_ICD_FILENAMES"] = oneL0.NEO_jll.libigdrcl + end end # XXX: work around an issue with SYCL/Level Zero interoperability