Skip to content

Commit 4be424c

Browse files
Merge branch 'master' into master
2 parents 9d916ed + cdfbc7e commit 4be424c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+321
-352
lines changed

.github/workflows/building-conda.yml

Lines changed: 0 additions & 99 deletions
This file was deleted.

.github/workflows/building.yml

Lines changed: 50 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Building Wheels
22

33
on: [workflow_dispatch]
44

5+
defaults:
6+
run:
7+
shell: bash
8+
59
jobs:
610

711
wheel:
@@ -10,38 +14,61 @@ jobs:
1014
strategy:
1115
fail-fast: false
1216
matrix:
13-
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']
17+
os: [ubuntu-22.04, macos-14, windows-2022, ubuntu-22.04-arm]
18+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
19+
torch-version: [2.8.0]
20+
cuda-version: ['cpu', 'cu118', 'cu124', 'cu126', 'cu128', 'cu129']
1721
exclude:
18-
- torch-version: 2.5.0
19-
python-version: '3.8'
20-
- torch-version: 2.3.0
22+
- torch-version: 2.6.0
23+
cuda-version: 'cu128'
24+
- torch-version: 2.6.0
25+
cuda-version: 'cu129'
26+
- torch-version: 2.7.0
27+
cuda-version: 'cu124'
28+
- torch-version: 2.7.0
29+
cuda-version: 'cu129'
30+
- torch-version: 2.8.0
31+
cuda-version: 'cu118'
32+
- torch-version: 2.8.0
2133
cuda-version: 'cu124'
2234
- os: macos-14
2335
cuda-version: 'cu118'
2436
- os: macos-14
25-
cuda-version: 'cu121'
37+
cuda-version: 'cu124'
2638
- os: macos-14
39+
cuda-version: 'cu126'
40+
- os: macos-14
41+
cuda-version: 'cu128'
42+
- os: macos-14
43+
cuda-version: 'cu129'
44+
- os: ubuntu-22.04-arm
45+
cuda-version: 'cu118'
46+
- os: ubuntu-22.04-arm
2747
cuda-version: 'cu124'
48+
- os: ubuntu-22.04-arm
49+
cuda-version: 'cu126'
50+
- os: ubuntu-22.04-arm
51+
cuda-version: 'cu128'
52+
- os: ubuntu-22.04-arm
53+
cuda-version: 'cu129'
2854

2955
steps:
30-
- uses: actions/checkout@v2
56+
- uses: actions/checkout@v4
3157
with:
3258
submodules: 'recursive'
3359

3460
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v2
61+
uses: actions/setup-python@v5
3662
with:
3763
python-version: ${{ matrix.python-version }}
3864

3965
- name: Upgrade pip
4066
run: |
4167
pip install --upgrade setuptools
68+
pip install wheel
4269
4370
- name: Install scipy
44-
if: ${{ (matrix.python-version == '3.8') || (matrix.python-version == '3.9') }}
71+
if: ${{ matrix.python-version == '3.9' }}
4572
run: |
4673
pip install scipy==1.10.1
4774
@@ -69,8 +96,6 @@ jobs:
6996
echo "New version name: $VERSION+$TORCH_VERSION$CUDA_VERSION"
7097
sed -i "s/$VERSION/$VERSION+$TORCH_VERSION$CUDA_VERSION/" setup.py
7198
sed -i "s/$VERSION/$VERSION+$TORCH_VERSION$CUDA_VERSION/" torch_sparse/__init__.py
72-
shell:
73-
bash
7499
75100
- name: Install torch-scatter
76101
run: |
@@ -80,35 +105,30 @@ jobs:
80105
if: ${{ runner.os != 'Windows' }}
81106
run: |
82107
bash .github/workflows/metis.sh
108+
echo WITH_METIS=1 >> $GITHUB_ENV
83109
84110
- name: Install METIS on Windows
85111
if: ${{ runner.os == 'Windows' }}
86112
run: |
87-
bash .github/workflows/metis-${{ runner.os }}.sh
113+
# bash .github/workflows/metis-${{ runner.os }}.sh
114+
echo WITH_METIS=0 >> $GITHUB_ENV
88115
89-
- name: Install main package for CPU
116+
- name: Build wheel for CPU
90117
if: ${{ matrix.cuda-version == 'cpu' }}
91118
run: |
92-
FORCE_ONLY_CPU=1 WITH_METIS=1 python setup.py develop
93-
shell:
94-
bash
119+
python setup.py bdist_wheel --dist-dir=dist
120+
env:
121+
FORCE_ONLY_CPU: 1
122+
WITH_METIS: ${{ env.WITH_METIS }}
95123

96-
- name: Install main package for GPU
124+
- name: Build wheel for GPU
97125
if: ${{ matrix.cuda-version != 'cpu' }}
98126
run: |
99127
source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh
100-
WITH_METIS=1 python setup.py develop
101-
shell:
102-
bash
103-
104-
- name: Test installation
105-
run: |
106-
python -c "import torch_sparse; print('torch-sparse:', torch_sparse.__version__)"
107-
108-
- name: Build wheel
109-
run: |
110-
pip install wheel
111128
python setup.py bdist_wheel --dist-dir=dist
129+
env:
130+
FORCE_CUDA: 1
131+
WITH_METIS: ${{ env.WITH_METIS }}
112132

113133
- name: Configure AWS
114134
uses: aws-actions/configure-aws-credentials@v1

.github/workflows/cuda/cu118-Linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
OS=ubuntu2004
3+
OS=ubuntu2204
44

55
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
66
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600

.github/workflows/cuda/cu124-Linux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
OS=ubuntu2004
3+
OS=ubuntu2204
44

55
wget -nv https://developer.download.nvidia.com/compute/cuda/repos/${OS}/x86_64/cuda-${OS}.pin
66
sudo mv cuda-${OS}.pin /etc/apt/preferences.d/cuda-repository-pin-600
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.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"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
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
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.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"
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.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}"
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: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
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+
9+
sudo dpkg -i cuda-repo-${OS}-12-8-local_12.8.0-570.86.10-1_amd64.deb
10+
sudo cp /var/cuda-repo-${OS}-12-8-local/cuda-*-keyring.gpg /usr/share/keyrings/
11+
12+
sudo apt-get -qq update
13+
sudo apt install cuda-nvcc-12-8 cuda-libraries-dev-12-8
14+
sudo apt clean
15+
16+
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

0 commit comments

Comments
 (0)