"The NVIDIA driver on your system is too old" for CUDA12.1 on NVIDIA GeForce GT 540M

If i check if torch can see my gpu, it returns FALSE and a Warning:

>>> torch.cuda.is_available()
D:\servus\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\__init__.py:107: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.)
False

My setup is:

  • torch.version_: 2.0.0+cu118
  • GraphicCard: NVIDIA GeForce GT 540M
  • CUDA: 12.1 (updated by myself)
  • Python: 3.10.9

I don’t know what the “version 9010” is from, in the warning "The NVIDIA driver on your system is too old (found version 9010)."

I was reading here Install pytorch with Cuda 12.1 :

Is it possible to install version 11.8 and I have 12.1?

Yes, the PyTorch binaries ship with their own CUDA runtime, cuDNN, NCCL etc. and will work with newer drivers. Your local CUDA toolkit will be used if you build PyTorch from source or a custom CUDA extension.

… i spend nearly a complete day, by setup stable-diffusion-webui and python, updating my nvidia driver, upgrading to cuda 12.1, updating torch, trying to get it fixed, also reading posts from here
… i was run upgrade for torch for cuda 11.8:

pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade

… and this command was running several hours, because it used all my RAM while loading the torch version (i have 4GB RAM on a laptop … btw don’t know, why the loading from the upgrade is hungry for RAM),
but upgrade was successful:

Successfully installed torch-2.0.0+cu118 torchaudio-2.0.1+cu118 torchvision-0.15.1+cu118

… but at the end, it does NOT fix:

>>> torch.cuda.is_available()
D:\servus\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\__init__.py:107: UserWarning: CUDA initialization: The NVIDIA driver on your system is too old (found version 9010). Please update your GPU driver by downloading and installing a new version from the URL: http://www.nvidia.com/Download/index.aspx Alternatively, go to: https://pytorch.org to install a PyTorch version that has been compiled with your version of the CUDA driver. (Triggered internally at ..\c10\cuda\CUDAFunctions.cpp:109.)
False

… please help

= )

Your NVIDIA driver might be too old, which is displayed in the output of nvidia-smi.
However, even updating it won’t help, since your GeForce GT 540M uses the Fermi architecture with compute capability 2.1 and is not supported anymore.
PyTorch supports compute capabilities between 3.7 to 9.0 in its current release.

Thx at first for the quick answer … and i think this topic is finished with your answer
= )

But i still have some question, to better understand …

nvidia-smi gives me a Driver Version: 391.35:

PS C:\Users\servus> & "C:\Program Files\NVIDIA Corporation\NVSMI\nvidia-smi.exe"
Tue Mar 28 20:04:51 2023
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 391.35                 Driver Version: 391.35                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GT 540M    WDDM  | 00000000:01:00.0 N/A |                  N/A |
| N/A   49C   P12    N/A /  N/A |    347MiB /  2048MiB |     N/A      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID   Type   Process name                             Usage      |
|=============================================================================|
|    0                    Not Supported                                       |
+-----------------------------------------------------------------------------+
  1. Is this ‘Driver Version: 391.35’-info related with the ‘Fermi architecture with compute capability 2.1’-info from your answer
  2. Does anyone know what the “version 9010” is meaning, in the warning "The NVIDIA driver on your system is too old (found version 9010)." … or is this just a string from anywhere?
    = )
  3. where can i find such information, like you say:

GeForce GT 540M uses the Fermi architecture with compute capability 2.1

… or:

PyTorch supports compute capabilities between 3.7 to 9.0 in its current release.

… i know this is kind of offTopic, but i was bad in finding information for GraphicCards and it’s compatibility with cuda and torch
… e.g. you know some helpful links for me … i want to be more informed for such topics for future and maybe answer my questions from above by myself?

= )

  1. No, the driver version does not define the compute capability of your GPU, but has to support it. For CUDA 11.x you would need at least driver>=450.80.02.

  2. The error points to the outdated driver, which was part of the CUDA 9 toolkit.

  3. You can check the compute capabilities in the CUDA Wikipedia article and can print the compute capabilities used to build the currently used PyTorch binary via print(torch.cuda.get_arch_list()).

1 Like