Skip to content

Commit 6dabb04

Browse files
authored
Support PyTorch 2.8 (#258)
Part of pyg-team/pytorch_geometric#10398.
1 parent 3d1d9e3 commit 6dabb04

File tree

9 files changed

+92
-13
lines changed

9 files changed

+92
-13
lines changed

.github/workflows/building.yml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,22 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-22.04, macos-14, windows-2019, ubuntu-22.04-arm]
13+
os: [ubuntu-22.04, macos-14, windows-2022, ubuntu-22.04-arm]
1414
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
15-
torch-version: [2.7.0] # [2.6.0]
16-
cuda-version: ['cpu', 'cu118', 'cu124', 'cu126', 'cu128']
15+
torch-version: [2.8.0]
16+
cuda-version: ['cpu', 'cu118', 'cu124', 'cu126', 'cu128', 'cu129']
1717
exclude:
1818
- torch-version: 2.6.0
1919
cuda-version: 'cu128'
20+
- torch-version: 2.6.0
21+
cuda-version: 'cu129'
22+
- torch-version: 2.7.0
23+
cuda-version: 'cu124'
2024
- torch-version: 2.7.0
25+
cuda-version: 'cu129'
26+
- torch-version: 2.8.0
27+
cuda-version: 'cu118'
28+
- torch-version: 2.8.0
2129
cuda-version: 'cu124'
2230
- os: macos-14
2331
cuda-version: 'cu118'
@@ -27,6 +35,8 @@ jobs:
2735
cuda-version: 'cu126'
2836
- os: macos-14
2937
cuda-version: 'cu128'
38+
- os: macos-14
39+
cuda-version: 'cu129'
3040
- os: ubuntu-22.04-arm
3141
cuda-version: 'cu118'
3242
- os: ubuntu-22.04-arm
@@ -35,11 +45,13 @@ jobs:
3545
cuda-version: 'cu126'
3646
- os: ubuntu-22.04-arm
3747
cuda-version: 'cu128'
48+
- os: ubuntu-22.04-arm
49+
cuda-version: 'cu129'
3850

3951
steps:
40-
- uses: actions/checkout@v2
52+
- uses: actions/checkout@v4
4153
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v2
54+
uses: actions/setup-python@v5
4355
with:
4456
python-version: ${{ matrix.python-version }}
4557

@@ -49,7 +61,7 @@ jobs:
4961
pip install wheel
5062
5163
- name: Install scipy
52-
if: ${{ (matrix.python-version == '3.8') || (matrix.python-version == '3.9') }}
64+
if: ${{ matrix.python-version == '3.9' }}
5365
run: |
5466
pip install scipy==1.10.1
5567
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.9
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="7.0;7.5;8.0;8.6;9.0;10.0;12.0+PTX"
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
OS=ubuntu2204
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+
8+
wget -nv https://developer.download.nvidia.com/compute/cuda/12.9.1/local_installers/cuda-repo-${OS}-12-9-local_12.9.1-575.57.08-1_amd64.deb
9+
10+
sudo dpkg -i cuda-repo-${OS}-12-9-local_12.9.1-575.57.08-1_amd64.deb
11+
sudo cp /var/cuda-repo-${OS}-12-9-local/cuda-*-keyring.gpg /usr/share/keyrings/
12+
13+
sudo apt-get -qq update
14+
sudo apt install cuda-nvcc-12-9 cuda-libraries-dev-12-9
15+
sudo apt clean
16+
17+
rm -f *.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.9
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.9
9+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers
10+
export CUDA_FILE=cuda_${CUDA_SHORT}.1_576.57_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/linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v4
1616

1717
- name: Set up Python
18-
uses: actions/setup-python@v2
18+
uses: actions/setup-python@v5
1919
with:
20-
python-version: 3.8
20+
python-version: 3.9
2121

2222
- name: Install dependencies
2323
run: |

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/stale@v4.0.0
14+
- uses: actions/stale@v9
1515
with:
1616
stale-issue-message: 'This issue had no activity for **6 months**. It will be closed in **2 weeks** unless there is some new activity. Is this issue already resolved?'
1717
stale-issue-label: 'stale'

.github/workflows/testing.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
matrix:
1717
os: [ubuntu-latest, windows-latest]
1818
python-version: [3.9]
19-
torch-version: [2.6.0, 2.7.0]
19+
torch-version: [2.7.0, 2.8.0]
2020

2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v4
2323
- name: Set up Python ${{ matrix.python-version }}
24-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,22 @@ All included operations work on varying data types and are implemented both for
3434

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

37+
#### PyTorch 2.8
38+
39+
To install the binaries for PyTorch 2.8.0, simply run
40+
41+
```
42+
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.8.0+${CUDA}.html
43+
```
44+
45+
where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu129` depending on your PyTorch installation.
46+
47+
| | `cpu` | `cu126` | `cu128` | `cu129` |
48+
|-------------|-------|---------|---------|---------|
49+
| **Linux** |||||
50+
| **Windows** |||||
51+
| **macOS** || | | |
52+
3753
#### PyTorch 2.7
3854

3955
To install the binaries for PyTorch 2.7.0, simply run

0 commit comments

Comments
 (0)