Torch.cuda.is_available() is false for cuda 11.8

username: Abhijit_Bhandari
cooked: <p>I have been struggling with this problem for the last two days yet not resolved.<br>
My torch.cuda.is_available() is always False despite whatever I try. But there is no problem with Tensorflow for the GPU.</p>
<p>My Details:<br>
Cuda Version: 11.8<br>
Cudnn: available for cuda 11.x<br>
python version: 3.10.4<br>
Visual Studio: 2022<br>
OS: Windows 10</p>
<p>Installation Method Used For Pytorch:<br>
Used as mentioned in Pytorch: <a href="https://pytorch.org/" rel="noopener nofollow ugc">https://pytorch.org/</a></p>
<p>Command:<br>
pip3 install torch torchvision torchaudio --extra-index-url <a href="https://download.pytorch.org/whl/cu117" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu117</a></p>
<p>Please please please help</p>

username: ptrblck
cooked: <p>Could you post the output of <code>python -m torch.utils.collect_env</code> please?</p>

username: eqy
cooked: <p>It looks like you are using a CPU build, could you try uninstalling <code>torch</code> and running the command you pasted above again?</p>

username: Abhijit_Bhandari
cooked: <p>giving it a try again<br>
Uninstalling with:</p>
<p>pip uninstall torch</p>
<p>Reinstalling:<br>
pip3 install torch torchvision torchaudio --extra-index-url <a href="https://download.pytorch.org/whl/cu117" rel="noopener nofollow ugc">https://download.pytorch.org/whl/cu117</a></p>

username: Abhijit_Bhandari
cooked: <aside class="quote no-group" data-username="ptrblck" data-post="2" data-topic="170019">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/ptrblck/48/1823_2.png" class="avatar"> ptrblck:</div>
<blockquote>
<p>python -m torch.utils.collect_env</p>
</blockquote>
</aside>
<p>This is the latest one…</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/a/7a15d36ed306130499c9a47e27726e9143d063e0.png" data-download-href="https://discuss.pytorch.org/uploads/default/7a15d36ed306130499c9a47e27726e9143d063e0" title="ttt"><img src="https://discuss.pytorch.org/uploads/default/original/3X/7/a/7a15d36ed306130499c9a47e27726e9143d063e0.png" alt="ttt" data-base62-sha1="hq10OHKwU7gQF8zsKQssakg4G9G" width="690" height="475" data-dominant-color="F8F8F8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">ttt</span><span class="informations">1111×765 21 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: Abhijit_Bhandari
cooked: <p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/a/7a15d36ed306130499c9a47e27726e9143d063e0.png" data-download-href="https://discuss.pytorch.org/uploads/default/7a15d36ed306130499c9a47e27726e9143d063e0" title="ttt"><img src="https://discuss.pytorch.org/uploads/default/original/3X/7/a/7a15d36ed306130499c9a47e27726e9143d063e0.png" alt="ttt" data-base62-sha1="hq10OHKwU7gQF8zsKQssakg4G9G" width="690" height="475" data-dominant-color="F8F8F8"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">ttt</span><span class="informations">1111×765 21 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>

username: Abhijit_Bhandari
cooked: <p>Thank you all for your kind time and consideration. Solved the issue by following the following steps:</p>
<ol>
<li>uninstalling cuda 11.8 and installing cuda 11.7</li>
<li>copying all files of cudnn in lib, include and bin to respective folders in cuda</li>
<li>removing the environment and recreating</li>
<li>installing cuda version of pytorch</li>
</ol>

username: ptrblck
cooked: <p>It’s good to hear you’ve solved the issue.<br>
As can be seen in your screenshots and as <a class="mention" href="/u/eqy">@eqy</a> mentioned, you’ve installed the CPU-only PyTorch binary so step 4 was needed.</p>

username: Abhijit_Bhandari
cooked: <p>Actuakky, I tried the link for cuda only but I don’t know why the cpu version got installed. I think the fix was at 3.</p>

username: Hao_Du
cooked: <p>I also have this problem when the cuda version is 11.8, when using the <code>python -m torch.utils.collect_env</code>, it shows the following information:<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/1/3/1317a68db39591e542acc095933febc91b96a321.png" data-download-href="https://discuss.pytorch.org/uploads/default/1317a68db39591e542acc095933febc91b96a321" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/1/3/1317a68db39591e542acc095933febc91b96a321_2_690x230.png" alt="image" data-base62-sha1="2ITK4x2e5XMrdeCSUi6Rii2S4k9" width="690" height="230" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/1/3/1317a68db39591e542acc095933febc91b96a321_2_690x230.png, https://discuss.pytorch.org/uploads/default/optimized/3X/1/3/1317a68db39591e542acc095933febc91b96a321_2_1035x345.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/1/3/1317a68db39591e542acc095933febc91b96a321_2_1380x460.png 2x" data-dominant-color="040404"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">2553×851 188 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/3/c/3c0db47d5c309477489943a944c0c88d2b7ac019.png" data-download-href="https://discuss.pytorch.org/uploads/default/3c0db47d5c309477489943a944c0c88d2b7ac019" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/3/c/3c0db47d5c309477489943a944c0c88d2b7ac019_2_690x203.png" alt="image" data-base62-sha1="8zg0GNO1d4Ojfuhlj2HOnMBCjot" width="690" height="203" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/3/c/3c0db47d5c309477489943a944c0c88d2b7ac019_2_690x203.png, https://discuss.pytorch.org/uploads/default/optimized/3X/3/c/3c0db47d5c309477489943a944c0c88d2b7ac019_2_1035x304.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/3/c/3c0db47d5c309477489943a944c0c88d2b7ac019_2_1380x406.png 2x" data-dominant-color="090909"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">image</span><span class="informations">1956×578 48.9 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>
<p>I think PyTorch installed the GPU version, but I do not know why this problem happens.<br>
Hi, <a class="mention" href="/u/ptrblck">@ptrblck</a> , could you give me some advice?</p>
<p>Thanks!!!</p>

username: ptrblck
cooked: <p>I’m not familiar with POWER9 binaries and don’t know if the current PyTorch binary builds support it.</p>

username: Hao_Du
cooked: <p>Maybe Cuda 11.7 or some lower cuda versions are suitable for power PC architecture？</p>