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

username: p.servus
cooked: <p>If i check if torch can see my gpu, it returns <strong>FALSE</strong> and a <strong>Warning:</strong></p>
<pre><code class="lang-auto">&gt;&gt;&gt; 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
</code></pre>
<p>My setup is:</p>
<ul>
<li>torch.<em>version</em>_: <strong>2.0.0+cu118</strong></li>
<li>GraphicCard: <strong>NVIDIA GeForce GT 540M</strong></li>
<li>CUDA: <strong>12.1</strong> (updated by myself)</li>
<li>Python: <strong>3.10.9</strong></li>
</ul>
<p>I don’t know what the <strong>“version 9010”</strong> is from, in the warning "The NVIDIA driver on your system is too old (found <strong>version 9010)."</strong></p>
<p>I was reading here <a href="https://discuss.pytorch.org/t/install-pytorch-with-cuda-12-1/174294" class="inline-onebox">Install pytorch with Cuda 12.1</a> :</p>
<blockquote>
<p>Is it possible to install version 11.8 and I have 12.1?<br>
…<br>
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.</p>
</blockquote>
<p>… 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<br>
… i was run <strong>upgrade for torch for cuda 11.8:</strong></p>
<pre><code class="lang-auto">pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 --upgrade
</code></pre>
<p>… 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 <strong>don’t know, why the loading from the upgrade is hungry for RAM),</strong><br>
but upgrade was successful:</p>
<pre><code class="lang-auto">Successfully installed torch-2.0.0+cu118 torchaudio-2.0.1+cu118 torchvision-0.15.1+cu118
</code></pre>
<p>… but at the end, it does NOT fix:</p>
<pre><code class="lang-auto">&gt;&gt;&gt; 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
</code></pre>
<p>… please help</p>
<p>= )</p>

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

username: p.servus
cooked: <p>Thx at first for the quick answer … and i think this topic is finished with your answer<br>
= )</p>
<p>But i still have some question, to better understand …</p>
<p><code>nvidia-smi</code> gives me a <strong>Driver Version: 391.35:</strong></p>
<pre><code class="lang-auto">PS C:\Users\servus&gt; &amp; "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                                       |
+-----------------------------------------------------------------------------+
</code></pre>
<ol>
<li>Is this <strong>‘Driver Version: 391.35’</strong>-info related with the <strong>‘Fermi architecture with compute capability 2.1’</strong>-info from your answer</li>
<li>Does anyone know what the <strong>“version 9010”</strong> is meaning, in the warning "The NVIDIA driver on your system is too old (found <strong>version 9010)."</strong> … or is this just a string from anywhere?<br>
= )</li>
<li>where can i find such information, like you say:</li>
</ol>
<blockquote>
<p><code>GeForce GT 540M</code> uses the Fermi architecture with compute capability 2.1</p>
</blockquote>
<p>… or:</p>
<blockquote>
<p>PyTorch supports compute capabilities between 3.7 to 9.0 in its current release.</p>
</blockquote>
<p>… i know this is kind of offTopic, but i was bad in finding information for GraphicCards and it’s compatibility with cuda and torch<br>
… 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?</p>
<p>= )</p>

username: ptrblck
cooked: <ol>
<li>
<p>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&gt;=450.80.02.</p>
</li>
<li>
<p>The error points to the outdated driver, which was part of the CUDA 9 toolkit.</p>
</li>
<li>
<p>You can check the compute capabilities in the <a href="https://en.wikipedia.org/wiki/CUDA">CUDA Wikipedia article</a> and can print the compute capabilities used to build the currently used PyTorch binary via <code>print(torch.cuda.get_arch_list())</code>.</p>
</li>
</ol>