Skip to content

Commit 1577470

Browse files
authored
Added PyTorch 2.2 support (#362)
* update * update
1 parent bf2591a commit 1577470

File tree

7 files changed

+46
-29
lines changed

7 files changed

+46
-29
lines changed

.github/workflows/building-conda.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,22 @@ jobs:
1212
matrix:
1313
# We have trouble building for Windows - drop for now.
1414
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']
15+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
16+
torch-version: [2.2.0] # [2.1.0, 2.2.0]
17+
cuda-version: ['cpu', 'cu118', 'cu121']
1818
exclude:
19-
- torch-version: 2.0.0
20-
cuda-version: 'cu121'
19+
- python-version: '3.12' # Python 3.12 not yet supported in `conda-build`.
2120
- torch-version: 2.1.0
22-
cuda-version: 'cu117'
23-
- os: macos-11
24-
cuda-version: 'cu117'
21+
python-version: '3.12'
2522
- os: macos-11
2623
cuda-version: 'cu118'
2724
- os: macos-11
2825
cuda-version: 'cu121'
26+
# Fails with:
27+
# * note: 'value' has been explicitly marked unavailable here
28+
# * error: 'value' is unavailable: introduced in macOS 10.13
29+
- torch-version: 2.2.0
30+
os: macos-11
2931

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

.github/workflows/building.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
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']
14+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
15+
torch-version: [2.2.0] # [2.1.0, 2.2.0]
16+
cuda-version: ['cpu', 'cu118', 'cu121']
1717
exclude:
18-
- torch-version: 2.0.0
19-
cuda-version: 'cu121'
2018
- torch-version: 2.1.0
21-
cuda-version: 'cu117'
22-
- os: macos-11
23-
cuda-version: 'cu117'
19+
python-version: '3.12'
2420
- os: macos-11
2521
cuda-version: 'cu118'
2622
- os: macos-11
2723
cuda-version: 'cu121'
24+
# Fails with:
25+
# * note: 'value' has been explicitly marked unavailable here
26+
# * error: 'value' is unavailable: introduced in macOS 10.13
27+
- os: macos-11
28+
python-version: '3.11'
29+
- os: macos-11
30+
python-version: '3.12'
2831

2932
steps:
3033
- uses: actions/checkout@v2
@@ -39,7 +42,11 @@ jobs:
3942
- name: Upgrade pip
4043
run: |
4144
pip install --upgrade setuptools
42-
pip install scipy==1.10.1 # Python 3.8 support
45+
46+
- name: Install scipy
47+
if: ${{ matrix.python-version == '3.8' }}
48+
run: |
49+
pip install scipy==1.10.1
4350
4451
- name: Free Disk Space (Ubuntu)
4552
if: ${{ runner.os == 'Linux' }}

.github/workflows/testing.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
matrix:
1717
os: [ubuntu-latest, windows-2019]
1818
python-version: [3.8]
19-
torch-version: [2.0.0, 2.1.0]
19+
torch-version: [2.1.0, 2.2.0]
2020

2121
steps:
2222
- uses: actions/checkout@v2
@@ -46,9 +46,13 @@ jobs:
4646
run: |
4747
bash .github/workflows/metis-${{ runner.os }}.sh
4848
49+
- name: Install scipy
50+
if: ${{ matrix.python-version == '3.8' }}
51+
run: |
52+
pip install scipy==1.10.1
53+
4954
- name: Install main package
5055
run: |
51-
pip install scipy==1.10.1 # Python 3.8 support
5256
python setup.py develop
5357
env:
5458
WITH_METIS: 1

README.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ conda install pytorch-sparse -c pyg
4343

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

46-
#### PyTorch 2.1
46+
#### PyTorch 2.2
4747

48-
To install the binaries for PyTorch 2.1.0, simply run
48+
To install the binaries for PyTorch 2.2.0, simply run
4949

5050
```
51-
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.1.0+${CUDA}.html
51+
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.2.0+${CUDA}.html
5252
```
5353

5454
where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` depending on your PyTorch installation.
@@ -59,23 +59,24 @@ where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` dependin
5959
| **Windows** ||||
6060
| **macOS** || | |
6161

62-
#### PyTorch 2.0
6362

64-
To install the binaries for PyTorch 2.0.0, simply run
63+
#### PyTorch 2.1
64+
65+
To install the binaries for PyTorch 2.1.0, simply run
6566

6667
```
67-
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.0.0+${CUDA}.html
68+
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-2.1.0+${CUDA}.html
6869
```
6970

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

72-
| | `cpu` | `cu117` | `cu118` |
73+
| | `cpu` | `cu118` | `cu121` |
7374
|-------------|-------|---------|---------|
7475
| **Linux** ||||
7576
| **Windows** ||||
7677
| **macOS** || | |
7778

78-
**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).
79+
**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, and PyTorch 2.0.0 (following the same procedure).
7980
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.
8081
You can look up the latest supported version number [here](https://data.pyg.org/whl).
8182

conda/pytorch-sparse/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
```
2-
./build_conda.sh 3.9 2.1.0 cu118 # python, pytorch and cuda version
2+
./build_conda.sh 3.11 2.2.0 cu118 # python, pytorch and cuda version
33
```

conda/pytorch-sparse/build_conda.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ echo "- $CONDA_CUDATOOLKIT_CONSTRAINT"
5454

5555
if [ "${TORCH_VERSION}" = "1.12.0" ] && [ "${CUDA_VERSION}" = "cu116" ]; then
5656
conda build . -c pytorch -c pyg -c default -c nvidia -c conda-forge --output-folder "$HOME/conda-bld"
57+
elif [ "${CUDA_VERSION}" = "cpu" ]; then
58+
conda build . -c pytorch -c pyg -c default --output-folder "$HOME/conda-bld"
5759
else
5860
conda build . -c pytorch -c pyg -c default -c nvidia --output-folder "$HOME/conda-bld"
5961
fi

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ classifiers =
1010
Programming Language :: Python :: 3.9
1111
Programming Language :: Python :: 3.10
1212
Programming Language :: Python :: 3.11
13+
Programming Language :: Python :: 3.12
1314
Programming Language :: Python :: 3 :: Only
1415

1516
[aliases]

0 commit comments

Comments
 (0)