Torch.cuda.is_available() False - Windows 10 WLS

username: Parth-Mandaliya
cooked: <p>I am using Windows 10 with WSL.<br>
With the new miniconda PyTorch 2.0.0 environment, torch.cuda.is_available() is False. Following are some details of my machine.</p>
<p>Operating System: Windows 10 (With SecureBoot, &amp; TPM) - WSL (Ubuntu 22.04)<br>
NVIDIA GPU: 3060 Mobile<br>
NVIDIA Driver: 531.68</p>
<p>I have been using Windows 11 for some time and have never had any issues with this. I recently switched to Windows 10.</p>
<p>Any help is greatly appreciated</p>
<p>Please let me know if any more information is required.</p>
<p>Collecting environment information…<br>
PyTorch version: 2.0.0<br>
Is debug build: False<br>
CUDA used to build PyTorch: 11.8<br>
ROCM used to build PyTorch: N/A</p>
<p>OS: Ubuntu 22.04.2 LTS (x86_64)<br>
GCC version: (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0<br>
Clang version: 14.0.0-1ubuntu1<br>
CMake version: version 3.22.1<br>
Libc version: glibc-2.35</p>
<p>Python version: 3.8.16 (default, Mar  2 2023, 03:21:46)  [GCC 11.2.0] (64-bit runtime)<br>
Python platform: Linux-4.4.0-19041-Microsoft-x86_64-with-glibc2.17<br>
Is CUDA available: False<br>
CUDA runtime version: No CUDA<br>
CUDA_MODULE_LOADING set to: N/A<br>
GPU models and configuration: No CUDA<br>
Nvidia driver version: No CUDA<br>
cuDNN version: No CUDA<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A<br>
Is XNNPACK available: True</p>
<p>CPU:<br>
Architecture:        x86_64<br>
CPU op-mode(s):      32-bit, 64-bit<br>
Address sizes:       36 bits physical, 48 bits virtual<br>
Byte Order:          Little Endian<br>
CPU(s):              16<br>
On-line CPU(s) list: 0-15<br>
Vendor ID:           AuthenticAMD<br>
Model name:          AMD Ryzen 7 5800H with Radeon Graphics<br>
CPU family:          25<br>
Model:               80<br>
Thread(s) per core:  2<br>
Core(s) per socket:  8<br>
Socket(s):           1<br>
Stepping:            0<br>
CPU max MHz:         3201.0000<br>
CPU min MHz:         0.0000<br>
BogoMIPS:            6402.00<br>
Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave osxsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw wdt topoext fsgsbase bmi1 avx2 smep bmi2 erms cqm rdt_a rdseed adx smap clflushopt clwb sha_ni umip vaes vpclmulqdq rdpid<br>
Hypervisor vendor:   Windows Subsystem for Linux<br>
Virtualization type: container</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.23.5<br>
[pip3] torch==2.0.0<br>
[pip3] torchaudio==2.0.0<br>
[pip3] torchvision==0.15.0<br>
[conda] blas                      1.0                         mkl<br>
[conda] ffmpeg                    4.3                  hf484d3e_0    pytorch<br>
[conda] mkl                       2021.4.0           h06a4308_640<br>
[conda] mkl-service               2.4.0            py38h7f8727e_0<br>
[conda] mkl_fft                   1.3.1            py38hd3c417c_0<br>
[conda] mkl_random                1.2.2            py38h51133e4_0<br>
[conda] numpy                     1.23.5           py38h14f4228_0<br>
[conda] numpy-base                1.23.5           py38h31eccc5_0<br>
[conda] pytorch                   2.0.0           py3.8_cuda11.8_cudnn8.7.0_0    pytorch<br>
[conda] pytorch-cuda              11.8                 h7e8668a_3    pytorch<br>
[conda] pytorch-mutex             1.0                        cuda    pytorch<br>
[conda] torchaudio                2.0.0                py38_cu118    pytorch<br>
[conda] torchtriton               2.0.0                      py38    pytorch<br>
[conda] torchvision               0.15.0               py38_cu118    pytorch</p>
<p>±--------------------------------------------------------------------------------------+<br>
| NVIDIA-SMI 531.68                 Driver Version: 531.68       CUDA Version: 12.1     |<br>
|-----------------------------------------±---------------------±---------------------+<br>
| GPU  Name                      TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |<br>
| Fan  Temp  Perf            Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |<br>
|                                         |                      |               MIG M. |<br>
|=========================================+======================+======================|<br>
|   0  NVIDIA GeForce RTX 3060 L…  WDDM | 00000000:01:00.0 Off |                  N/A |<br>
| N/A   43C    P8                8W /  N/A|     17MiB /  6144MiB |      0%      Default |<br>
|                                         |                      |                  N/A |<br>
±----------------------------------------±---------------------±---------------------+</p>
<p>±--------------------------------------------------------------------------------------+<br>
| Processes:                                                                            |<br>
|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |<br>
|        ID   ID                                                             Usage      |<br>
|=======================================================================================|<br>
|    0   N/A  N/A      8144    C+G   …inaries\Win64\EpicGamesLauncher.exe    N/A      |<br>
±--------------------------------------------------------------------------------------+</p>

username: Parth-Mandaliya
cooked: <p>Found the issue, WSL kernel was not up-to-date.</p>