"torchvision/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "53670211109b55ce567aa3b3dea748e8207f100c"
Commit 19deedfc authored by rusty1s's avatar rusty1s
Browse files

rquire python 3.6

parent 3c4582ed
...@@ -17,14 +17,10 @@ env: ...@@ -17,14 +17,10 @@ env:
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu92 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu92
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu100 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu100
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu101 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cu101
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cpu - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cpu
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu92 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu92
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101 # - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cpu
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu92
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu100
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu101
jobs: jobs:
exclude: # Exclude *all* macOS CUDA jobs and Windows CUDA 9.2/10.0 jobs. exclude: # Exclude *all* macOS CUDA jobs and Windows CUDA 9.2/10.0 jobs.
...@@ -46,12 +42,6 @@ jobs: ...@@ -46,12 +42,6 @@ jobs:
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100 env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100
- os: osx - os: osx
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101 env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101
- os: osx
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu92
- os: osx
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu100
- os: osx
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu101
- os: windows - os: windows
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92 env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92
- os: windows - os: windows
...@@ -64,24 +54,21 @@ jobs: ...@@ -64,24 +54,21 @@ jobs:
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu92 env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu92
- os: windows - os: windows
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100 env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu100
- os: windows
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu92
- os: windows
env: TORCH_VERSION=1.4.0 PYTHON_VERSION=3.5 IDX=cu100
install: install:
- source script/cuda.sh - source script/cuda.sh
- source script/conda.sh - source script/conda.sh
- pip install flake8 codecov
- python setup.py install - python setup.py install
script: script:
- if [ "${PYTHON_VERSION}" != "3.5" ]; then pip install flake8 && flake8 .; fi - flake8 .
- python setup.py test - python setup.py test
after_success: after_success:
- python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION} - python setup.py bdist_wheel --dist-dir=dist/torch-${TORCH_VERSION}
- python script/rename_wheel.py ${IDX} - python script/rename_wheel.py ${IDX}
- pip install codecov && codecov - codecov
deploy: deploy:
provider: s3 provider: s3
region: eu-central-1 region: eu-central-1
......
...@@ -37,11 +37,11 @@ def get_extensions(): ...@@ -37,11 +37,11 @@ def get_extensions():
sources = [main] sources = [main]
path = osp.join(extensions_dir, 'cpu', name + '_cpu.cpp') path = osp.join(extensions_dir, 'cpu', f'{name}_cpu.cpp')
if osp.exists(path): if osp.exists(path):
sources += [path] sources += [path]
path = osp.join(extensions_dir, 'cuda', name + '_cuda.cu') path = osp.join(extensions_dir, 'cuda', f'{name}_cuda.cu')
if WITH_CUDA and osp.exists(path): if WITH_CUDA and osp.exists(path):
sources += [path] sources += [path]
...@@ -70,7 +70,7 @@ setup( ...@@ -70,7 +70,7 @@ setup(
description='PyTorch Extension Library of Optimized Scatter Operations', description='PyTorch Extension Library of Optimized Scatter Operations',
keywords=['pytorch', 'scatter', 'segment', 'gather'], keywords=['pytorch', 'scatter', 'segment', 'gather'],
license='MIT', license='MIT',
python_requires='>=3.5', python_requires='>=3.6',
install_requires=install_requires, install_requires=install_requires,
setup_requires=setup_requires, setup_requires=setup_requires,
tests_require=tests_require, tests_require=tests_require,
......
# flake8: noqa # flake8: noqa
import glob import importlib
import os.path as osp import os.path as osp
import torch import torch
...@@ -9,16 +9,16 @@ __version__ = '2.0.3' ...@@ -9,16 +9,16 @@ __version__ = '2.0.3'
expected_torch_version = (1, 4) expected_torch_version = (1, 4)
try: try:
torch.ops.load_library( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
glob.glob(osp.join(osp.dirname(__file__), '_version.*'))[0]) '_version', [osp.dirname(__file__)]).origin)
except OSError as e: except OSError as e:
if 'undefined symbol' in str(e): if 'undefined symbol' in str(e):
major, minor = [int(x) for x in torch.__version__.split('.')[:2]] major, minor = [int(x) for x in torch.__version__.split('.')[:2]]
t_major, t_minor = expected_torch_version t_major, t_minor = expected_torch_version
if major != t_major or (major == t_major and minor != t_minor): if major != t_major or (major == t_major and minor != t_minor):
raise RuntimeError( raise RuntimeError(
'Expected PyTorch version {}.{} but found version ' f'Expected PyTorch version {t_major}.{t_minor} but found '
'{}.{}.'.format(t_major, t_minor, major, minor)) f'version {major}.{minor}.')
raise OSError(e) raise OSError(e)
from .scatter import (scatter_sum, scatter_add, scatter_mean, scatter_min, from .scatter import (scatter_sum, scatter_add, scatter_mean, scatter_min,
...@@ -43,11 +43,11 @@ if cuda_version != -1 and torch.version.cuda is not None: # pragma: no cover ...@@ -43,11 +43,11 @@ if cuda_version != -1 and torch.version.cuda is not None: # pragma: no cover
if t_major != major or t_minor != minor: if t_major != major or t_minor != minor:
raise RuntimeError( raise RuntimeError(
'Detected that PyTorch and torch_scatter were compiled with ' f'Detected that PyTorch and torch_scatter were compiled with '
'different CUDA versions. PyTorch has CUDA version={}.{} and ' f'different CUDA versions. PyTorch has CUDA version '
'torch_scatter has CUDA version={}.{}. Please reinstall the ' f'{t_major}.{t_minor} and torch_scatter has CUDA version '
'torch_scatter that matches your PyTorch install.'.format( f'{major}.{minor}. Please reinstall the torch_scatter that '
t_major, t_minor, major, minor)) f'matches your PyTorch install.')
__all__ = [ __all__ = [
'scatter_sum', 'scatter_sum',
......
import glob import importlib
import os.path as osp import os.path as osp
from typing import Optional, Tuple from typing import Optional, Tuple
...@@ -6,8 +6,8 @@ import torch ...@@ -6,8 +6,8 @@ import torch
from .utils import broadcast from .utils import broadcast
torch.ops.load_library( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
glob.glob(osp.join(osp.dirname(__file__), '_scatter.*'))[0]) '_scatter', [osp.dirname(__file__)]).origin)
@torch.jit.script @torch.jit.script
......
import glob import importlib
import os.path as osp import os.path as osp
from typing import Optional, Tuple from typing import Optional, Tuple
import torch import torch
torch.ops.load_library( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
glob.glob(osp.join(osp.dirname(__file__), '_segment_coo.*'))[0]) '_segment_coo', [osp.dirname(__file__)]).origin)
@torch.jit.script @torch.jit.script
......
import glob import importlib
import os.path as osp import os.path as osp
from typing import Optional, Tuple from typing import Optional, Tuple
import torch import torch
torch.ops.load_library( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
glob.glob(osp.join(osp.dirname(__file__), '_segment_csr.*'))[0]) '_segment_csr', [osp.dirname(__file__)]).origin)
@torch.jit.script @torch.jit.script
......
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