Skip to content

Commit f79c8e9

Browse files
committed
version up + PyTorch 1.11 support
1 parent 3ec1eac commit f79c8e9

File tree

12 files changed

+157
-85
lines changed

12 files changed

+157
-85
lines changed

.github/workflows/building-conda.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,29 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [windows-latest] #[ubuntu-18.04, macos-10.15, windows-latest]
14-
python-version: [3.6, 3.7, 3.8, 3.9]
15-
torch-version: [1.10.0]
16-
cuda-version: ['cu113'] #['cpu', 'cu102', 'cu111', 'cu113']
13+
os: [ubuntu-18.04, macos-10.15, windows-2019]
14+
python-version: ['3.7', '3.8', '3.9', '3.10']
15+
torch-version: [1.10.0, 1.11.0]
16+
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115']
1717
exclude:
18-
- torch-version: 1.9.0
19-
cuda-version: 'cu113'
2018
- torch-version: 1.10.0
21-
cuda-version: 'cu111'
22-
- os: macos-10.15
19+
cuda-version: 'cu115'
20+
- torch-version: 1.10.0
21+
python-version: '3.10'
22+
- os: windows-2019
23+
torch-version: 1.11.0
2324
cuda-version: 'cu102'
2425
- os: macos-10.15
25-
cuda-version: 'cu111'
26+
cuda-version: 'cu102'
2627
- os: macos-10.15
2728
cuda-version: 'cu113'
29+
- os: macos-10.15
30+
cuda-version: 'cu115'
31+
# There is a weird `glibc=2.27` bug going on for this combination:
32+
- os: ubuntu-18.04
33+
python-version: '3.10'
34+
- os: ubuntu-18.04
35+
cuda-version: 'cu115'
2836

2937
steps:
3038
- uses: actions/checkout@v2

.github/workflows/building.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,28 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: [ubuntu-18.04, macos-10.15, windows-latest]
14-
python-version: [3.6, 3.7, 3.8, 3.9]
15-
torch-version: [1.10.0]
16-
cuda-version: ['cpu', 'cu102', 'cu111', 'cu113']
13+
os: [ubuntu-18.04, macos-10.15, windows-2019]
14+
python-version: ['3.7', '3.8', '3.9', '3.10']
15+
torch-version: [1.10.0, 1.11.0]
16+
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115']
1717
exclude:
18-
- torch-version: 1.9.0
19-
cuda-version: 'cu113'
2018
- torch-version: 1.10.0
21-
cuda-version: 'cu111'
22-
- os: macos-10.15
19+
cuda-version: 'cu115'
20+
- torch-version: 1.10.0
21+
python-version: '3.10'
22+
- os: windows-2019
23+
torch-version: 1.11.0
2324
cuda-version: 'cu102'
2425
- os: macos-10.15
25-
cuda-version: 'cu111'
26+
cuda-version: 'cu102'
2627
- os: macos-10.15
2728
cuda-version: 'cu113'
29+
- os: macos-10.15
30+
cuda-version: 'cu115'
31+
# There is a weird bug going on for this combination:
32+
- os: windows-2019
33+
python-version: '3.7'
34+
cuda-version: 'cu115'
2835

2936
steps:
3037
- uses: actions/checkout@v2

.github/workflows/linting.yml

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: Linting
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
48

59
jobs:
610

711
flake8:
8-
runs-on: ${{ matrix.os }}
9-
10-
strategy:
11-
matrix:
12-
os: [ubuntu-latest]
13-
python-version: [3.6]
12+
runs-on: ubuntu-latest
1413

1514
steps:
1615
- uses: actions/checkout@v2
17-
- name: Set up Python ${{ matrix.python-version }}
16+
17+
- name: Set up Python
1818
uses: actions/setup-python@v2
1919
with:
20-
python-version: ${{ matrix.python-version }}
20+
python-version: 3.9
2121

2222
- name: Install dependencies
2323
run: |
@@ -26,3 +26,30 @@ jobs:
2626
- name: Run linting
2727
run: |
2828
flake8 .
29+
30+
pyroma:
31+
runs-on: ubuntu-latest
32+
33+
strategy:
34+
matrix:
35+
torch-version: [1.11.0]
36+
37+
steps:
38+
- uses: actions/checkout@v2
39+
40+
- name: Set up Python
41+
uses: actions/setup-python@v2
42+
with:
43+
python-version: 3.9
44+
45+
- name: Install PyTorch ${{ matrix.torch-version }}
46+
run: |
47+
pip install torch==${{ matrix.torch-version}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
48+
49+
- name: Install dependencies
50+
run: |
51+
pip install pyroma
52+
53+
- name: Check package metadata
54+
run: |
55+
pyroma --min=10 .

.github/workflows/testing.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
name: Testing
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
48

59
jobs:
610

711
pytest:
812
runs-on: ${{ matrix.os }}
913

1014
strategy:
15+
fail-fast: false
1116
matrix:
1217
os: [ubuntu-latest, windows-latest]
13-
python-version: [3.6]
14-
torch-version: [1.9.0, 1.10.0]
18+
python-version: [3.7]
19+
torch-version: [1.10.0, 1.11.0]
1520

1621
steps:
1722
- uses: actions/checkout@v2
@@ -46,16 +51,10 @@ jobs:
4651

4752
- name: Run test-suite
4853
run: |
49-
python setup.py test
54+
pytest --cov --cov-report=xml
5055
51-
- name: Generate coverage report
52-
if: success()
53-
run: |
54-
pip install coverage
55-
coverage xml
56-
57-
- name: Upload coverage report to codecov
56+
- name: Upload coverage
5857
uses: codecov/codecov-action@v1
5958
if: success()
6059
with:
61-
file: coverage.xml
60+
fail_ci_if_error: false

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.0)
22
project(torchsparse)
33
set(CMAKE_CXX_STANDARD 14)
4-
set(TORCHSPARSE_VERSION 0.6.12)
4+
set(TORCHSPARSE_VERSION 0.6.13)
55

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

