I am attempting to install cuda in WSL2 for use with TensorFlow (as per the TF instructions, which include the NVIDIA instructions).
The Windows-side tool nvidia-smi.exe
works and gives the following output:
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 517.40 Driver Version: 517.40 CUDA Version: 11.7 |
|-------------------------------+----------------------+----------------------+
| GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 NVIDIA GeForce ... WDDM | 00000000:01:00.0 On | N/A |
| 38% 28C P8 7W / 120W | 473MiB / 6144MiB | 0% Default |
| | | N/A |
+-------------------------------+----------------------+----------------------+
I've made sure to install the correct cuda toolkit (the non-driver version of 11.7, as per the NVIDIA instructions) in WSL2. But when I run the WSL2-side tool nvidia-smi
I see the following error:
Failed to initialize NVML: GPU access blocked by the operating system
Failed to properly shut down NVML: GPU access blocked by the operating system
Solutions from other posts (which include rebooting, reinstalling drivers, disabling secure boot, and upgrading to Windows 21H2) haven't worked for me.
How can I correctly configure cuda for WSL2?
(Edited for clarity)