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

CUDA.jl along cannot trigger automatic GPU backend selection #1245

Open
chengchingwen opened this issue Feb 22, 2025 · 2 comments
Open

CUDA.jl along cannot trigger automatic GPU backend selection #1245

chengchingwen opened this issue Feb 22, 2025 · 2 comments

Comments

@chengchingwen
Copy link

chengchingwen commented Feb 22, 2025

julia> using CUDA, MLDataDevices

julia> MLDataDevices.Internal.get_gpu_device(force = true)
ERROR: DeviceSelectionException: No functional GPU device found!
Stacktrace:
 [1] get_gpu_device(; force::Bool)
   @ MLDataDevices.Internal ~/.julia/packages/MLDataDevices/uhCbD/src/internal.jl:93
 [2] top-level scope
   @ REPL[2]:1

julia> CUDA.functional()
true

It seems get_gpu_device would return CUDADevice successfully only when cuDNN is loaded.

@chengchingwen chengchingwen changed the title MLDataDevices.Internal.get_gpu_device automatic GPU backend selection not working CUDA.jl along cannot trigger automatic GPU backend selection Feb 22, 2025
@avik-pal
Copy link
Member

Yes, that is an intentional choice, since a lot of the NNlib functions will fail without cuDNN loaded anyways

@chengchingwen
Copy link
Author

It's kinda counterintuitive. NNlib's CUDA ext does not depend on cuDNN, while NNlib's cuDNN ext depends on CUDA. cuDNN also depends on CUDA. OTOH, not all ML libraries require cuDNN functionality to use nv gpu.

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

2 participants