Incompatibility with cuda, cudnn, torch and conda/anaconda

rosss: <p>i found an nvidia compatibility matrix, but that didnt work. testing with 2 PC’s with 2 different GPU’s and have updated to what is documented, at least i think so. not sure what to do now. i have been trying for a week.</p>
<p>NVIDIA-SMI 522.06       Driver Version: 522.06       CUDA Version: 11.8</p>
<blockquote>
<blockquote>
<blockquote>
<p>import torch.cuda<br>
torch.cuda.is_available()<br>
False<br>
print(torch.rand(2,4))<br>
tensor([[0.9383, 0.1120, 0.1925, 0.9528],<br>
[0.1820, 0.6980, 0.4946, 0.2403]])<br>
torch.cuda.is_available()<br>
False</p>
</blockquote>
</blockquote>
</blockquote>
<p>using python 3.9.13 and 3.8.10</p>

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

rosss: <aside class="quote no-group" data-username="ptrblck" data-post="2" data-topic="178621">
<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><code>python -m torch.utils.collect_env</code>,</p>
</blockquote>
</aside>
<p>(base) C:\Users\rossroxas&gt;python -m torch.utils.collect_env<br>
Collecting environment information…<br>
PyTorch version: 2.0.0+cpu<br>
Is debug build: False<br>
CUDA used to build PyTorch: Could not collect<br>
ROCM used to build PyTorch: N/A</p>
<p>OS: Microsoft Windows 10 Enterprise<br>
GCC version: (x86_64-posix-seh, Built by <a href="http://strawberryperl.com" rel="noopener nofollow ugc">strawberryperl.com</a> project) 8.3.0<br>
Clang version: Could not collect<br>
CMake version: Could not collect<br>
Libc version: N/A</p>
<p>Python version: 3.9.16 (main, Mar  8 2023, 10:39:24) [MSC v.1916 64 bit (AMD64)] (64-bit runtime)<br>
Python platform: Windows-10-10.0.19045-SP0<br>
Is CUDA available: False<br>
CUDA runtime version: 11.8.89<br>
CUDA_MODULE_LOADING set to: N/A<br>
GPU models and configuration:<br>
GPU 0: NVIDIA RTX A5500<br>
GPU 1: NVIDIA RTX A5500<br>
GPU 2: NVIDIA RTX A5500</p>
<p>Nvidia driver version: 522.06<br>
cuDNN version: Could not collect<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A<br>
Is XNNPACK available: True</p>
<p>CPU:<br>
Architecture=9<br>
CurrentClockSpeed=2694<br>
DeviceID=CPU0<br>
Family=179<br>
L2CacheSize=28672<br>
L2CacheSpeed=<br>
Manufacturer=GenuineIntel<br>
MaxClockSpeed=2694<br>
Name=Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz<br>
ProcessorType=3<br>
Revision=21767</p>
<p>Architecture=9<br>
CurrentClockSpeed=2694<br>
DeviceID=CPU1<br>
Family=179<br>
L2CacheSize=28672<br>
L2CacheSpeed=<br>
Manufacturer=GenuineIntel<br>
MaxClockSpeed=2694<br>
Name=Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz<br>
ProcessorType=3<br>
Revision=21767</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.24.3<br>
[pip3] pytorch-gpu==0.0.1<br>
[pip3] torch==2.0.0<br>
[pip3] torch-package==1.0.1<br>
[pip3] torchlib==0.1<br>
[pip3] torchutils==0.0.4<br>
[pip3] torchvision==0.15.1<br>
[conda] numpy                     1.24.3                   pypi_0    pypi<br>
[conda] pytorch-gpu               0.0.1                    pypi_0    pypi<br>
[conda] torch                     2.0.0                    pypi_0    pypi<br>
[conda] torch-package             1.0.1                    pypi_0    pypi<br>
[conda] torchlib                  0.1                      pypi_0    pypi<br>
[conda] torchutils                0.0.4                    pypi_0    pypi<br>
[conda] torchvision               0.15.1                   pypi_0    pypi</p>

ptrblck: <p>Based on the output you are installing the CPU-only binary. Which install command did you use?</p>

rosss: <p>i tried:</p>
<p>pip install torch<br>
nvidia for the CUDA graphics driver and cudnn. I had the impression that everything was included and maybe distributed so that i can check the GPU after the graphics driver install.</p>

