Skip to content

Windows: first call to using oneAPI errors, terminates testing; second call succeeds #448

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
BenjaminRemez opened this issue Jul 12, 2024 · 3 comments

Comments

@BenjaminRemez
Copy link

The following occurs in an empty environment:

import Pkg; Pkg.status(); # empty package
Pkg.add("oneAPI") # Completes successfully
using oneAPI # fails
using oneAPI # succeeds
A = oneArray(rand(Float32, 10^8));
A .+= 1;
sum(A); # returns ~1.5f8 

Even though the oneAPI seems usable, that the first using oneAPI fails makes ] test oneAPI instantly fail and stop, so I cannot run the remainder of the tests to assess the exact functionality.

The error I obtain during the first using oneAPI is the following:

ERROR: InitError: UndefVarError: `NEO_jll` not defined
Stacktrace:
  [1] __init__()
    @ oneAPI C:\Users\breme\.julia\packages\oneAPI\1GTs3\src\oneAPI.jl:87
  [2] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1134
  [3] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1122
  [4] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base .\loading.jl:1067
  [5] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base .\loading.jl:1581
  [6] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:1938
  [7] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1812
  [8] #invoke_in_world#3
    @ .\essentials.jl:926 [inlined]
  [9] invoke_in_world
    @ .\essentials.jl:923 [inlined]
 [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:1803
 [11] macro expansion
    @ .\loading.jl:1790 [inlined]
 [12] macro expansion
    @ .\lock.jl:267 [inlined]
 [13] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1753
 [14] #invoke_in_world#3
    @ .\essentials.jl:926 [inlined]
 [15] invoke_in_world
    @ .\essentials.jl:923 [inlined]
 [16] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:1746
during initialization of module oneAPI

My setup (Intel IRIS integrated graphics):

julia> versioninfo(); oneAPI.versioninfo()
Julia Version 1.10.3
Commit 0b4590a550 (2024-04-30 10:59 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 8 × Intel(R) Core(TM) i7-1065G7 CPU @ 1.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, icelake-client)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Toolchain:
- Julia: 1.10.3
- LLVM: 15.0.7

1 driver:
- 00000000-0000-0000-003d-229501030000 (v1.3.0, API v1.3.0)

1 device:
- Intel(R) Graphics [0x8a52]
@BenjaminRemez
Copy link
Author

BenjaminRemez commented Jul 12, 2024

Ah, I see this was fixed in the most recent commit fad0f52.

@Overengined
Copy link

Hello, terribly sorry to re-open an older issue, but I seem to be ecountering a very similar problem.
using oneAPI will cause the following error :

ERROR: InitError: UndefVarError: `NEO_jll` not defined in `oneAPI.oneL0`
Suggestion: check for spelling errors or missing imports.
Stacktrace:
  [1] __init__()
    @ oneAPI C:\Users\xxxxx\.julia\packages\oneAPI\c7eAo\src\oneAPI.jl:76
  [2] run_module_init(mod::Module, i::Int64)
    @ Base .\loading.jl:1378
  [3] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base .\loading.jl:1366
  [4] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{…}, ignore_native::Nothing; register::Bool)
    @ Base .\loading.jl:1254
  [5] _include_from_serialized (repeats 2 times)
    @ .\loading.jl:1210 [inlined]
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128, stalecheck::Bool; reasons::Dict{…}, DEPOT_PATH::Vector{…})
    @ Base .\loading.jl:2057
  [7] _require(pkg::Base.PkgId, env::String)
    @ Base .\loading.jl:2527
  [8] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2388
  [9] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [10] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [11] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base .\loading.jl:2375
 [12] macro expansion
    @ .\loading.jl:2314 [inlined]
 [13] macro expansion
    @ .\lock.jl:273 [inlined]
 [14] __require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2271
 [15] #invoke_in_world#3
    @ .\essentials.jl:1089 [inlined]
 [16] invoke_in_world
    @ .\essentials.jl:1086 [inlined]
 [17] require(into::Module, mod::Symbol)
    @ Base .\loading.jl:2260
during initialization of module oneAPI

But insisting and executing using oneAPI a second time will be successful and allow me to run code (e.g : I tried running BenjaminRemez's code mentioned here line by line in the REPL and it worked).
I am running an Intel ARC iGPU on Windows, with Julia 1.11.5 and status oneAPI gives me oneAPI v2.0.2

@maleadt
Copy link
Member

maleadt commented Apr 18, 2025

Yeah, this has regressed. We now rely on a system Level Zero library, so NEO_jll isn't used on Windows anymore:

if Libdl.dlopen(libze_loader; throw_error=false) === nothing
@error "The oneAPI Level Zero loader was not found. Please ensure the Intel GPU drivers are installed."
return
end

The global __init__ needs to be adjusted.

@maleadt maleadt reopened this Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants