Can't get CUDA to work

Hi,

I am having an issue with my CUDA installation and PyTorch on Windows 10. PyTorch is not detecting my CUDA installation even though I have installed the NVIDIA driver and PyTorch version that is compatible with my GPU (GTX 1080 Ti). I have added the path to my CUDA libraries to my system’s PATH environment variable, but PyTorch still does not detect my CUDA installation.

Here is the output of the collect_env command:

Collecting environment information…
PyTorch version: 1.13.1
Is debug build: False
CUDA used to build PyTorch: Could not collect
ROCM used to build PyTorch: N/A

OS: Microsoft Windows 10 Pro
GCC version: Could not collect
Clang version: Could not collect
CMake version: Could not collect
Libc version: N/A

Python version: 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)
Python platform: Windows-10-10.0.19044-SP0
Is CUDA available: False
CUDA runtime version: 11.7.64

CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: NVIDIA GeForce GTX 1080 Ti
Nvidia driver version: 528.02
cuDNN version: Could not collect
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

Versions of relevant libraries:
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.21.5
[pip3] numpydoc==1.4.0
[pip3] torch==1.13.1
[pip3] torchaudio==0.13.1
[pip3] torchvision==0.14.1
[conda] blas 1.0 mkl
[conda] cpuonly 2.0 0 pytorch
[conda] mkl 2021.4.0 haa95532_640
[conda] mkl-service 2.4.0 py39h2bbff1b_0
[conda] mkl_fft 1.3.1 py39h277e83a_0
[conda] mkl_random 1.2.2 py39hf11a4ad_0
[conda] numpy 1.21.5 py39h7a0a035_3
[conda] numpy-base 1.21.5 py39hca35cd5_3
[conda] numpydoc 1.4.0 py39haa95532_0
[conda] pytorch 1.13.1 py3.9_cpu_0 pytorch
[conda] pytorch-cuda 11.7 h67b0de4_1 pytorch
[conda] pytorch-mutex 1.0 cpu pytorch
[conda] torchaudio 0.13.1 py39_cpu pytorch
[conda] torchvision 0.14.1 py39_cpu pytorch

I have also checked that my GPU is being recognized by my system by running the nvidia-smi command, which returns the following output:

Fri Jan 6 19:53:51 2023
±----------------------------------------------------------------------------+
| NVIDIA-SMI 528.02 Driver Version: 528.02 CUDA Version: 12.0 |
|-------------------------------±---------------------±---------------------+
| 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 |
| 0% 37C P8 12W / 250W | 1376MiB / 11264MiB | 7% Default |
| | | N/A |
±------------------------------±---------------------±---------------------+

These are my environment variables:
Skærmbillede 2023-01-06 200400

I am at a loss as to what to try next. Can anyone help me troubleshoot this issue?

Thanks in advance for any help!

Best regards,
John

It seems you’ve installed the CPU-only binaries:

pytorch 1.13.1 py3.9_cpu_0 pytorch

so make sure to select the binaries with a proper CUDA runtime.