PyTorch Release 2.4.0 - Final RC is available

Final 2.4.0 RC for PyTorch core and Domain Libraries is available for download from pytorch-test channel.

Reminder of key dates:

  • M5: External-Facing Content Finalized (7/19/24)
  • M6: Release Day (7/24/24)

List of Issues included in the Patch Release 2.4.0 can be found here: 2.4.0 Milestone

Cherry-Picks included in the Patch Release 2.4.0 can be found here: [v2.4.0] Release Tracker

Following are instructions on how to download different versions of RC for testing.

CONDA CPU
Windows/Linux:
conda install pytorch=2.4.0 torchvision torchaudio cpuonly -c pytorch-test

MacOS:
conda install pytorch=2.4.0 torchvision torchaudio -c pytorch-test

CUDA
Windows/Linux:
conda install pytorch=2.4.0 torchvision torchaudio pytorch-cuda=11.8 -c pytorch-test -c nvidia
conda install pytorch=2.4.0 torchvision torchaudio pytorch-cuda=12.1 -c pytorch-test -c nvidia
conda install pytorch=2.4.0 torchvision torchaudio pytorch-cuda=12.4 -c pytorch-test -c nvidia

PIP CPU:
Windows/Linux/MacOS:
pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cpu

PIP CUDA:
Windows/Linux:
pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu118

pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu121

pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu124

PIP ROCM 6.1:
pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/rocm6.1

PIP Linux Aarch64
pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cpu

LibTorch:
CPU Linux:
(Pre-cxx11 ABI):
https://download.pytorch.org/libtorch/test/cpu/libtorch-shared-with-deps-2.4.0%2Bcpu.zip

(cxx11 ABI):
https://download.pytorch.org/libtorch/test/cpu/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcpu.zip

CPU Windows:
Download here (Release version):
https://download.pytorch.org/libtorch/test/cpu/libtorch-win-shared-with-deps-2.4.0%2Bcpu.zip

Download here (Debug version):
https://download.pytorch.org/libtorch/test/cpu/libtorch-win-shared-with-deps-debug-2.4.0%2Bcpu.zip

CUDA 11.8, 12.1, 12.4 Linux

(Pre-cxx11 ABI):
https://download.pytorch.org/libtorch/test/cu118/libtorch-shared-with-deps-2.4.0%2Bcu118.zip
https://download.pytorch.org/libtorch/test/cu121/libtorch-shared-with-deps-2.4.0%2Bcu121.zip
https://download.pytorch.org/libtorch/test/cu124/libtorch-shared-with-deps-2.4.0%2Bcu124.zip

(cxx11 ABI):
https://download.pytorch.org/libtorch/test/cu118/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu118.zip
https://download.pytorch.org/libtorch/test/cu121/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu121.zip
https://download.pytorch.org/libtorch/test/cu124/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcu124.zip

Windows CUDA 11.8, 12.1, 12.4

(Release version):
https://download.pytorch.org/libtorch/test/cu118/libtorch-win-shared-with-deps-2.4.0%2Bcu118.zip
https://download.pytorch.org/libtorch/test/cu121/libtorch-win-shared-with-deps-2.4.0%2Bcu121.zip
https://download.pytorch.org/libtorch/test/cu124/libtorch-win-shared-with-deps-2.4.0%2Bcu124.zip

(Debug version):
https://download.pytorch.org/libtorch/test/cu118/libtorch-win-shared-with-deps-debug-2.4.0%2Bcu118.zip
https://download.pytorch.org/libtorch/test/cu121/libtorch-win-shared-with-deps-debug-2.4.0%2Bcu121.zip
https://download.pytorch.org/libtorch/test/cu124/libtorch-win-shared-with-deps-debug-2.4.0%2Bcu124.zip

If you have any questions please comment below or reach out to us on this thread.

1 Like

Just a typo, should delete [ in:

PIP CUDA:
Windows/Linux:

pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu121

pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu124

I tried to install torch 2.4 with cuda 12.4 using the above last pip3.

It went through cleanly with no error.

A. When I tried to confirm torch-cuda link with

import torch
device = torch.device(ā€˜cudaā€™ if torch.cuda.is_available() else ā€˜cpuā€™)

I got import torch error.

Please help.

B. Using nvcc --version, it shows CUDA 12.5 which I installed a few weeks ago. Thought it should be 12.4 now after the above installation.

Please help.

C. I cannot find Cuda 12.4 in my ā€œNVIDIA GPU Computing Toolkitā€ drive. I need to separately install that with Nvidia apps? I have cuda 12.5 directory in there.

Please help.

D. No 12.4 in my envir variables. I need to separately complete that?

Please help.

I thought this is a once through complete installation but now this.

Many thanks for your helpā€¦

Hi Philip.
Please follow instructions from Getting Started page:
Start Locally | PyTorch and during pip3 installation use:

pip3 install torch==2.4.0 torchvision torchaudio --index-url https://download.pytorch.org/whl/test/cu124

You donā€™t need to install additional packages pip3 install should download and install all required cuda dependencies. However it will not create 12.4 Environment variables. Have you tried installing on newly created Conda environment or Python environment ?

If you are still having issues. Could you please submit detailed issue here ?:

Please include detailed install commands and the output of these commands and errors you are getting.
Also Please run following and post an output in the issue:

wget https://raw.githubusercontent.com/pytorch/pytorch/main/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py

Thank you. This is Done!

Noted and many thanks.

I tried the given steps, no success. I was about to give up, uninstall Python, Pytorch, related apps, and try again on 7-24 with the new release on a clean platform.

Holding back my horses, decided to check my MVS installation. Checked GPTChat on which module I should use for Cuda. I used ā€œData Science and analytical applicationā€ module before. As per ChatGPT, I installed now ā€œDesktop development with C++ā€. Restarting, now Pytorch and Cuda link is OK!

Sharing it here for beginners like me. No offense to anyone, I do find web instructions on Python etc rather vague, mainly due to my limited computer knowledge on the subject.

Happier now! Thanks to all your help.

P/S I suggest to mention which C++ module to install in MVS as part of this Pytorch Cuda instruction. Just a line will do.

Hey, thank you for your work. Iā€™ve noticed that Intelā€™s XPU is now officially supported by PyTorch, but I havenā€™t been successful in manually compiling it. Could you provide a pre-compiled version (preferably with Triton)? Alternatively, would it be possible to contact the Intel team to provide a compiled Docker image?