Skip to content

Commit e2b3314

Browse files
authored
Add PyTorch 2.3 support (#439)
* update * update * update * update
1 parent f4696b7 commit e2b3314

File tree

6 files changed

+21
-35
lines changed

6 files changed

+21
-35
lines changed

.github/workflows/building-conda.yml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,14 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
# We have trouble building for Windows - drop for now.
14-
os: [ubuntu-20.04, macos-11] # windows-2019
14+
os: [ubuntu-20.04] # windows-2019
1515
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
16-
torch-version: [2.2.0] # [2.1.0, 2.2.0]
16+
torch-version: [2.3.0] # [2.1.0, 2.2.0, 2.3.0]
1717
cuda-version: ['cpu', 'cu118', 'cu121']
1818
exclude:
1919
- python-version: '3.12' # Python 3.12 not yet supported in `conda-build`.
2020
- torch-version: 2.1.0
2121
python-version: '3.12'
22-
- os: macos-11
23-
cuda-version: 'cu118'
24-
- os: macos-11
25-
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
3122

3223
steps:
3324
- uses: actions/checkout@v2

.github/workflows/building.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,17 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-20.04, macos-11, windows-2019]
13+
os: [ubuntu-20.04, macos-14, windows-2019]
1414
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
15-
torch-version: [2.2.0] # [2.1.0, 2.2.0]
15+
torch-version: [2.3.0] # [2.1.0, 2.2.0, 2.3.0]
1616
cuda-version: ['cpu', 'cu118', 'cu121']
1717
exclude:
1818
- torch-version: 2.1.0
1919
python-version: '3.12'
20-
- os: macos-11
20+
- os: macos-14
2121
cuda-version: 'cu118'
22-
- os: macos-11
22+
- os: macos-14
2323
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'
3124

3225
steps:
3326
- uses: actions/checkout@v2

.github/workflows/testing.yml

Lines changed: 2 additions & 2 deletions
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: [2.1.0, 2.2.0]
19+
torch-version: [2.2.0, 2.3.0]
2020

2121
steps:
2222
- uses: actions/checkout@v2
@@ -47,7 +47,7 @@ jobs:
4747
pytest --cov --cov-report=xml
4848
4949
- name: Upload coverage
50-
uses: codecov/codecov-action@v1
50+
uses: codecov/codecov-action@v4
5151
if: success()
5252
with:
5353
fail_ci_if_error: false

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ 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.2
57+
#### PyTorch 2.3
5858

59-
To install the binaries for PyTorch 2.2.0, simply run
59+
To install the binaries for PyTorch 2.3.0, simply run
6060

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

6565
where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` depending on your PyTorch installation.
@@ -70,12 +70,12 @@ where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` dependin
7070
| **Windows** ||||
7171
| **macOS** || | |
7272

73-
#### PyTorch 2.1
73+
#### PyTorch 2.2
7474

75-
To install the binaries for PyTorch 2.1.0, simply run
75+
To install the binaries for PyTorch 2.2.0, simply run
7676

7777
```
78-
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.1.0+${CUDA}.html
78+
pip install torch-scatter -f https://data.pyg.org/whl/torch-2.2.0+${CUDA}.html
7979
```
8080

8181
where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` depending on your PyTorch installation.
@@ -86,7 +86,7 @@ where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` dependin
8686
| **Windows** ||||
8787
| **macOS** || | |
8888

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, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, and PyTorch 2.0.0 (following the same procedure).
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, PyTorch 1.12.0/1.12.1, PyTorch 1.13.0/1.13.1, PyTorch 2.0.0/2.0.1, and PyTorch 2.1.0/2.1.1/2.1.2 (following the same procedure).
9090
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.
9191
You can look up the latest supported version number [here](https://data.pyg.org/whl).
9292

conda/pytorch-scatter/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.11 2.2.0 cu118 # python, pytorch and cuda version
2+
./build_conda.sh 3.11 2.3.0 cu118 # python, pytorch and cuda version
33
```

setup.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,11 @@ def get_extensions():
6161
print('Compiling without OpenMP...')
6262

6363
# Compile for mac arm64
64-
if (sys.platform == 'darwin' and platform.machine() == 'arm64'):
65-
extra_compile_args['cxx'] += ['-arch', 'arm64']
66-
extra_link_args += ['-arch', 'arm64']
64+
if sys.platform == 'darwin':
65+
extra_compile_args['cxx'] += ['-D_LIBCPP_DISABLE_AVAILABILITY']
66+
if platform.machine == 'arm64':
67+
extra_compile_args['cxx'] += ['-arch', 'arm64']
68+
extra_link_args += ['-arch', 'arm64']
6769

6870
if suffix == 'cuda':
6971
define_macros += [('WITH_CUDA', None)]

0 commit comments

Comments
 (0)