Commit f79c8e98 authored by rusty1s's avatar rusty1s
Browse files

version up + PyTorch 1.11 support

parent 3ec1eacf
......@@ -10,21 +10,29 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-latest] #[ubuntu-18.04, macos-10.15, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
torch-version: [1.10.0]
cuda-version: ['cu113'] #['cpu', 'cu102', 'cu111', 'cu113']
os: [ubuntu-18.04, macos-10.15, windows-2019]
python-version: ['3.7', '3.8', '3.9', '3.10']
torch-version: [1.10.0, 1.11.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115']
exclude:
- torch-version: 1.9.0
cuda-version: 'cu113'
- torch-version: 1.10.0
cuda-version: 'cu111'
- os: macos-10.15
cuda-version: 'cu115'
- torch-version: 1.10.0
python-version: '3.10'
- os: windows-2019
torch-version: 1.11.0
cuda-version: 'cu102'
- os: macos-10.15
cuda-version: 'cu111'
cuda-version: 'cu102'
- os: macos-10.15
cuda-version: 'cu113'
- os: macos-10.15
cuda-version: 'cu115'
# There is a weird `glibc=2.27` bug going on for this combination:
- os: ubuntu-18.04
python-version: '3.10'
- os: ubuntu-18.04
cuda-version: 'cu115'
steps:
- uses: actions/checkout@v2
......
......@@ -10,21 +10,28 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, macos-10.15, windows-latest]
python-version: [3.6, 3.7, 3.8, 3.9]
torch-version: [1.10.0]
cuda-version: ['cpu', 'cu102', 'cu111', 'cu113']
os: [ubuntu-18.04, macos-10.15, windows-2019]
python-version: ['3.7', '3.8', '3.9', '3.10']
torch-version: [1.10.0, 1.11.0]
cuda-version: ['cpu', 'cu102', 'cu113', 'cu115']
exclude:
- torch-version: 1.9.0
cuda-version: 'cu113'
- torch-version: 1.10.0
cuda-version: 'cu111'
- os: macos-10.15
cuda-version: 'cu115'
- torch-version: 1.10.0
python-version: '3.10'
- os: windows-2019
torch-version: 1.11.0
cuda-version: 'cu102'
- os: macos-10.15
cuda-version: 'cu111'
cuda-version: 'cu102'
- os: macos-10.15
cuda-version: 'cu113'
- os: macos-10.15
cuda-version: 'cu115'
# There is a weird bug going on for this combination:
- os: windows-2019
python-version: '3.7'
cuda-version: 'cu115'
steps:
- uses: actions/checkout@v2
......
name: Linting
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
jobs:
flake8:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.6]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: 3.9
- name: Install dependencies
run: |
......@@ -26,3 +26,30 @@ jobs:
- name: Run linting
run: |
flake8 .
pyroma:
runs-on: ubuntu-latest
strategy:
matrix:
torch-version: [1.11.0]
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install PyTorch ${{ matrix.torch-version }}
run: |
pip install torch==${{ matrix.torch-version}}+cpu -f https://download.pytorch.org/whl/torch_stable.html
- name: Install dependencies
run: |
pip install pyroma
- name: Check package metadata
run: |
pyroma --min=10 .
name: Testing
on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
jobs:
......@@ -8,10 +12,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.6]
torch-version: [1.9.0, 1.10.0]
python-version: [3.7]
torch-version: [1.10.0, 1.11.0]
steps:
- uses: actions/checkout@v2
......@@ -46,16 +51,10 @@ jobs:
- name: Run test-suite
run: |
python setup.py test
pytest --cov --cov-report=xml
- name: Generate coverage report
if: success()
run: |
pip install coverage
coverage xml
- name: Upload coverage report to codecov
- name: Upload coverage
uses: codecov/codecov-action@v1
if: success()
with:
file: coverage.xml
fail_ci_if_error: false
cmake_minimum_required(VERSION 3.0)
project(torchsparse)
set(CMAKE_CXX_STANDARD 14)
set(TORCHSPARSE_VERSION 0.6.12)
set(TORCHSPARSE_VERSION 0.6.13)
option(WITH_CUDA "Enable CUDA support" OFF)
option(WITH_PYTHON "Link to Python when building" ON)
......
......@@ -43,39 +43,41 @@ conda install pytorch-sparse -c pyg
We alternatively provide pip wheels for all major OS/PyTorch/CUDA combinations, see [here](https://data.pyg.org/whl).
#### PyTorch 1.10.0
#### PyTorch 1.11
To install the binaries for PyTorch 1.10.0, simply run
To install the binaries for PyTorch 1.11.0, simply run
```
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.10.0+${CUDA}.html
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.11.0+${CUDA}.html
```
where `${CUDA}` should be replaced by either `cpu`, `cu102`, or `cu113` depending on your PyTorch installation.
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu113`, or `cu115` depending on your PyTorch installation.
| | `cpu` | `cu102` | `cu113` |
|-------------|-------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ |
| **Windows** | ✅ | ✅ | ✅ |
| **macOS** | ✅ | | |
| | `cpu` | `cu102` | `cu113` | `cu115` |
|-------------|-------|---------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ | ✅ |
| **Windows** | ✅ | | ✅ | ✅ |
| **macOS** | ✅ | | | |
#### PyTorch 1.9.0/1.9.1
#### PyTorch 1.10
To install the binaries for PyTorch 1.9.0 and 1.9.1, simply run
To install the binaries for PyTorch 1.10.0, PyTorch 1.10.1 and PyTorch 1.10.2, simply run
```
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.9.0+${CUDA}.html
pip install torch-scatter torch-sparse -f https://data.pyg.org/whl/torch-1.10.0+${CUDA}.html
```
where `${CUDA}` should be replaced by either `cpu`, `cu102`, or `cu111` depending on your PyTorch installation.
where `${CUDA}` should be replaced by either `cpu`, `cu102`, `cu111`, or `cu113` depending on your PyTorch installation.
| | `cpu` | `cu102` | `cu111` |
|-------------|-------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ |
| **Windows** | ✅ | ✅ | ✅ |
| **macOS** | ✅ | | |
| | `cpu` | `cu102` | `cu111` | `cu113` |
|-------------|-------|---------|---------|---------|
| **Linux** | ✅ | ✅ | ✅ | ✅ |
| **Windows** | ✅ | ✅ | ✅ | ✅ |
| **macOS** | ✅ | | | |
**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).
**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).
For older versions, you might need to explicitly specify the latest supported version number in order to prevent a manual installation from source.
You can look up the latest supported version number [here](https://data.pyg.org/whl).
### From source
......@@ -308,5 +310,5 @@ make install
## Running tests
```
python setup.py test
pytest
```
```
./build_conda.sh 3.9 1.9.0 cu111 # python, pytorch and cuda version
./build_conda.sh 3.9 1.11.0 cu113 # python, pytorch and cuda version
```
......@@ -10,6 +10,9 @@ if [ "${CUDA_VERSION}" = "cpu" ]; then
export CONDA_CUDATOOLKIT_CONSTRAINT="cpuonly # [not osx]"
else
case $CUDA_VERSION in
cu115)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit==11.5.*"
;;
cu113)
export CONDA_CUDATOOLKIT_CONSTRAINT="cudatoolkit==11.3.*"
;;
......@@ -33,4 +36,4 @@ echo "PyTorch $TORCH_VERSION+$CUDA_VERSION"
echo "- $CONDA_PYTORCH_CONSTRAINT"
echo "- $CONDA_CUDATOOLKIT_CONSTRAINT"
conda build . -c pytorch -c nvidia -c pyg -c defaults -c conda-forge --output-folder "$HOME/conda-bld"
conda build . -c pytorch -c pyg -c default -c nvidia --output-folder "$HOME/conda-bld"
package:
name: pytorch-sparse
version: 0.6.12
version: 0.6.13
source:
path: ../..
......
[metadata]
description-file = README.md
long_description=file: README.md
long_description_content_type=text/markdown
classifiers =
Development Status :: 5 - Production/Stable
License :: OSI Approved :: MIT License
Programming Language :: Python
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3 :: Only
[aliases]
test = pytest
[tool:pytest]
addopts = --capture=no --cov
addopts = --capture=no
import os
import sys
import glob
import os
import os.path as osp
from itertools import product
from setuptools import setup, find_packages
import platform
import sys
from itertools import product
import torch
from setuptools import find_packages, setup
from torch.__config__ import parallel_info
from torch.utils.cpp_extension import BuildExtension
from torch.utils.cpp_extension import CppExtension, CUDAExtension, CUDA_HOME
from torch.utils.cpp_extension import (CUDA_HOME, BuildExtension, CppExtension,
CUDAExtension)
__version__ = '0.6.13'
URL = 'https://github.com/rusty1s/pytorch_sparse'
WITH_CUDA = torch.cuda.is_available() and CUDA_HOME is not None
suffices = ['cpu', 'cuda'] if WITH_CUDA else ['cpu']
......@@ -51,6 +54,7 @@ def get_extensions():
define_macros += [('MTMETIS_64BIT_WEIGHTS', None)]
define_macros += [('MTMETIS_64BIT_PARTITIONS', None)]
libraries += ['mtmetis', 'wildriver']
extra_compile_args = {'cxx': ['-O2']}
if not os.name == 'nt': # Not on Windows:
extra_compile_args['cxx'] += ['-Wno-sign-compare']
......@@ -110,29 +114,40 @@ def get_extensions():
return extensions
install_requires = ['scipy']
setup_requires = []
tests_require = ['pytest', 'pytest-runner', 'pytest-cov']
install_requires = [
'scipy',
]
test_requires = [
'pytest',
'pytest-cov',
]
setup(
name='torch_sparse',
version='0.6.12',
author='Matthias Fey',
author_email='matthias.fey@tu-dortmund.de',
url='https://github.com/rusty1s/pytorch_sparse',
version=__version__,
description=('PyTorch Extension Library of Optimized Autograd Sparse '
'Matrix Operations'),
keywords=['pytorch', 'sparse', 'sparse-matrices', 'autograd'],
license='MIT',
python_requires='>=3.6',
author='Matthias Fey',
author_email='matthias.fey@tu-dortmund.de',
url=URL,
download_url=f'{URL}/archive/{__version__}.tar.gz',
keywords=[
'pytorch',
'sparse',
'sparse-matrices',
'autograd',
],
python_requires='>=3.7',
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
extras_require={'test': tests_require},
extras_require={
'test': test_requires,
},
ext_modules=get_extensions() if not BUILD_DOCS else [],
cmdclass={
'build_ext':
BuildExtension.with_options(no_python_abi_suffix=True, use_ninja=False)
},
packages=find_packages(),
include_package_data=True,
)
......@@ -3,7 +3,7 @@ import os.path as osp
import torch
__version__ = '0.6.12'
__version__ = '0.6.13'
for library in [
'_version', '_convert', '_diag', '_spmm', '_spspmm', '_metis', '_rw',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment