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

Asked By: Raiyan Chowdhury

||

Answers:

After updating the CUDA driver to version 11.7, PyTorch successfully recognizes CUDA.

Answered By: Raiyan Chowdhury
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.