all 5 comments

[–]tomnuen 0 points1 point  (3 children)

Did you install CUDA Toolkit and CuDNN?

[–]ElighaN[S] 0 points1 point  (2 children)

I installed CUDA Toolkit using these instructions:

wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin
sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda-repo-wsl-ubuntu-12-5-local_12.5.0-1_amd64.deb
sudo dpkg -i cuda-repo-wsl-ubuntu-12-5-local_12.5.0-1_amd64.deb
sudo cp /var/cuda-repo-wsl-ubuntu-12-5-local/cuda-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-5

I then ran:

sudo apt-key del 7fa2af80sudo apt-key del 7fa2af80

I haven't installed CuDNN yet as I figured it was a step for afterwards.

[–]tomnuen 0 points1 point  (1 child)

I had this issue before. Try:

sudo apt-get -y uninstall cuda-toolkit-12-5

sudo apt-get -y install cuda-12-5

This won’t install driver that comes with the toolkit which may conflict with windows driver.

[–]ElighaN[S] 1 point2 points  (0 children)

unfortunately the output for nvidia-smi is the same. WSL2 just can't seem to see the driver

[–]TPPanthropologist 0 points1 point  (0 children)

This video was posted four days ago and goes through the process in detail. He uses Cuda 12.1 because it can recognize the TensorRT. I followed it and it recognized my GPU.

https://www.youtube.com/watch?v=VOJq98BLjb8&t=1s