rules_ll icon indicating copy to clipboard operation
rules_ll copied to clipboard

WSL: Number of devices is 0

Open JannisFengler opened this issue 1 year ago • 2 comments

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 avatar Mar 22 '24 00:03 JannisFengler

@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?

aaronmondal avatar May 18 '24 00:05 aaronmondal

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.

aaronmondal avatar May 28 '24 07:05 aaronmondal