No CUDA 12.4 distribution for Linux when using pip?

jhj0517: <p>Hi, Thanks for your work!</p>
<p>I’m wondering if this is a typo or if there is no real CUDA 12.4 distribution for Linux when using pip.</p>
<p>Currently in <a href="https://pytorch.org/get-started/locally/" class="inline-onebox" rel="noopener nofollow ugc">Start Locally | PyTorch</a>, there’s no <code>--index-url</code> option on Linux with CUDA 12.4.</p>
<p><div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/d/2/d222135c692d3df71abaf45fd1709ced8159e8bd.png" data-download-href="https://discuss.pytorch.org/uploads/default/d222135c692d3df71abaf45fd1709ced8159e8bd" title="torch-cuda-12.4"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/d/2/d222135c692d3df71abaf45fd1709ced8159e8bd_2_690x318.png" alt="torch-cuda-12.4" data-base62-sha1="tYVh4ZxGRIvCQ7p6cfLjcJYDNzn" width="690" height="318" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/d/2/d222135c692d3df71abaf45fd1709ced8159e8bd_2_690x318.png, https://discuss.pytorch.org/uploads/default/original/3X/d/2/d222135c692d3df71abaf45fd1709ced8159e8bd.png 1.5x, https://discuss.pytorch.org/uploads/default/original/3X/d/2/d222135c692d3df71abaf45fd1709ced8159e8bd.png 2x" data-dominant-color="F6DFDB"><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">torch-cuda-12.4</span><span class="informations">830×383 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>
<p>Up to CUDA 12.1, it needs to be installed with <code>--index-url</code> on Linux as well, but <code>--index-url</code> suddenly disappeared with CUDA 12.4.<br>
I’m wondering if this is an accidental typo in the documentation or if there really is no support for the CUDA 12.4 distribution on Linux when using pip.</p>
<p>I googled to find out, but couldn’t confirm this.</p>
<p>Thanks for your help!</p>

Aknw_Fen: <p>I’ve read elsewhere that it now (<code>2.5.1</code>, and probably some earlier versions too.) installs CUDA by default on Linux, from the PyPI index (so no index needed.) I can’t see metadata info, you may have to look at what it installs.</p>

jhj0517: <p>Thanks. I’d like to check myself with</p>
<pre><code class="lang-auto">import torch
print(torch.cuda.is_available())
</code></pre>
<p>after installing torch if I’m using Linux now, but I’m not.<br>
If anyone could confirm this, I’d appreciate it!</p>

Aknw_Fen: <p>you can use something like <code>pip freeze | grep cuda</code> and see whether <code>torch+cuda</code> is there as well.</p>
<p>but here the guys from <strong>astral/uv</strong> say that about the gpu installs: <a href="https://docs.astral.sh/uv/guides/integration/pytorch/#configuring-accelerators-with-optional-dependencies" class="inline-onebox" rel="noopener nofollow ugc">PyTorch | uv</a></p>
<p>note that, conversely, the cpu install now has an independent pip index as well for linux.</p>

ptrblck: <p>The default <code>pip install torch</code> wheels always shipped with CUDA runtime dependencies so just copy/paste the command and you’ll see CUDA 12.4 dependencies will be installed too.</p>