PyTorch Not Recognizing CUDA (Error 803: system has unsupported display driver / cuda driver combination)
Question:
I’m running PyTorch on Linux.
The OS is Ubuntu 22.04.1.
The GPU is NVIDIA RTX A4000.
CUDA Version 11.5.
Additionally, I am running the CUDA 11.7 version of PyTorch.
When I run Python3 on the terminal, PyTorch is unable to detect CUDA. I have tried rebooting but the issue persists.
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
[PATH]/.local/lib/python3.10/site-packages/torch/cuda/__init__.py:88: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 803: system has unsupported display driver / cuda driver combination (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
False
Answers:
After updating the CUDA driver to version 11.7, PyTorch successfully recognizes CUDA.
I’m running PyTorch on Linux.
The OS is Ubuntu 22.04.1.
The GPU is NVIDIA RTX A4000.
CUDA Version 11.5.
Additionally, I am running the CUDA 11.7 version of PyTorch.
When I run Python3 on the terminal, PyTorch is unable to detect CUDA. I have tried rebooting but the issue persists.
Python 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import torch
>>> torch.cuda.is_available()
[PATH]/.local/lib/python3.10/site-packages/torch/cuda/__init__.py:88: UserWarning: CUDA initialization: Unexpected error from cudaGetDeviceCount(). Did you run some cuda functions before calling NumCudaDevices() that might have already set an error? Error 803: system has unsupported display driver / cuda driver combination (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)
return torch._C._cuda_getDeviceCount() > 0
False
After updating the CUDA driver to version 11.7, PyTorch successfully recognizes CUDA.