You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fix to (#831) in CUDA.jl 3.0.2 triggers an error in the REPL when using CUDA but running on a machine without CUDA being functional, here a MacBookPro 13'' mid 2018 without CUDA-capable device.
Here a MVE:
(@v1.6) pkg> add CUDA
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/.julia/environments/v1.6/Project.toml`
[052768ef] + CUDA v3.0.2
Updating `~/.julia/environments/v1.6/Manifest.toml`
[621f4979] + AbstractFFTs v1.0.1
[ab4f0b2a] + BFloat16s v0.1.0
[fa961155] + CEnum v0.4.1
[052768ef] + CUDA v3.0.2
[d360d2e6] + ChainRulesCore v0.9.37
[0c68f7d7] + GPUArrays v6.2.2
[61eb1bfa] + GPUCompiler v0.11.4
[929cbde3] + LLVM v3.6.0
[c03570c3] + Memoize v0.4.4
[e6cf234a] + RandomNumbers v1.4.0
[276daf66] + SpecialFunctions v1.3.0
[a759f4b9] + TimerOutputs v0.5.8
[efe28fd5] + OpenSpecFun_jll v0.5.3+4
[4af54fe1] + LazyArtifacts
Progress [========================================>] 1/11 dependency successfully precompiled in26 seconds (143 already precompiled)
julia>
julia>using CUDA
julia>
julia>1+1
┌ Error: Error during initialization of CUDA.jl
│ exception =
│ could not load library "libcuda"
│ dlopen(libcuda.dylib, 1): image not found
│ Stacktrace:
│ [1] __runtime_init__()
│ @ CUDA ~/.julia/packages/CUDA/MpASK/src/initialization.jl:101
│ [2] macro expansion
│ @ ~/.julia/packages/CUDA/MpASK/src/initialization.jl:31 [inlined]
│ [3] macro expansion
│ @ ./lock.jl:209 [inlined]
│ [4] _functional(show_reason::Bool)
│ @ CUDA ~/.julia/packages/CUDA/MpASK/src/initialization.jl:27
│ [5] functional(show_reason::Bool)
│ @ CUDA ~/.julia/packages/CUDA/MpASK/src/initialization.jl:19
│ [6] libcuda()
│ @ CUDA ~/.julia/packages/CUDA/MpASK/src/initialization.jl:51
│ [7] macro expansion
│ @ ~/.julia/packages/CUDA/MpASK/lib/cudadrv/libcuda.jl:29 [inlined]
│ [8] macro expansion
│ @ ~/.julia/packages/CUDA/MpASK/lib/cudadrv/error.jl:94 [inlined]
│ [9] cuDeviceGet
│ @ ~/.julia/packages/CUDA/MpASK/lib/utils/call.jl:26 [inlined]
│ [10] CuDevice
│ @ ~/.julia/packages/CUDA/MpASK/lib/cudadrv/devices.jl:25 [inlined]
│ [11] CUDA.TaskLocalState()
│ @ CUDA ~/.julia/packages/CUDA/MpASK/src/state.jl:50
│ [12] task_local_state!()
│ @ CUDA ~/.julia/packages/CUDA/MpASK/src/state.jl:73
│ [13] stream
│ @ ~/.julia/packages/CUDA/MpASK/src/state.jl:419 [inlined]
│ [14] synchronize()
│ @ CUDA ~/.julia/packages/CUDA/MpASK/lib/cudadrv/stream.jl:117
│ [15] top-level scope
│ @ ~/.julia/packages/CUDA/MpASK/src/initialization.jl:83
│ [16] eval
│ @ ./boot.jl:360 [inlined]
│ [17] eval_user_input(ast::Any, backend::REPL.REPLBackend)
│ @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:139
│ [18] repl_backend_loop(backend::REPL.REPLBackend)
│ @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:200
│ [19] start_repl_backend(backend::REPL.REPLBackend, consumer::Any)
│ @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:185
│ [20] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool)
│ @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:317
│ [21] run_repl(repl::REPL.AbstractREPL, consumer::Any)
│ @ REPL /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.6/REPL/src/REPL.jl:305
│ [22] (::Base.var"#874#876"{Bool, Bool, Bool})(REPL::Module)
│ @ Base ./client.jl:387
│ [23] #invokelatest#2
│ @ ./essentials.jl:708 [inlined]
│ [24] invokelatest
│ @ ./essentials.jl:706 [inlined]
│ [25] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
│ @ Base ./client.jl:372
│ [26] exec_options(opts::Base.JLOptions)
│ @ Base ./client.jl:302
│ [27] _start()
│ @ Base ./client.jl:485
└ @ CUDA ~/.julia/packages/CUDA/MpASK/src/initialization.jl:34
ERROR: CUDA.jl did not successfully initialize, and is not usable.
If you did not see any other error message, try again in a new session
with the JULIA_DEBUG environment variable set to 'CUDA'.
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] libcuda()
@ CUDA ~/.julia/packages/CUDA/MpASK/src/initialization.jl:52
[3] macro expansion
@ ~/.julia/packages/CUDA/MpASK/lib/cudadrv/libcuda.jl:29 [inlined]
[4] macro expansion
@ ~/.julia/packages/CUDA/MpASK/lib/cudadrv/error.jl:94 [inlined]
[5] cuDeviceGet
@ ~/.julia/packages/CUDA/MpASK/lib/utils/call.jl:26 [inlined]
[6] CuDevice
@ ~/.julia/packages/CUDA/MpASK/lib/cudadrv/devices.jl:25 [inlined]
[7] CUDA.TaskLocalState()
@ CUDA ~/.julia/packages/CUDA/MpASK/src/state.jl:50
[8] task_local_state!()
@ CUDA ~/.julia/packages/CUDA/MpASK/src/state.jl:73
[9] stream
@ ~/.julia/packages/CUDA/MpASK/src/state.jl:419 [inlined]
[10] synchronize()
@ CUDA ~/.julia/packages/CUDA/MpASK/lib/cudadrv/stream.jl:117
[11] top-level scope
@ ~/.julia/packages/CUDA/MpASK/src/initialization.jl:83
julia>
Having CUDA.jl "loaded" but not using any of its feature (1+1 in the MVE) shouldn't lead to an error as for this operation no libcuda nor any CUDA feature is required. If this behaviour is wanted in the future, it shouldn't occur on a patch release.
The fix to (#831) in CUDA.jl 3.0.2 triggers an error in the REPL when
using CUDA
but running on a machine without CUDA being functional, here a MacBookPro 13'' mid 2018 without CUDA-capable device.Here a MVE:
Manifest.toml
Expected behavior
Having CUDA.jl "loaded" but not using any of its feature (
1+1
in the MVE) shouldn't lead to an error as for this operation nolibcuda
nor any CUDA feature is required. If this behaviour is wanted in the future, it shouldn't occur on a patch release.Version info
Details on Julia:
Details on CUDA:
The text was updated successfully, but these errors were encountered: