Which cuda version to choose when installing pytorch

Hi, I am new to using pytorch and I have a question about installation.

In the guide, I have to choose the Cuda version I want to install (Compute Platform) where I can choose CUDA 11.8, CUDA12.4 or CUDA 12.6. As I check my cuda version, I have CUDA 12.7. Which one should I choose when installing the pytorch library?

Thanks so much.

PyTorch binaries ship with their own CUDA runtime dependencies and you would only need to install an NVIDIA driver. Since your driver is new enough you can install any PyTorch binary and I would recommend sticking with the latest, i.e. CUDA 12.6.3 unless you have a Blackwell GPU which requires CUDA 12.8.

1 Like

Hi ptrblck, I was excited to see the new CUDA 12.8 support in the nightly builds — I’ve waited too long for this because my Blackwell GPU can’t work without cu128.

When I installed it with:
pip3 install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128

it returned:

ERROR: Could not find a version that satisfies the requirement torchaudio (from versions: none)

Any idea why this happens? Thanks for your help!

Remove torchaudio from your install command for now as the build or upload seems to fail.

Okay, I’ll try again. Thank you.

I also encountered similar problems and look forward to pythorch being released as soon as possible