WSL Tutorial Samples Fail, No GPU available, Titan XP

I cannot complete the tutorials in https://docs.nvidia.com/cuda/wsl-user-guide/index.html
I have tried with two Ubuntu products from the Windows store, Ubuntu and Ubuntu 18.04, both yield the same results. The Titan XP is the only GPU in this desktop. Currently at a loss on what to do next, any direction would be very appreciated. NVIDIA SMI says my CUDA version is 11.2, does this need to be rolled back to 11.0?

Notes and build versions:

Output of BlackScholes

$ ./BlackScholes
[./BlackScholes] - Startingā€¦
CUDA error at ā€¦/ā€¦/common/inc/helper_cuda.h:777 code=35(cudaErrorInsufficientDriver) ā€œcudaGetDeviceCount(&device_count)ā€

Output of docker benchmark:

$ sudo docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
Error: only 0 Devices available, 1 requested. Exiting.

dxdiag

2020-12-08 23_30_45-Window
Windows Version:
Version 2004 (OS Build 20231.1005)

Output of wsl -l -v

NAME STATE VERSION

  • Ubuntu-18.04 Running 2
    Ubuntu Stopped 2

Output of uname -a

$ uname -a
Linux 4.19.128-microsoft-standard #1 SMP Tue Jun 23 12:58:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

PyTorch claiming no NVIDIA driver is installed and device count is 0

torch.cuda.is_available()
/home/ghost/.local/lib/python3.6/site-packages/torch/cuda/init.py:52: UserWarning: CUDA initialization: Found no NVIDIA driver on your system. Please check that you have an NVIDIA GPU and installed a driver from Official Drivers | NVIDIA (Triggered internally at /pytorch/c10/cuda/CUDAFunctions.cpp:100.)
return torch._C._cuda_getDeviceCount() > 0
False

torch.cuda.device_count()
0

Checked this post: CUDA sample throwing error - #23 by sgammeter
I have these files

Output of nvidia-smi:

$ nvidia-smi

Command ā€˜nvidia-smiā€™ not found, but can be installed with:

sudo apt install nvidia-340
sudo apt install nvidia-utils-390

history:

1  uname -a
2  apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
3  sh -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
4  sudo sh -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64 /" > /etc/apt/sources.list.d/cuda.list'
5  sudo apt-get update
6  sudo apt-get update --allow-unauthenticated
7  deb [trusted=yes] http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64
8  vi
9  vi /etc/apt/sources.list

10 man apt-secure
11 vi /etc/apt/sources.list
12 cat /etc/os-release
13 sudo apt-get update
14 wget -qO http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/Release.gpg | sudo apt-key add -
15 apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
16 sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
17 sudo sh -c ā€˜echo ā€œdeb Index of /compute/cuda/repos/ubuntu1804/x86_64 /ā€ > /etc/apt/sources.list.d/cuda.listā€™
18 sudo apt-get update
19 sudo apt-get install -y cuda-toolkit-11-0
20 cd /usr/local/cuda/samples/4_Finance/BlackScholes
21 make all
22 sudo make all
23 ls
24 ./BlackScholes
25 sudo ./BlackScholes
26 make clean
27 sudo make clean
28 sudo make all
29 ./BlackScholes
30 curl https://get.docker.com | sh
31 distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
32 sudo curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | sudo apt-key add -
33 sudo curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
34 sudo curl -s -L https://nvidia.github.io/libnvidia-container/experimental/$distribution/libnvidia-container-experimental.list | sudo tee /etc/apt/sources.list.d/libnvidia-container-experimental.list
35 sudo apt-get update
36 sudo apt-get install -y nvidia-docker2
37 sudo service docker stop
38 sudo service docker start
39 docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
40 sudo docker run --gpus all nvcr.io/nvidia/k8s/cuda-sample:nbody nbody -gpu -benchmark
41 nvidia-smi
42 python3
43 cd ~
44 ls
45 cd ā€¦
46 ls
47 cd ā€¦
48 ls
49 cd mnt/
50 ls
51 cd c/
52 ls
53 cd Users/ghostuser/
54 cd detectron2_windows/
55 python3 get-pip.py
56 sudo apt-get install python3-distutils
57 python3 get-pip.py
58 python3 -m pip install torch
59 python3
60 history

2 Likes

Hello, my mistake is the same as yours. How did you solve it
My emailļ¼šwmoonx@outlook.com