Skip to content

Commit 616704a

Browse files
authored
Add PyTorch 2.3. support (#214)
* update * update
1 parent 49e0fe8 commit 616704a

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
@@ -44,7 +44,7 @@ jobs:
4444
pytest --cov --cov-report=xml
4545
4646
- name: Upload coverage
47-
uses: codecov/codecov-action@v1
47+
uses: codecov/codecov-action@v4
4848
if: success()
4949
with:
5050
fail_ci_if_error: false

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ conda install pytorch-cluster -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.2
46+
#### PyTorch 2.3
4747

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

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

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

62-
#### PyTorch 2.1
62+
#### PyTorch 2.2
6363

64-
To install the binaries for PyTorch 2.1.0, simply run
64+
To install the binaries for PyTorch 2.2.0, simply run
6565

6666
```
67-
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.1.0+${CUDA}.html
67+
pip install torch-cluster -f https://data.pyg.org/whl/torch-2.2.0+${CUDA}.html
6868
```
6969

7070
where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` depending on your PyTorch installation.
@@ -75,7 +75,7 @@ where `${CUDA}` should be replaced by either `cpu`, `cu118`, or `cu121` dependin
7575
| **Windows** ||||
7676
| **macOS** || | |
7777

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, PyTorch 1.13.0/1.13.1, and PyTorch 2.0.0 (following the same procedure).
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, 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).
7979
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.
8080
You can look up the latest supported version number [here](https://data.pyg.org/whl).
8181

conda/pytorch-cluster/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)