Skip to content

Importing on Mac gives an error that halts the session #489

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

Closed
jgreener64 opened this issue Jan 30, 2025 · 3 comments · Fixed by #493
Closed

Importing on Mac gives an error that halts the session #489

jgreener64 opened this issue Jan 30, 2025 · 3 comments · Fixed by #493
Labels
good first issue Good for newcomers

Comments

@jgreener64
Copy link

When I call using oneAPI on my Linux machine without appropriate devices, I get a logging error that doesn't stop the session. This means I can have using oneAPI in my tests and the tests carry on regardless.

However on my Mac I get the logging error plus a real error:

┌ Error: No oneAPI Level Zero loader found for your platform. Currently, only Linux x86 is supported.
│ If you have a local oneAPI toolchain, you can use that; refer to the documentation for more details.
└ @ oneAPI.oneL0 ~/.julia/packages/oneAPI/CNvkW/lib/level-zero/oneL0.jl:118
ERROR: InitError: UndefVarError: `libigdrcl` not defined
Stacktrace:
  [1] getproperty
    @ ./Base.jl:31 [inlined]
  [2] __init__()
    @ oneAPI ~/.julia/packages/oneAPI/CNvkW/src/oneAPI.jl:81
  [3] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1193
  [4] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1181
  [5] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1126
  [6] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1651
  [7] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2008
  [8] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1882
  [9] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
 [10] invoke_in_world
    @ ./essentials.jl:923 [inlined]
 [11] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1873
 [12] macro expansion
    @ ./loading.jl:1860 [inlined]
 [13] macro expansion
    @ ./lock.jl:267 [inlined]
 [14] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1823
 [15] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
 [16] invoke_in_world
    @ ./essentials.jl:923 [inlined]
 [17] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1816
 [18] top-level scope
    @ ~/.julia/packages/Metal/N2ABH/src/initialization.jl:79
during initialization of module oneAPI

Could this second error be suppressed, so that using oneAPI can run on a Mac without halting the session?

Related to #49.

@maleadt
Copy link
Member

maleadt commented Feb 3, 2025

Should be easy enough to just bail out from oneAPI's __init__ early when oneL0 isn't functional:

const functional = Ref{Bool}(false)

@maleadt maleadt added the good first issue Good for newcomers label Feb 3, 2025
@giordano
Copy link
Contributor

@jgreener64 do you want to give #493 a try?

@jgreener64
Copy link
Author

Works great, thanks Mosè.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants