print(torch.backends.cudnn.enabled) -> FALSE

emeren: <p>Hello</p>
<p>I am trying to run</p><aside class="onebox allowlistedgeneric" data-onebox-src="https://github.com/AUTOMATIC1111/stable-diffusion-webui">
  <header class="source">
      <img src="https://github.githubassets.com/favicons/favicon.svg" class="site-icon" width="32" height="32">

      <a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui" target="_blank" rel="noopener nofollow ugc">GitHub</a>
  </header>

  <article class="onebox-body">
    <div class="aspect-image" style="--aspect-ratio:690/345;"><img src="https://opengraph.githubassets.com/77c4f6bc2508a2ff8cfcf30b0f85517f8992b1475681ebc0a1955ac87579e11e/AUTOMATIC1111/stable-diffusion-webui" class="thumbnail" width="690" height="345"></div>

<h3><a href="https://github.com/AUTOMATIC1111/stable-diffusion-webui" target="_blank" rel="noopener nofollow ugc">GitHub - AUTOMATIC1111/stable-diffusion-webui: Stable Diffusion web UI</a></h3>

  <p>Stable Diffusion web UI. Contribute to AUTOMATIC1111/stable-diffusion-webui development by creating an account on GitHub.</p>


  </article>

  <div class="onebox-metadata">
    
    
  </div>

  <div style="clear: both"></div>
</aside>
<p>
but i couldnt get torch working with cuda,(gives “AssertionError: CUDA is not available” error)<br>
and for my best knowledge i did everything right,<br>
but i am not a programmer so that could be a false assumption.<br>
(got Cudnn,Cuda installed)</p>
<p>print(torch.cuda.is_available())</p>
<p>FALSE</p>
<p>print(torch.backends.cudnn.enabled)</p>
<p>True</p>
<p>print(torch.backends.cudnn.version())</p>
<p>8302</p>
<p>print(torch.version.cuda)</p>
<p>11.3</p>
<p>print(torch.cuda.device_count())</p>
<p>0</p>
<p>x = torch.rand(5, 3)<br>
print(x)<br>
tensor([[0.4047, 0.7574, 0.3756],<br>
[0.6907, 0.2448, 0.9255],<br>
[0.8376, 0.6428, 0.0788],<br>
[0.4214, 0.3840, 0.7919],<br>
[0.7861, 0.1685, 0.6711]])</p>
<p>in the command prompt nvcc -V gives me this</p>
<p>nvcc: NVIDIA (R) Cuda compiler driver<br>
Copyright (c) 2005-2021 NVIDIA Corporation<br>
Built on Sun_Mar_21_19:24:09_Pacific_Daylight_Time_2021<br>
Cuda compilation tools, release 11.3, V11.3.58<br>
Build cuda_11.3.r11.3/compiler.29745058_0</p>
<p>running nvidia-smi gives me this</p>
<p>±----------------------------------------------------------------------------+<br>
| NVIDIA-SMI 516.94       Driver Version: 516.94       CUDA Version: 11.7     |<br>
|-------------------------------±---------------------±---------------------+<br>
| GPU  Name            TCC/WDDM | Bus-Id        Disp.A | Volatile Uncorr. ECC |<br>
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |<br>
|                               |                      |               MIG M. |<br>
|===============================+======================+======================|<br>
|   0  NVIDIA GeForce … WDDM  | 00000000:26:00.0  On |                  N/A |<br>
| 28%   62C    P0    41W / 180W |    778MiB /  8192MiB |      2%      Default |<br>
|                               |                      |                  N/A |<br>
±------------------------------±---------------------±---------------------+</p>
<p>Anyone have an idea why torch doesnt recognize i got cuda installed?</p>

emeren: <p>I eventually solved it the problem was → <br>
I use Substance Painter for work, and it needs some registry changes<br>
(<a href="https://substance3d.adobe.com/documentation/spdoc/gpu-drivers-crash-with-long-computations-128745489.html" class="inline-onebox" rel="noopener nofollow ugc">GPU drivers crash with long computations (TDR crash) | Substance 3D Painter</a>)<br>
i missclicked, and setup the Tldlevel value with a Qword, and not a Dword.<br>
(this one little change disabled my cuda,opencl, and physx support)<br>
also use GPU-z to validate if your cuda is working or not.</p>