From 2de2b992761c400da5a212c669743f73b82acc37 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Sat, 7 Mar 2026 18:09:15 +0000 Subject: [PATCH 1/7] update --- .github/workflows/building.yml | 32 +++++------------------ .github/workflows/cuda/cu130-Linux-env.sh | 8 ++++++ .github/workflows/cuda/cu130-Linux.sh | 17 ++++++++++++ .github/workflows/testing.yml | 4 +-- README.md | 32 +++++++++++------------ setup.py | 1 + 6 files changed, 51 insertions(+), 43 deletions(-) create mode 100644 .github/workflows/cuda/cu130-Linux-env.sh create mode 100755 .github/workflows/cuda/cu130-Linux.sh diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index 3ab50ca0..ba56abeb 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -11,42 +11,24 @@ jobs: fail-fast: false matrix: os: [ubuntu-22.04, macos-14, windows-2022, ubuntu-22.04-arm] - python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] - torch-version: [2.8.0] - cuda-version: ['cpu', 'cu118', 'cu124', 'cu126', 'cu128', 'cu129'] + python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] + torch-version: [2.9.0, 2.10.0] + cuda-version: ['cpu', 'cu126', 'cu128', 'cu130'] exclude: - - torch-version: 2.6.0 - cuda-version: 'cu128' - - torch-version: 2.6.0 - cuda-version: 'cu129' - - torch-version: 2.7.0 - cuda-version: 'cu124' - - torch-version: 2.7.0 - cuda-version: 'cu129' - - torch-version: 2.8.0 - cuda-version: 'cu118' - - torch-version: 2.8.0 - cuda-version: 'cu124' - - os: macos-14 - cuda-version: 'cu118' - - os: macos-14 - cuda-version: 'cu124' + - os: windows-2022 + cuda-version: 'cu130' - os: macos-14 cuda-version: 'cu126' - os: macos-14 cuda-version: 'cu128' - os: macos-14 - cuda-version: 'cu129' - - os: ubuntu-22.04-arm - cuda-version: 'cu118' - - os: ubuntu-22.04-arm - cuda-version: 'cu124' + cuda-version: 'cu130' - os: ubuntu-22.04-arm cuda-version: 'cu126' - os: ubuntu-22.04-arm cuda-version: 'cu128' - os: ubuntu-22.04-arm - cuda-version: 'cu129' + cuda-version: 'cu130' steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/cuda/cu130-Linux-env.sh b/.github/workflows/cuda/cu130-Linux-env.sh new file mode 100644 index 00000000..01b37b66 --- /dev/null +++ b/.github/workflows/cuda/cu130-Linux-env.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +CUDA_HOME=/usr/local/cuda-13.0 +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/cu130-Linux.sh b/.github/workflows/cuda/cu130-Linux.sh new file mode 100755 index 00000000..28d36bfd --- /dev/null +++ b/.github/workflows/cuda/cu130-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.0.2/local_installers/cuda-repo-${OS}-13-0-local_13.0.2-580.95.05-1_amd64.deb + +sudo dpkg -i cuda-repo-${OS}-13-0-local_13.0.2-580.95.05-1_amd64.deb +sudo cp /var/cuda-repo-${OS}-13-0-local/cuda-*-keyring.gpg /usr/share/keyrings/ + +sudo apt-get -qq update +sudo apt install cuda-nvcc-13-0 cuda-libraries-dev-13-0 +sudo apt clean + +rm -f *.deb diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 121553e4..da132ec4 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -15,8 +15,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - python-version: [3.9] - torch-version: [2.7.0, 2.8.0] + python-version: ['3.10'] + torch-version: [2.9.0, 2.10.0] steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index cb1f2bb4..0ed282cf 100644 --- a/README.md +++ b/README.md @@ -34,55 +34,55 @@ All included operations work on varying data types and are implemented both for We provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl). -#### PyTorch 2.8 +#### PyTorch 2.10 -To install the binaries for PyTorch 2.8.0, simply run +To install the binaries for PyTorch 2.10, simply run ``` -pip install torch-cluster -f https://data.pyg.org/whl/torch-2.8.0+${CUDA}.html +pip install torch-cluster -f https://data.pyg.org/whl/torch-2.10.0+${CUDA}.html ``` -where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu129` depending on your PyTorch installation. +where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation. -| | `cpu` | `cu126` | `cu128` | `cu129` | +| | `cpu` | `cu126` | `cu128` | `cu130` | |-------------|-------|---------|---------|---------| | **Linux** | ✅ | ✅ | ✅ | ✅ | | **Windows** | ✅ | ✅ | ✅ | ✅ | | **macOS** | ✅ | | | | -#### PyTorch 2.7 +#### PyTorch 2.9 -To install the binaries for PyTorch 2.7.0, simply run +To install the binaries for PyTorch 2.9, simply run ``` -pip install torch-cluster -f https://data.pyg.org/whl/torch-2.7.0+${CUDA}.html +pip install torch-cluster -f https://data.pyg.org/whl/torch-2.9.0+${CUDA}.html ``` -where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu126`, or `cu128` depending on your PyTorch installation. +where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu130` depending on your PyTorch installation. -| | `cpu` | `cu118` | `cu126` | `cu128` | +| | `cpu` | `cu126` | `cu128` | `cu130` | |-------------|-------|---------|---------|---------| | **Linux** | ✅ | ✅ | ✅ | ✅ | | **Windows** | ✅ | ✅ | ✅ | ✅ | | **macOS** | ✅ | | | | -#### PyTorch 2.6 +#### PyTorch 2.8 -To install the binaries for PyTorch 2.6.0, simply run +To install the binaries for PyTorch 2.8, simply run ``` -pip install torch-cluster -f https://data.pyg.org/whl/torch-2.6.0+${CUDA}.html +pip install torch-cluster -f https://data.pyg.org/whl/torch-2.8.0+${CUDA}.html ``` -where `${CUDA}` should be replaced by either `cpu`, `cu118`, `cu124`, or `cu126` depending on your PyTorch installation. +where `${CUDA}` should be replaced by either `cpu`, `cu126`, `cu128`, or `cu129` depending on your PyTorch installation. -| | `cpu` | `cu118` | `cu124` | `cu126` | +| | `cpu` | `cu126` | `cu128` | `cu129` | |-------------|-------|---------|---------|---------| | **Linux** | ✅ | ✅ | ✅ | ✅ | | **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, and PyTorch 2.5.0/2.5.1 (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, and PyTorch 2.7.0/2.7.1 (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). diff --git a/setup.py b/setup.py index 1ef90ab9..cf20f686 100644 --- a/setup.py +++ b/setup.py @@ -72,6 +72,7 @@ def get_extensions(): nvcc_flags = os.getenv('NVCC_FLAGS', '') nvcc_flags = [] if nvcc_flags == '' else nvcc_flags.split(' ') nvcc_flags += ['-O2'] + nvcc_flags += ['-DTORCH_INDUCTOR_CPP_WRAPPER'] extra_compile_args['nvcc'] = nvcc_flags if torch.version.hip: From 48f7c8be12928374d641ee3c5657380c58cb41d7 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Sat, 7 Mar 2026 19:37:03 +0000 Subject: [PATCH 2/7] update --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index da132ec4..6e188860 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -36,7 +36,7 @@ jobs: - name: Install main package run: | - python setup.py develop + pip install -e . -v --no-build-isolation - name: Run test-suite run: | From ac1eae9df7bfb823745662bf3218b1dde403b748 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Sat, 7 Mar 2026 19:45:36 +0000 Subject: [PATCH 3/7] update --- .github/workflows/testing.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 6e188860..fc5acbc6 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -30,13 +30,12 @@ jobs: pip install torch==${{ matrix.torch-version }} --extra-index-url https://download.pytorch.org/whl/cpu - name: Install scipy - if: ${{ matrix.python-version == '3.9' }} run: | - pip install scipy==1.10.1 + pip install scipy - name: Install main package run: | - pip install -e . -v --no-build-isolation + python setup.py develop - name: Run test-suite run: | From 00e4a5a31eb4c9870e858381dde14f30bc108857 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Mon, 9 Mar 2026 09:45:44 +0000 Subject: [PATCH 4/7] update --- .github/workflows/building.yml | 3 ++- torch_cluster/nearest.py | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index ba56abeb..53b9eb3e 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -10,7 +10,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-22.04, macos-14, windows-2022, ubuntu-22.04-arm] + os: [windows-2022] + # 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.9.0, 2.10.0] cuda-version: ['cpu', 'cu126', 'cu128', 'cu130'] diff --git a/torch_cluster/nearest.py b/torch_cluster/nearest.py index 1ba4db6e..ce3dae79 100644 --- a/torch_cluster/nearest.py +++ b/torch_cluster/nearest.py @@ -120,5 +120,7 @@ def nearest( y = torch.cat([y, 2 * D * batch_y.view(-1, 1).to(y.dtype)], -1) return torch.from_numpy( - scipy.cluster.vq.vq(x.detach().cpu(), - y.detach().cpu())[0]).to(torch.long) + scipy.cluster.vq.vq( + x.detach().cpu().float(), + y.detach().cpu().float(), + )[0]).to(torch.long) From 6fab3692696a899daf33ffd6d78976cbb3992367 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Mon, 9 Mar 2026 09:53:34 +0000 Subject: [PATCH 5/7] update --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index cf20f686..e36cc430 100644 --- a/setup.py +++ b/setup.py @@ -73,6 +73,8 @@ def get_extensions(): nvcc_flags = [] if nvcc_flags == '' else nvcc_flags.split(' ') nvcc_flags += ['-O2'] nvcc_flags += ['-DTORCH_INDUCTOR_CPP_WRAPPER'] + if sys.platform == 'win32': + nvcc_flags += ['-D_WIN32=1'] extra_compile_args['nvcc'] = nvcc_flags if torch.version.hip: From 84657d3c8b73f773fee24c6efee3f4a7ea91ebb2 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Mon, 9 Mar 2026 10:03:24 +0000 Subject: [PATCH 6/7] update --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index e36cc430..4d689707 100644 --- a/setup.py +++ b/setup.py @@ -74,7 +74,7 @@ def get_extensions(): nvcc_flags += ['-O2'] nvcc_flags += ['-DTORCH_INDUCTOR_CPP_WRAPPER'] if sys.platform == 'win32': - nvcc_flags += ['-D_WIN32=1'] + nvcc_flags += ['-Xcompiler', '/permissive-'] extra_compile_args['nvcc'] = nvcc_flags if torch.version.hip: From 4158bdba55aa276b1aa6ee428797ffa8a7143bb4 Mon Sep 17 00:00:00 2001 From: rusty1s Date: Mon, 9 Mar 2026 11:04:58 +0000 Subject: [PATCH 7/7] update --- .github/workflows/building.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/building.yml b/.github/workflows/building.yml index 53b9eb3e..ba56abeb 100644 --- a/.github/workflows/building.yml +++ b/.github/workflows/building.yml @@ -10,8 +10,7 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-2022] - # os: [ubuntu-22.04, macos-14, windows-2022, ubuntu-22.04-arm] + 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.9.0, 2.10.0] cuda-version: ['cpu', 'cu126', 'cu128', 'cu130']