WSL: Number of devices is 0
WSL GPU Detection Issue in CUDA Example
Problem
Running the default CUDA example in WSL fails to detect the GPU.
Workaround
Setting LD_LIBRARY_PATH resolves the issue:
export LD_LIBRARY_PATH="/usr/lib/wsl/lib:$LD_LIBRARY_PATH"
Suggestion
rules_ll appends automatically /usr/lib/wsl/lib to LD_LIBRARY_PATH when rules_ll is running in WSL. (Not sure If this belongs into the nix flake or into the bazel rules)
@JannisFengler Hmm since #83 this seems to also occur on linux. I'm trying to find a more general solution. In the meantime, could you check whether the same issue still persists with the current main branch and whether the fix for WSL still works as before?
I think this should be addressed by
- #242
Would you mind trying again? If we're lucky it's no longer required to have a cuda driver on WSL at all. If this doesn't work for WSL2 because of passthrough mechanisms I can add the path to the runtime CUDA driver as a flag.