README.md

Lines changed: 22 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -43,39 +43,41 @@ 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 1.10.0
46+
#### PyTorch 1.11
4747

48-
To install the binaries for PyTorch 1.10.0, simply run
48+
To install the binaries for PyTorch 1.11.0, simply run
4949

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

54-
where `${CUDA}` should be replaced by either `cpu`, `cu102`, or `cu113` depending on your PyTorch installation.
54+
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, or `cu115` depending on your PyTorch installation.
5555

56-
| | `cpu` | `cu102` | `cu113` |
57-
|-------------|-------|---------|---------|
58-
| **Linux** ||||
59-
| **Windows** ||||
60-
| **macOS** || | |
56+
| | `cpu` | `cu102` | `cu113` | `cu115` |
57+
|-------------|-------|---------|---------|---------|
58+
| **Linux** |||||
59+
| **Windows** || | ||
60+
| **macOS** || | | |
6161

62-
#### PyTorch 1.9.0/1.9.1
62+
#### PyTorch 1.10
6363

64-
To install the binaries for PyTorch 1.9.0 and 1.9.1, simply run
64+
To install the binaries for PyTorch 1.10.0, PyTorch 1.10.1 and PyTorch 1.10.2, simply run
6565

6666
```
67-
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.9.0+${CUDA}.html
67+
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.10.0+${CUDA}.html
6868
```
6969

70-
where `${CUDA}` should be replaced by either `cpu`, `cu102`, or `cu111` depending on your PyTorch installation.
70+
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu111`, or `cu113` depending on your PyTorch installation.
7171

72-
| | `cpu` | `cu102` | `cu111` |
73-
|-------------|-------|---------|---------|
74-
| **Linux** ||||
75-
| **Windows** ||||
76-
| **macOS** || | |
72+
| | `cpu` | `cu102` | `cu111` | `cu113` |
73+
|-------------|-------|---------|---------|---------|
74+
| **Linux** |||||
75+
| **Windows** |||||
76+
| **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 and PyTorch 1.8.0/1.8.1 (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 and PyTorch 1.9.0 (following the same procedure).
79+
For older versions, you might need to explicitly specify the latest supported version number in order to prevent a manual installation from source.
80+
You can look up the latest supported version number [here](https://data.pyg.org/whl).
7981

8082
### From source
8183

@@ -308,5 +310,5 @@ make install
308310
## Running tests
309311

310312
```
311-
python setup.py test
313+
pytest
312314
```

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 1.9.0 cu111 # python, pytorch and cuda version
2+
./build_conda.sh 3.9 1.11.0 cu113 # python, pytorch and cuda version
33
```

conda/pytorch-sparse/build_conda.sh

Lines changed: 4 additions & 1 deletion
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+
cu115)
14+
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit==11.5.*"
15+
;;
1316
cu113)
1417
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit==11.3.*"
1518
;;
@@ -33,4 +36,4 @@ echo "PyTorch $TORCH_VERSION+$CUDA_VERSION"
3336
echo "- $CONDA_PYTORCH_CONSTRAINT"
3437
echo "- $CONDA_CUDATOOLKIT_CONSTRAINT"
3538

36-
conda build . -c pytorch -c nvidia -c pyg -c defaults -c conda-forge --output-folder "$HOME/conda-bld"
39+
conda build . -c pytorch -c pyg -c default -c nvidia --output-folder "$HOME/conda-bld"

conda/pytorch-sparse/meta.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package:
22
name: pytorch-sparse
3-
version: 0.6.12
3+
version: 0.6.13
44

55
source:
66
path: ../..

setup.cfg

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
11
[metadata]
2-
description-file = README.md
2+
long_description=file: README.md
3+
long_description_content_type=text/markdown
4+
5+
classifiers =
6+
Development Status :: 5 - Production/Stable
7+
License :: OSI Approved :: MIT License
8+
Programming Language :: Python
9+
Programming Language :: Python :: 3.7
10+
Programming Language :: Python :: 3.8
11+
Programming Language :: Python :: 3.9
12+
Programming Language :: Python :: 3.10
13+
Programming Language :: Python :: 3 :: Only
314

415
[aliases]
516
test = pytest
617

718
[tool:pytest]
8-
addopts = --capture=no --cov
19+
addopts = --capture=no

0 commit comments

Comments
 (0)