WSL: can't setup cuda for wsl pytorch

Here’s detail about my laptop

  1. Microsoft Windows [Version 10.0.19043.1586]
  2. WSL version 2
  3. Kernel version: Linux version 5.10.16.3-microsoft-standard-WSL2
  4. Ubuntu 20…04

I follow this tutorial enabling-gpu-acceleration-on-ubuntu-on-wsl2-with-the-nvidia-cuda . I carefully follow all step until I try to compile sample application. After successfully run sudo make then I execute ./deviceQuery But there’s error says:


cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

Here i show my driver and cuda version.

image

I also try to install torch via pip and test if torch detect gpu and it says False. Any idea what i need to do? Thanks

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 44

Most upvoted comments

@rzsgrt Hey! Please add this to the end of your .bashrc file

export PATH="/usr/local/cuda-11.4/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda-11.4/lib64:$LD_LIBRARY_PATH"

and open and close the terminal and run nvcc --version. Does that fix the issue for you?

Just install fedora. Less pain and works very well out of the box. Best Linux distribution in my opinion and obviously much better than Windows well any linux better than windows 😅

And Mediatek wifi cards have a bad history of working with Linux (and sometimes Windows). Like the new ASUS ROG laptops also have them and so many users even on Windows have issues with them. Swap it out for an Intel wifi card

yeah i’m also thinking about this.