CUDA compatibility

Bryan_Arguello: <p>Hello,</p>
<p>My application requires PyTorch 2.2.  When I look at at the Get Started guide, it looks like that version of PyTorch only supports CUDA 11.8 and 12.1</p>
<p>I am working on NVIDIA V100 and A100 GPUs, and NVIDIA does not supply drivers for those cards that are compatible with either CUDA 11.8 or 12.1</p>
<p>Are these really the only versions of CUDA that work with PyTorch 2.2? Would using a CUDA version like 11.7, 12.0, or 12.2 cause any issues?</p>

eqy: <p>I am not sure where you are seeing that drivers compatible with A100 and V100 are not compatible with e.g., 12.1/11.8. e.g., see the list of supported cards for <a href="https://docs.nvidia.com/datacenter/tesla/tesla-release-notes-525-60-13/index.html" rel="noopener nofollow ugc">Version 525.60.13(Linux)/527.41(Windows) :: NVIDIA Data Center GPU Driver Documentation</a> which is the oldest compatible driver according to: <a href="https://docs.nvidia.com/deploy/cuda-compatibility/#minor-version-compatibility" rel="noopener nofollow ugc">CUDA Compatibility :: NVIDIA Data Center GPU Driver Documentation</a></p>
<p>Furthermore, you are referring to CUDA versions which PyTorch provides prebuilt binaries for—you are also free to build PyTorch from source (and PyTorch’s CUDA components using your local CUDA toolkit) if you wish to use a newer CUDA toolkit.</p>

Bryan_Arguello: <p>I tried to download a NVIDIA driver from their advanced driver search page.<br>
If you look at the screenshot below, it does not include 11.8 or 12.1.<br>
I chatted with a rep at NVIDIA and they confirmed that this driver search page is accurate.</p>
<p>I acknowledge that I might be missing something (such as building PyTorch from source).<br>
Since I can do that, I believe that I can install CUDA 12.2 on our GPU’s and just build PyTorch from source.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/5/d5e58f53dd4b797c8017c31a90e834c5a7c83289.png" data-download-href="https://discuss.pytorch.org/uploads/default/d5e58f53dd4b797c8017c31a90e834c5a7c83289" title="image"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/d/5/d5e58f53dd4b797c8017c31a90e834c5a7c83289_2_690x367.png" alt="image" data-base62-sha1="uwdwV26jFRUoR8nI6iGbIz6ibPj" width="690" height="367" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/d/5/d5e58f53dd4b797c8017c31a90e834c5a7c83289_2_690x367.png, https://discuss.pytorch.org/uploads/default/optimized/3X/d/5/d5e58f53dd4b797c8017c31a90e834c5a7c83289_2_1035x550.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/d/5/d5e58f53dd4b797c8017c31a90e834c5a7c83289_2_1380x734.png 2x" data-dominant-color="D1D4CF"><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">1539×819 151 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>

eqy: <p>That’s unfortunate that the download page is missing those entries. However minor version compatibility should be a thing and you should be able to use e.g., the driver for 12.0 under 12.1, and the driver for 11.7 under 11.8, etc.</p>

fermat97: <p>Hi, I faced a similar issue (with A100) and I tried different versions of Cuda and Pytorch. Even with PyTorch <code>2.0.0</code> and Cuda version <code>11.7</code> I still get the following error while running <code>torch.cuda.is_available()</code>:</p>
<pre><code class="lang-auto">python3.10/site-packages/torch/cuda/__init__.py:107: UserWarning: CUDA initialization: CUDA driver initialization failed, you might not have a CUDA gpu. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)
  return torch._C._cuda_getDeviceCount() &gt; 0
False
</code></pre>

ptrblck: <p>The issue points to a driver failure, so you might want to reinstall it.</p>
<p>The same issue was described <a href="https://discuss.pytorch.org/t/after-nvidia-driver-update-cuda-is-disabled/198368/5">here</a> and indeed the driver wasn’t properly installed.</p>