M HYPE SPLASH
// updates

Getting GPU passthrough to work on WSL2 for windows 10

By Abigail Rogers

My Ubuntu install is not picking up my CUDA card. I have an GTX A5000. I ran through the following steps in section 4.2.6 from this tutorial:

wget
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget
sudo dpkg -i cuda-repo-wsl-ubuntu-11-4-local_11.4.0-1_amd64.deb
sudo apt-key add /var/cuda-repo-wsl-ubuntu-11-4-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda

However when I try to build a sample as instructed in section 4.2.7 I get the following error:

[./BlackScholes] - Starting...
CUDA error at ../../common/inc/helper_cuda.h:779 code=100(cudaErrorNoDevice) "cudaGetDeviceCount(&device_count)"

so WSL is not picking up my GPU. The current version of the driver I am running is 30.0.14.7239

When I run uname -r I get the following:

5.10.102.1-microsoft-standard-WSL2

edit: Version of windows I am running is windows 10(OS Build 19042.1586). I opted to be in the "windows insiders" group, but I don't think this is the latest build.

1 Answer

Have it working now. After signing up for windows insiders group I had to go to windows update and go into optional updates. I added the 21H2 patch and everything seems to be happy now.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy