Skip to content

Commit 140d3ad

Browse files
authored
update (#395)
1 parent a2a2afb commit 140d3ad

17 files changed

+104
-58
lines changed

.github/workflows/building-conda.yml

+13-15
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,21 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
# We have trouble building for Windows - drop for now.
14-
os: [ubuntu-18.04, macos-10.15] # windows-2019
15-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
16-
torch-version: [1.13.0, 2.0.0]
17-
# We have trouble building for `cu116` due to PyTorch 1.13.0 bugs
18-
cuda-version: ['cpu', 'cu117', 'cu118']
14+
os: [ubuntu-20.04, macos-11] # windows-2019
15+
python-version: ['3.8', '3.9', '3.10', '3.11']
16+
torch-version: [2.0.0, 2.1.0]
17+
cuda-version: ['cpu', 'cu117', 'cu118', 'cu121']
1918
exclude:
20-
- torch-version: 1.13.0
21-
python-version: '3.11'
2219
- torch-version: 2.0.0
23-
python-version: '3.7'
24-
- torch-version: 1.13.0
25-
cuda-version: 'cu118'
26-
- os: macos-10.15
20+
cuda-version: 'cu121'
21+
- torch-version: 2.1.0
22+
cuda-version: 'cu117'
23+
- os: macos-11
2724
cuda-version: 'cu117'
28-
- os: macos-10.15
25+
- os: macos-11
2926
cuda-version: 'cu118'
27+
- os: macos-11
28+
cuda-version: 'cu121'
3029

3130
steps:
3231
- uses: actions/checkout@v2
@@ -35,10 +34,9 @@ jobs:
3534
with:
3635
python-version: ${{ matrix.python-version }}
3736

38-
- name: Free up disk space
37+
- name: Free Disk Space (Ubuntu)
3938
if: ${{ runner.os == 'Linux' }}
40-
run: |
41-
sudo rm -rf /usr/share/dotnet
39+
uses: jlumbroso/free-disk-space@main
4240

4341
- name: Install Conda packages
4442
run: |

.github/workflows/building.yml

+15-20
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,21 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-18.04, macos-10.15, windows-2019]
14-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
15-
torch-version: [1.13.0, 2.0.0]
16-
cuda-version: ['cpu', 'cu116', 'cu117', 'cu118']
13+
os: [ubuntu-20.04, macos-11, windows-2019]
14+
python-version: ['3.8', '3.9', '3.10', '3.11']
15+
torch-version: [2.0.0, 2.1.0]
16+
cuda-version: ['cpu', 'cu117', 'cu118', 'cu121']
1717
exclude:
18-
- torch-version: 1.13.0
19-
python-version: '3.11'
2018
- torch-version: 2.0.0
21-
python-version: '3.7'
22-
- torch-version: 1.13.0
23-
cuda-version: 'cu118'
24-
- torch-version: 2.0.0
25-
cuda-version: 'cu116'
26-
- os: macos-10.15
27-
cuda-version: 'cu116'
28-
- os: macos-10.15
19+
cuda-version: 'cu121'
20+
- torch-version: 2.1.0
2921
cuda-version: 'cu117'
30-
- os: macos-10.15
22+
- os: macos-11
23+
cuda-version: 'cu117'
24+
- os: macos-11
3125
cuda-version: 'cu118'
26+
- os: macos-11
27+
cuda-version: 'cu121'
3228

3329
steps:
3430
- uses: actions/checkout@v2
@@ -41,10 +37,9 @@ jobs:
4137
run: |
4238
pip install --upgrade setuptools
4339
44-
- name: Free up disk space
40+
- name: Free Disk Space (Ubuntu)
4541
if: ${{ runner.os == 'Linux' }}
46-
run: |
47-
sudo rm -rf /usr/share/dotnet
42+
uses: jlumbroso/free-disk-space@main
4843

4944
- name: Install CUDA ${{ matrix.cuda-version }}
5045
if: ${{ matrix.cuda-version != 'cpu' }}
@@ -80,15 +75,15 @@ jobs:
8075
- name: Install main package for CPU
8176
if: ${{ matrix.cuda-version == 'cpu' }}
8277
run: |
83-
FORCE_ONLY_CPU=1 pip install -e .
78+
FORCE_ONLY_CPU=1 python setup.py develop
8479
shell:
8580
bash
8681

8782
- name: Install main package for GPU
8883
if: ${{ matrix.cuda-version != 'cpu' }}
8984
run: |
9085
source .github/workflows/cuda/${{ matrix.cuda-version }}-${{ runner.os }}-env.sh
91-
pip install -e .
86+
python setup.py develop
9287
shell:
9388
bash
9489

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
OS=ubuntu1804
3+
OS=ubuntu2004
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/cu118-Linux.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

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

.github/workflows/cuda/cu121-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.1.1/local_installers/cuda-repo-${OS}-12-1-local_12.1.1-530.30.02-1_amd64.deb
8+
sudo dpkg -i cuda-repo-${OS}-12-1-local_12.1.1-530.30.02-1_amd64.deb
9+
sudo cp /var/cuda-repo-${OS}-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/
10+
11+
sudo apt-get -qq update
12+
sudo apt install cuda-nvcc-12-1 cuda-libraries-dev-12-1
13+
sudo apt clean
14+
15+
rm -f https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda-repo-${OS}-12-1-local_12.1.1-530.30.02-1_amd64.deb
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.1
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"
+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.1
9+
export CUDA_URL=https://developer.download.nvidia.com/compute/cuda/${CUDA_SHORT}.1/local_installers
10+
export CUDA_FILE=cuda_${CUDA_SHORT}.1_531.14_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/testing.yml

+3-2
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.8]
19-
torch-version: [1.13.0, 2.0.0]
19+
torch-version: [2.0.0, 2.1.0]
2020

2121
steps:
2222
- uses: actions/checkout@v2
@@ -39,10 +39,11 @@ jobs:
3939

4040
- name: Install main package
4141
run: |
42-
pip install -e .[test]
42+
python setup.py develop
4343
4444
- name: Run test-suite
4545
run: |
46+
pip install pytest pytest-cov
4647
pytest --cov --cov-report=xml
4748
4849
- name: Upload coverage

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.0)
22
project(torchscatter)
33
set(CMAKE_CXX_STANDARD 14)
4-
set(TORCHSCATTER_VERSION 2.1.1)
4+
set(TORCHSCATTER_VERSION 2.1.2)
55

66
option(WITH_CUDA "Enable CUDA support" OFF)
77
option(WITH_PYTHON "Link to Python when building" ON)

README.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -54,39 +54,40 @@ conda install pytorch-scatter -c pyg
5454

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

57-
#### PyTorch 2.0
57+
#### PyTorch 2.1
5858

59-
To install the binaries for PyTorch 2.0.0, simply run
59+
To install the binaries for PyTorch 2.1.0, simply run
6060

6161
```
62-
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.0.0+${CUDA}.html
62+
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.1.0+${CUDA}.html
6363
```
6464

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

67-
| | `cpu` | `cu117` | `cu118` |
67+
| | `cpu` | `cu118` | `cu121` |
6868
|-------------|-------|---------|---------|
6969
| **Linux** ||||
7070
| **Windows** ||||
7171
| **macOS** || | |
7272

73-
#### PyTorch 1.13
7473

75-
To install the binaries for PyTorch 1.13.0, simply run
74+
#### PyTorch 2.0
75+
76+
To install the binaries for PyTorch 2.0.0, simply run
7677

7778
```
78-
pip install torch-scatter -f https://data.pyg.org/whl/torch-1.13.0+${CUDA}.html
79+
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.0.0+${CUDA}.html
7980
```
8081

81-
where `${CUDA}` should be replaced by either `cpu`, `cu116`, or `cu117` depending on your PyTorch installation.
82+
where `${CUDA}` should be replaced by either `cpu`, `cu117`, or `cu118` depending on your PyTorch installation.
8283

83-
| | `cpu` | `cu116` | `cu117` |
84+
| | `cpu` | `cu117` | `cu118` |
8485
|-------------|-------|---------|---------|
8586
| **Linux** ||||
8687
| **Windows** ||||
8788
| **macOS** || | |
8889

89-
**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 and PyTorch 1.12.0/1.12.1 (following the same procedure).
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 and PyTorch 1.13.0/1.13.1 (following the same procedure).
9091
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.
9192
You can look up the latest supported version number [here](https://data.pyg.org/whl).
9293

conda/pytorch-scatter/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
```
2-
./build_conda.sh 3.9 2.0.0 cu117 # python, pytorch and cuda version
2+
./build_conda.sh 3.9 2.1.0 cu118 # python, pytorch and cuda version
33
```

conda/pytorch-scatter/build_conda.sh

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ if [ "${CUDA_VERSION}" = "cpu" ]; then
1010
export CONDA_CUDATOOLKIT_CONSTRAINT="cpuonly # [not osx]"
1111
else
1212
case $CUDA_VERSION in
13+
cu121)
14+
export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda==12.1.*"
15+
;;
1316
cu118)
1417
export CONDA_CUDATOOLKIT_CONSTRAINT="pytorch-cuda==11.8.*"
1518
;;

conda/pytorch-scatter/meta.yaml

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: pytorch-scatter
3-
version: 2.1.1
3+
version: 2.1.2
44

55
source:
66
path: ../..
@@ -22,7 +22,6 @@ requirements:
2222

2323
build:
2424
string: py{{ environ.get('PYTHON_VERSION').replace('.', '') }}_torch_{{ environ['TORCH_VERSION'] }}_{{ environ['CUDA_VERSION'] }}
25-
number: 1
2625
script: pip install .
2726
script_env:
2827
- FORCE_CUDA

setup.cfg

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ classifiers =
66
Development Status :: 5 - Production/Stable
77
License :: OSI Approved :: MIT License
88
Programming Language :: Python
9-
Programming Language :: Python :: 3.7
109
Programming Language :: Python :: 3.8
1110
Programming Language :: Python :: 3.9
1211
Programming Language :: Python :: 3.10
12+
Programming Language :: Python :: 3.11
1313
Programming Language :: Python :: 3 :: Only
1414

1515
[aliases]

setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from torch.utils.cpp_extension import (CUDA_HOME, BuildExtension, CppExtension,
1212
CUDAExtension)
1313

14-
__version__ = '2.1.1'
14+
__version__ = '2.1.2'
1515
URL = 'https://github.com/rusty1s/pytorch_scatter'
1616

1717
WITH_CUDA = False
@@ -126,7 +126,7 @@ def get_extensions():
126126
url=URL,
127127
download_url=f'{URL}/archive/{__version__}.tar.gz',
128128
keywords=['pytorch', 'scatter', 'segment', 'gather'],
129-
python_requires='>=3.7',
129+
python_requires='>=3.8',
130130
install_requires=install_requires,
131131
extras_require={
132132
'test': test_requires,

torch_scatter/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import torch
66

7-
__version__ = '2.1.1'
7+
__version__ = '2.1.2'
88

99
for library in ['_version', '_scatter', '_segment_csr', '_segment_coo']:
1010
cuda_spec = importlib.machinery.PathFinder().find_spec(

0 commit comments

Comments
 (0)