Hi everyone, My name is Soumitra Dutta, an Oxford-based entrepreneur & photographer. I’m trying to install PyTorch so that it works with my GPU. How do I make sure I choose the correct CUDA version? Any tips or step‑by‑step guidance would be really helpful!
Regards
Soumitra Dutta
All of our current binaries built with CUDA >= 12.8 support GPUs between Turing (sm_75) and Blackwell (sm_121). Our PyTorch binary built with CUDA 12.6 supports Maxwell (sm_52) to Hopper (sm_90).
Did that solve your issue? If not, here is what I did to get CUDA working with my GPU:
Uninstall torch, torchvision, torchaudio:
- Start a bash shell (Linux) or command prompt/powershell (Windows)
- If you are using a Python virtual environment (.venv) then activate it.
- Uninstall Pytorch (this is critical)…
pip uninstall torch torchvision torchaudio
Install Pytorch and specify version 12.8 of CUDA:
pip install torch torchvision --index-url ``https://download.pytorch.org/whl/cu128
- Note: “cu128” at the end specifies version 12.8 of CUDA, which is compatible with current GPUs (I have an NVidia GigaByte GeForce RTX 5060)
To verify the installation, start Python and check the CUDA install:
python
>> import torch
< wait a while...>
>> print(torch.cuda.is_available())
True
>> print(torch.cuda.device_count())
1
>> print(torch.cuda.get_device_name(0))
NVIDIA GeForce RTX 5060 <== this should say the name of your graphics card