Skip to content

Commit 10144cc

Browse files
authored
PyTorch 2.6. support (#481)
* update * update * update * update
1 parent 7126aeb commit 10144cc

File tree

11 files changed

+68
-212
lines changed

11 files changed

+68
-212
lines changed

Diff for: .github/workflows/building-conda.yml

-84
This file was deleted.

Diff for: .github/workflows/building.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,22 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: [ubuntu-20.04, macos-14, windows-2019]
14-
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
15-
torch-version: [2.5.0] # [2.3.0, 2.4.0, 2.5.0]
16-
cuda-version: ['cpu', 'cu118', 'cu121', 'cu124']
14+
python-version: ['3.9', '3.10', '3.11', '3.12']
15+
torch-version: [2.6.0] # [2.5.0]
16+
cuda-version: ['cpu', 'cu118', 'cu121', 'cu124', 'cu126']
1717
exclude:
1818
- torch-version: 2.5.0
19-
python-version: '3.8'
20-
- torch-version: 2.3.0
21-
cuda-version: 'cu124'
19+
cuda-version: 'cu126'
20+
- torch-version: 2.6.0
21+
cuda-version: 'cu121'
2222
- os: macos-14
2323
cuda-version: 'cu118'
2424
- os: macos-14
2525
cuda-version: 'cu121'
2626
- os: macos-14
2727
cuda-version: 'cu124'
28+
- os: macos-14
29+
cuda-version: 'cu126'
2830

2931
steps:
3032
- uses: actions/checkout@v2

Diff for: .github/workflows/cuda/cu126-Linux-env.sh

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
CUDA_HOME=/usr/local/cuda-12.6
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"

Diff for: .github/workflows/cuda/cu126-Linux.sh

+15
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.6.0/local_installers/cuda-repo-${OS}-12-6-local_12.6.0-560.28.03-1_amd64.deb
8+
sudo dpkg -i cuda-repo-${OS}-12-6-local_12.6.0-560.28.03-1_amd64.deb
9+
sudo cp /var/cuda-repo-${OS}-12-6-local/cuda-*-keyring.gpg /usr/share/keyrings/
10+
11+
sudo apt-get -qq update
12+
sudo apt install cuda-nvcc-12-6 cuda-libraries-dev-12-6
13+
sudo apt clean
14+
15+
rm -f https://developer.download.nvidia.com/compute/cuda/12.6.0/local_installers/cuda-repo-${OS}-12-6-local_12.6.0-560.28.03-1_amd64.deb

Diff for: .github/workflows/cuda/cu126-Windows-env.sh

+8
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.6
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"

Diff for: .github/workflows/cuda/cu126-Windows.sh

+18
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.6
9+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.0/local_installers
10+
export CUDA_FILE=cuda_${CUDA_SHORT}.0_560.76_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}"

Diff for: .github/workflows/testing.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: [ubuntu-latest, windows-latest]
1818
python-version: [3.9]
19-
torch-version: [2.4.0, 2.5.0]
19+
torch-version: [2.5.0, 2.6.0]
2020

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

Diff for: README.md

+10-19
Original file line numberDiff line numberDiff line change
@@ -41,42 +41,33 @@ All included operations are broadcastable, work on varying data types, are imple
4141

4242
## Installation
4343

44-
### Anaconda
45-
46-
**Update:** You can now install `pytorch-scatter` via [Anaconda](https://anaconda.org/pyg/pytorch-scatter) for all major OS/PyTorch/CUDA combinations 🤗
47-
Given that you have [`pytorch >= 1.8.0` installed](https://pytorch.org/get-started/locally/), simply run
48-
49-
```
50-
conda install pytorch-scatter -c pyg
51-
```
52-
5344
### Binaries
5445

55-
We alternatively provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).
46+
We provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).
5647

57-
#### PyTorch 2.5
48+
#### PyTorch 2.6
5849

59-
To install the binaries for PyTorch 2.5.0, simply run
50+
To install the binaries for PyTorch 2.6.0, simply run
6051

6152
```
62-
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.0+${CUDA}.html
53+
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.6.0+${CUDA}.html
6354
```
6455

65-
where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu121`, or `cu124` depending on your PyTorch installation.
56+
where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu124`, or `cu126` depending on your PyTorch installation.
6657

67-
| | `cpu` | `cu118` | `cu121` | `cu124` |
58+
| | `cpu` | `cu118` | `cu124` | `cu126` |
6859
|-------------|-------|---------|---------|---------|
6960
| **Linux** |||||
7061
| **Windows** |||||
7162
| **macOS** || | | |
7263

7364

74-
#### PyTorch 2.4
65+
#### PyTorch 2.5
7566

76-
To install the binaries for PyTorch 2.4.0, simply run
67+
To install the binaries for PyTorch 2.5.0/2.5.1, simply run
7768

7869
```
79-
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.4.0+${CUDA}.html
70+
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.5.0+${CUDA}.html
8071
```
8172

8273
where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu121`, or `cu124` depending on your PyTorch installation.
@@ -87,7 +78,7 @@ where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu121`, or `cu124`
8778
| **Windows** |||||
8879
| **macOS** || | | |
8980

90-
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, PyTorch 1.10.0/1.10.1/1.10.2, PyTorch 1.11.0, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, PyTorch 2.1.0/2.1.1/2.1.2, PyTorch 2.2.0/2.2.1/2.2.2, and PyTorch 2.3.0/2.3.1 (following the same procedure).
81+
**Note:** Binaries of older versions are also provided for PyTorch 1.4.0, PyTorch 1.5.0, PyTorch 1.6.0, PyTorch 1.7.0/1.7.1, PyTorch 1.8.0/1.8.1, PyTorch 1.9.0, PyTorch 1.10.0/1.10.1/1.10.2, PyTorch 1.11.0, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, PyTorch 2.1.0/2.1.1/2.1.2, PyTorch 2.2.0/2.2.1/2.2.2, PyTorch 2.3.0/2.3.1, and PyTorch 2.4.0/2.4.1 (following the same procedure).
9182
For older versions, you need to explicitly specify the latest supported version number or install via `pip install --no-index` in order to prevent a manual installation from source.
9283
You can look up the latest supported version number [here](https://data.pyg.org/whl).
9384

Diff for: conda/pytorch-scatter/README.md

-3
This file was deleted.

Diff for: conda/pytorch-scatter/build_conda.sh

-62
This file was deleted.

Diff for: conda/pytorch-scatter/meta.yaml

-37
This file was deleted.

0 commit comments

Comments
 (0)