Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the command to install pytorch with cuda 12.8?

Tags:

python

pytorch

I notice on the website of pytorch (https://pytorch.org/get-started/locally/) there is a command for cuda 12.6 but not for the latest version of cuda which is 12.8.

Is there a command specifically for cuda 12.8?

Will the command for cuda 12.6 work if I'm using cuda 12.8?

like image 513
Chris Avatar asked Oct 25 '25 01:10

Chris


2 Answers

The command to install the stable version of PyTorch (2.7.0) with CUDA 12.8 using pip on Linux is:

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128
like image 74
MDR Avatar answered Oct 26 '25 17:10

MDR


as of now, pytorch which supports cuda 12.8 is not released yet.

but unofficial support released nightly version of it.

here are the commands to install it. so with this pytorch version you can use it on rtx 50XX. I've got 5080 and it works just fine.

pip install --pre torch==2.8.0.dev20250324+cu128 torchvision==0.22.0.dev20250325+cu128 torchaudio==2.6.0.dev20250325+cu128 --index-url https://download.pytorch.org/whl/nightly/cu128

like image 28
Ali Bakhtiari Avatar answered Oct 26 '25 15:10

Ali Bakhtiari



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!