Skip to content
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

Failure to initialize with CUDA_VISIBLE_DEVICES='' #1945

Closed
maleadt opened this issue Jun 10, 2023 · 1 comment
Closed

Failure to initialize with CUDA_VISIBLE_DEVICES='' #1945

maleadt opened this issue Jun 10, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@maleadt
Copy link
Member

maleadt commented Jun 10, 2023

See https://discourse.julialang.org/t/disable-all-gpu-support-when-using-lux/100076/3; CUDA.jl shouldn't ever fail to initialize, but instead just @error.

@maleadt maleadt added the bug Something isn't working label Jun 10, 2023
@maleadt
Copy link
Member Author

maleadt commented Nov 6, 2023

This has been fixed; all initialization errors are lazy now:

❯ CUDA_VISIBLE_DEVICES='' julia --project
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.0-rc1 (2023-11-03)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using CUDA
Precompiling CUDA
  2 dependencies successfully precompiled in 20 seconds. 65 already precompiled.

julia> CuArray([1])
ERROR: CUDA initialization failed: CUDA error (code 100, CUDA_ERROR_NO_DEVICE)

@maleadt maleadt closed this as completed Nov 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant