From ad7da91724b97512684bbebcab46719c5c4a24ae Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Tue, 2 Jun 2026 16:40:00 -0700 Subject: [PATCH] Add PyTorch 2.12 support --- .github/workflows/building.yml | 14 ++++++------ .github/workflows/cuda/cu132-Linux-env.sh | 8 +++++++ .github/workflows/cuda/cu132-Linux.sh | 17 +++++++++++++++ .github/workflows/testing.yml | 2 +- README.md | 26 +++++++++++------------ 5 files changed, 47 insertions(+), 20 deletions(-) create mode 100644 .github/workflows/cuda/cu132-Linux-env.sh create mode 100755 .github/workflows/cuda/cu132-Linux.sh diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index fb2330d5..b5f4dbf5 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -16,23 +16,25 @@ jobs: matrix: os: [ubuntu-22.04, macos-14, windows-2022, ubuntu-22.04-arm] python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] - torch-version: [2.11.0] - cuda-version: ['cpu', 'cu126', 'cu128', 'cu130'] + torch-version: [2.12.0] + cuda-version: ['cpu', 'cu126', 'cu130', 'cu132'] exclude: - os: windows-2022 cuda-version: 'cu130' + - os: windows-2022 + cuda-version: 'cu132' - os: macos-14 cuda-version: 'cu126' - - os: macos-14 - cuda-version: 'cu128' - os: macos-14 cuda-version: 'cu130' + - os: macos-14 + cuda-version: 'cu132' - os: ubuntu-22.04-arm cuda-version: 'cu126' - - os: ubuntu-22.04-arm - cuda-version: 'cu128' - os: ubuntu-22.04-arm cuda-version: 'cu130' + - os: ubuntu-22.04-arm + cuda-version: 'cu132' steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cuda/cu132-Linux-env.sh b/.github/workflows/cuda/cu132-Linux-env.sh new file mode 100644 index 00000000..fccd0c44 --- /dev/null +++ b/.github/workflows/cuda/cu132-Linux-env.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +CUDA_HOME=/usr/local/cuda-13.2 +LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH} +PATH=${CUDA_HOME}/bin:${PATH} + +export FORCE_CUDA=1 +export TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;9.0;10.0;12.0+PTX" diff --git a/.github/workflows/cuda/cu132-Linux.sh b/.github/workflows/cuda/cu132-Linux.sh new file mode 100755 index 00000000..72967712 --- /dev/null +++ b/.github/workflows/cuda/cu132-Linux.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +OS=ubuntu2204 + +wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin +sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600 + +wget -nv https://developer.download.nvidia.com/compute/cuda/13.2.0/local_installers/cuda-repo-${OS}-13-2-local_13.2.0-595.45.04-1_amd64.deb + +sudo dpkg -i cuda-repo-${OS}-13-2-local_13.2.0-595.45.04-1_amd64.deb +sudo cp /var/cuda-repo-${OS}-13-2-local/cuda-*-keyring.gpg /usr/share/keyrings/ + +sudo apt-get -qq update +sudo apt install cuda-nvcc-13-2 cuda-libraries-dev-13-2 +sudo apt clean + +rm -f *.deb diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index d4355830..0ca7e379 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -20,7 +20,7 @@ jobs: matrix: os: [ubuntu-latest, macos-latest, windows-2022] python-version: ['3.10'] - torch-version: [2.11.0] + torch-version: [2.12.0] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index c3e5b6b3..d9034e56 100644 --- a/README.md +++ b/README.md @@ -34,28 +34,28 @@ Note that only `value` comes with autograd support, as `index` is discrete and t We provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl). -#### PyTorch 2.11 +#### PyTorch 2.12 -To install the binaries for PyTorch 2.11, simply run +To install the binaries for PyTorch 2.12, simply run ``` -pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.11.0+${CUDA}.html +pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.12.0+${CUDA}.html ``` -where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation. +where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu130`, or `cu132` depending on your PyTorch installation. -| | `cpu` | `cu126` | `cu128` | `cu130` | +| | `cpu` | `cu126` | `cu130` | `cu132` | |-------------|-------|---------|---------|---------| | **Linux** | ✅ | ✅ | ✅ | ✅ | -| **Windows** | ✅ | ✅ | ✅ | ✅ | +| **Windows** | ✅ | ✅ | | | | **macOS** | ✅ | | | | -#### PyTorch 2.10 +#### PyTorch 2.11 -To install the binaries for PyTorch 2.10, simply run +To install the binaries for PyTorch 2.11, simply run ``` -pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.10.0+${CUDA}.html +pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.11.0+${CUDA}.html ``` where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation. @@ -66,12 +66,12 @@ where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` | **Windows** | ✅ | ✅ | ✅ | ✅ | | **macOS** | ✅ | | | | -#### PyTorch 2.9 +#### PyTorch 2.10 -To install the binaries for PyTorch 2.9, simply run +To install the binaries for PyTorch 2.10, simply run ``` -pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.9.0+${CUDA}.html +pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.10.0+${CUDA}.html ``` where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation. @@ -82,7 +82,7 @@ where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` | **Windows** | ✅ | ✅ | ✅ | ✅ | | **macOS** | ✅ | | | | -**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, PyTorch 2.4.0/2.4.1, PyTorch 2.5.0/2.5.1, PyTorch 2.6.0, PyTorch 2.7.0/2.7.1, and PyTorch 2.8.0 (following the same procedure). +**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, PyTorch 2.4.0/2.4.1, PyTorch 2.5.0/2.5.1, PyTorch 2.6.0, PyTorch 2.7.0/2.7.1, PyTorch 2.8.0, and PyTorch 2.9.0 (following the same procedure). 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. You can look up the latest supported version number [here](https://data.pyg.org/whl).