Skip to content

Commit ce94b78

Browse files
committed
chore: Add support for PyTorch 2.7.0 and CUDA 12.8
1 parent 6cf77c4 commit ce94b78

File tree

7 files changed

+79
-3
lines changed

7 files changed

+79
-3
lines changed

.github/workflows/building.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,23 @@ jobs:
1212
matrix:
1313
os: [ubuntu-20.04, macos-14, windows-2019, ubuntu-22.04-arm]
1414
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
15-
torch-version: [2.6.0] # [2.5.0]
16-
cuda-version: ['cpu', 'cu118', 'cu121', 'cu124', 'cu126']
15+
torch-version: [2.7.0] # [2.5.0, 2.6.0]
16+
cuda-version: ['cpu', 'cu118', 'cu121', 'cu124', 'cu126', 'cu128']
1717
exclude:
1818
- torch-version: 2.5.0
1919
python-version: '3.13'
2020
- torch-version: 2.5.0
2121
cuda-version: 'cu126'
22+
- torch-version: 2.5.0
23+
cuda-version: 'cu128'
24+
- torch-version: 2.6.0
25+
cuda-version: 'cu121'
2226
- torch-version: 2.6.0
27+
cuda-version: 'cu128'
28+
- torch-version: 2.7.0
2329
cuda-version: 'cu121'
30+
- torch-version: 2.7.0
31+
cuda-version: 'cu124'
2432
- os: macos-14
2533
cuda-version: 'cu118'
2634
- os: macos-14
@@ -29,6 +37,8 @@ jobs:
2937
cuda-version: 'cu124'
3038
- os: macos-14
3139
cuda-version: 'cu126'
40+
- os: macos-14
41+
cuda-version: 'cu128'
3242

3343
steps:
3444
- uses: actions/checkout@v2
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/usr/local/cuda-12.8
4+
LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
5+
PATH=${CUDA_HOME}/bin:${PATH}
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="5.0+PTX;6.0;7.0;7.5;8.0;8.6;9.0"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
OS=ubuntu2004
4+
5+
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
6+
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
7+
wget -nv https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda-repo-${OS}-12-8-local_12.8.0-570.86.10-1_amd64.deb
8+
sudo dpkg -i cuda-repo-${OS}-12-8-local_12.8.0-570.86.10-1_amd64.deb
9+
sudo cp /var/cuda-repo-${OS}-12-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
10+
11+
sudo apt-get -qq update
12+
sudo apt install cuda-nvcc-12-8 cuda-libraries-dev-12-8
13+
sudo apt clean
14+
15+
rm -f https://developer.download.nvidia.com/compute/cuda/12.8.0/local_installers/cuda-repo-${OS}-12-8-local_12.8.0-570.86.10-1_amd64.deb
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/c/Program\ Files/NVIDIA\ GPU\ Computing\ Toolkit/CUDA/v12.8
4+
PATH=${CUDA_HOME}/bin:$PATH
5+
PATH=/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/2017/BuildTools/MSBuild/15.0/Bin:$PATH
6+
7+
export FORCE_CUDA=1
8+
export TORCH_CUDA_ARCH_LIST="6.0+PTX"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
# Install NVIDIA drivers, see:
4+
# https://github.com/pytorch/vision/blob/master/packaging/windows/internal/cuda_install.bat#L99-L102
5+
curl -k -L "https://drive.google.com/u/0/uc?id=1injUyo3lnarMgWyRcXqKg4UGnN0ysmuq&export=download" --output "/tmp/gpu_driver_dlls.zip"
6+
7z x "/tmp/gpu_driver_dlls.zip" -o"/c/Windows/System32"
7+
8+
export CUDA_SHORT=12.8
9+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers
10+
export CUDA_FILE=cuda_${CUDA_SHORT}.0_571.96_windows.exe
11+
12+
# Install CUDA:
13+
curl -k -L "${CUDA_URL}/${CUDA_FILE}" --output "${CUDA_FILE}"
14+
echo ""
15+
echo "Installing from ${CUDA_FILE}..."
16+
PowerShell -Command "Start-Process -FilePath \"${CUDA_FILE}\" -ArgumentList \"-s nvcc_${CUDA_SHORT} cuobjdump_${CUDA_SHORT} nvprune_${CUDA_SHORT} cupti_${CUDA_SHORT} cublas_dev_${CUDA_SHORT} cudart_${CUDA_SHORT} cufft_dev_${CUDA_SHORT} curand_dev_${CUDA_SHORT} cusolver_dev_${CUDA_SHORT} cusparse_dev_${CUDA_SHORT} thrust_${CUDA_SHORT} npp_dev_${CUDA_SHORT} nvrtc_dev_${CUDA_SHORT} nvml_dev_${CUDA_SHORT}\" -Wait -NoNewWindow"
17+
echo "Done!"
18+
rm -f "${CUDA_FILE}"

.github/workflows/testing.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: [ubuntu-latest, windows-latest, ubuntu-22.04-arm]
1818
python-version: [3.9]
19-
torch-version: [2.5.0, 2.6.0]
19+
torch-version: [2.5.0, 2.6.0, 2.7.0]
2020

2121
steps:
2222
- uses: actions/checkout@v2

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,23 @@ All included operations are broadcastable, work on varying data types, are imple
4545

4646
We provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).
4747

48+
#### PyTorch 2.7
49+
50+
To install the binaries for PyTorch 2.7.0, simply run
51+
52+
```
53+
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.7.0+${CUDA}.html
54+
```
55+
56+
where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu126`, or `cu128` depending on your PyTorch installation.
57+
58+
| | `cpu` | `cu118` | `cu126` | `cu128` |
59+
|-------------|-------|---------|---------|---------|
60+
| **Linux** |||||
61+
| **Windows** |||||
62+
| **macOS** || | | |
63+
64+
4865
#### PyTorch 2.6
4966

5067
To install the binaries for PyTorch 2.6.0, simply run

0 commit comments

Comments
 (0)