rosss: <p>i have a few different versions of python</p>
<p>Python version: 3.8.10 (tags/v3.8.10:3d8993a, May  3 2021, 11:48:03) [MSC v.1928 64 bit (AMD64)] (64-bit runtime)<br>
Python platform: Windows-10-10.0.19045-SP0<br>
Is CUDA available: True<br>
CUDA runtime version: 11.8.89<br>
CUDA_MODULE_LOADING set to: LAZY<br>
GPU models and configuration:<br>
GPU 0: NVIDIA RTX A5500<br>
GPU 1: NVIDIA RTX A5500<br>
GPU 2: NVIDIA RTX A5500</p>
<p>Nvidia driver version: 522.06<br>
cuDNN version: Could not collect<br>
HIP runtime version: N/A<br>
MIOpen runtime version: N/A<br>
Is XNNPACK available: True</p>
<p>CPU:<br>
Architecture=9<br>
CurrentClockSpeed=2693<br>
DeviceID=CPU0<br>
Family=179<br>
L2CacheSize=28672<br>
L2CacheSpeed=<br>
Manufacturer=GenuineIntel<br>
MaxClockSpeed=2693<br>
Name=Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz<br>
ProcessorType=3<br>
Revision=21767</p>
<p>Architecture=9<br>
CurrentClockSpeed=2693<br>
DeviceID=CPU1<br>
Family=179<br>
L2CacheSize=28672<br>
L2CacheSpeed=<br>
Manufacturer=GenuineIntel<br>
MaxClockSpeed=2693<br>
Name=Intel(R) Xeon(R) Platinum 8280 CPU @ 2.70GHz<br>
ProcessorType=3<br>
Revision=21767</p>
<p>Versions of relevant libraries:<br>
[pip3] numpy==1.16.6<br>
[pip3] torch==2.0.0+cu118<br>
[pip3] torchaudio==2.0.1+cu118<br>
[pip3] torchvision==0.15.1+cu118<br>
[conda] cudatoolkit               11.8.0              h09e9e62_11    conda-forge<br>
[conda] mkl                       2023.1.0         h8bd8f75_46356<br>
[conda] mkl-include               2023.1.0         haa95532_46356<br>
[conda] numpy                     1.23.5                   pypi_0    pypi<br>
[conda] pytorch-gpu               0.0.1                    pypi_0    pypi<br>
[conda] torch                     2.0.0                    pypi_0    pypi<br>
[conda] torch-package             1.0.1                    pypi_0    pypi<br>
[conda] torch-utils               0.1.2                    pypi_0    pypi<br>
[conda] torchlib                  0.1                      pypi_0    pypi<br>
[conda] torchutils                0.0.4                    pypi_0    pypi<br>
[conda] torchvision               0.15.1                   pypi_0    pypi</p>

ptrblck: <aside class="quote no-group" data-username="rosss" data-post="5" data-topic="178621">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/r/b19c9b/48.png" class="avatar"> rosss:</div>
<blockquote>
<p>i tried:</p>
<p>pip install torch</p>
</blockquote>
</aside>
<p>Use the install commands from our <a href="https://pytorch.org/get-started/locally/">website</a>.<br>
E.g. for <code>torch==2.0.0+cu117</code> on Windows you should use:</p>
<pre><code class="lang-auto">pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117
</code></pre>
<aside class="quote no-group" data-username="rosss" data-post="5" data-topic="178621">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/r/b19c9b/48.png" class="avatar"> rosss:</div>
<blockquote>
<p>I had the impression that everything was included</p>
</blockquote>
</aside>
<p>Yes, all dependencies are included in the binaries. You would only need a properly installed NVIDIA driver.</p>

rosss: <p>i think one of the confusing things is finding the matrix on git i found doesnt really give straight forward line up of which versions are compatible with cuda and cudnn</p>

rosss: <p>i am actually running 11.8</p>

rosss: <p>also, do i need to use anaconda or miniconda?</p>

ptrblck: <aside class="quote no-group" data-username="rosss" data-post="8" data-topic="178621" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/r/b19c9b/48.png" class="avatar"> rosss:</div>
<blockquote>
<p>i think one of the confusing things is finding the matrix on git i found doesnt really give straight forward line up of which versions are compatible with cuda and cudnn</p>
</blockquote>
</aside>
<p>I don’t understand which “matrix on git” you are referring to as you can just select the desired PyTorch release and CUDA version in my previously posted link.<br>
As also mentioned your locally installed CUDA toolkit won’t be used unless you build PyTorch from source or a custom CUDA extension since the binaries ship with their own dependencies.</p>
<aside class="quote no-group" data-username="rosss" data-post="9" data-topic="178621" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/r/b19c9b/48.png" class="avatar"> rosss:</div>
<blockquote>
<p>i am actually running 11.8</p>
</blockquote>
</aside>
<p>Again, your locally installed CUDA toolkit won’t be used, only the NVIDIA driver.</p>
<aside class="quote no-group" data-username="rosss" data-post="10" data-topic="178621" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img loading="lazy" alt="" width="24" height="24" src="https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/r/b19c9b/48.png" class="avatar"> rosss:</div>
<blockquote>
<p>also, do i need to use anaconda or miniconda?</p>
</blockquote>
</aside>
<p>No, you don’t need <code>conda</code>.</p>

rosss: <p>thank you for the replies! ill test things out and update when i can!</p>

rosss: <p>the <a href="https://pytorch.org/get-started/locally/#windows-prerequisites-2" rel="noopener nofollow ugc">website</a> says anaconda is a prerequisite. if that is not accurate, cant i just use python?</p>