"vscode:/vscode.git/clone" did not exist on "9c12b8488ffb1d60b607364296e47d90bd70e7e9"
Commit cd156a4e authored by rusty1s's avatar rusty1s
Browse files

loadmodule

parent fa27e1fd
......@@ -10,34 +10,34 @@ env:
jobs:
include:
- name: linux/cpu
os: linux
language: python
python: 3.7.6
env:
- TORCH=${TORCH_VERSION}+cpu
- name: linux/cu92
os: linux
language: python
python: 3.7.6
env:
- FORCE_CUDA=1
- CUDA_SHORT=9.2
- CUDA=9.2.148-1
- UBUNTU_VERSION=ubuntu1604
- CUBLAS=cuda-cublas-dev-9-2
- TORCH=${TORCH_VERSION}+cu92
- name: linux/cu100
os: linux
language: python
python: 3.7.6
env:
- FORCE_CUDA=1
- CUDA_SHORT=10.0
- CUDA=10.0.130-1
- UBUNTU_VERSION=ubuntu1804
- CUBLAS=cuda-cublas-dev-10-0
- TORCH=${TORCH_VERSION}+cu100
# - name: linux/cpu
# os: linux
# language: python
# python: 3.7.6
# env:
# - TORCH=${TORCH_VERSION}+cpu
# - name: linux/cu92
# os: linux
# language: python
# python: 3.7.6
# env:
# - FORCE_CUDA=1
# - CUDA_SHORT=9.2
# - CUDA=9.2.148-1
# - UBUNTU_VERSION=ubuntu1604
# - CUBLAS=cuda-cublas-dev-9-2
# - TORCH=${TORCH_VERSION}+cu92
# - name: linux/cu100
# os: linux
# language: python
# python: 3.7.6
# env:
# - FORCE_CUDA=1
# - CUDA_SHORT=10.0
# - CUDA=10.0.130-1
# - UBUNTU_VERSION=ubuntu1804
# - CUBLAS=cuda-cublas-dev-10-0
# - TORCH=${TORCH_VERSION}+cu100
- name: linux/cu101
os: linux
language: python
......@@ -49,12 +49,12 @@ jobs:
- UBUNTU_VERSION=ubuntu1804
- CUBLAS=libcublas-dev
- TORCH=${TORCH_VERSION}
- name: macosx/cpu
os: osx
osx_image: xcode11.3
language: shell
env:
- TORCH=${TORCH_VERSION}
# - name: macosx/cpu
# os: osx
# osx_image: xcode11.3
# language: shell
# env:
# - TORCH=${TORCH_VERSION}
- name: windows/cpu
os: windows
language: shell
......@@ -98,17 +98,18 @@ jobs:
# - choco install python --version 3.7.6
install:
- if [ "${TRAVIS_OS_NAME}" = "windows" ]; then echo "wadawd"; alias python3=python; fi
- source install.sh
- pip3 install numpy
- pip3 install torch==${TORCH} -f https://download.pytorch.org/whl/torch_stable.html
- pip3 install flake8
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${FORCE_CUDA}" == "0" ]; then pip3 install codecov; fi
- python3 setup.py install || python setup.py install
script:
- flake8 .
- python3 setup.py test || python setup.py test
- python3 setup.py bdist_wheel || python setup.py bdist_wheel
# - ls dist
after_success:
- if [ "${TRAVIS_OS_NAME}" = "linux" ] && [ "${FORCE_CUDA}" == "0" ]; then codecov; fi
notifications:
email: false
include README.md
include LICENSE
recursive-include csrc *
import importlib
import os.path as osp
import torch
......@@ -13,16 +14,18 @@ from .segment_coo import (segment_sum_coo, segment_add_coo, segment_mean_coo,
from .composite import (scatter_std, scatter_logsumexp, scatter_softmax,
scatter_log_softmax)
torch.ops.load_library(
osp.join(osp.dirname(osp.abspath(__file__)), '_version.so'))
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_version', [osp.dirname(__file__)]).origin)
cuda_version = torch.ops.torch_scatter.cuda_version()
if cuda_version != 1 and torch.version.cuda is not None:
if cuda_version != -1 and torch.version.cuda is not None: # pragma: no cover
if cuda_version < 10000:
major, minor = int(str(cuda_version)[0]), int(str(cuda_version)[2])
else:
major, minor = int(str(cuda_version)[0:2]), int(str(cuda_version)[3])
t_major, t_minor = [int(x) for x in torch.version.cuda.split('.')]
cuda_version = str(major) + '.' + str(minor)
if t_major != major or t_minor != minor:
raise RuntimeError(
'Detected that PyTorch and torch_scatter were compiled with '
......@@ -30,6 +33,8 @@ if cuda_version != 1 and torch.version.cuda is not None:
'torch_scatter has CUDA version={}.{}. Please reinstall the '
'torch_scatter that matches your PyTorch install.'.format(
t_major, t_minor, major, minor))
else:
cuda_version = None
__version__ = '2.0.3'
......@@ -59,5 +64,6 @@ __all__ = [
'scatter_softmax',
'scatter_log_softmax',
'torch_scatter',
'cuda_version',
'__version__',
]
import importlib
import os.path as osp
from typing import Optional, Tuple
......@@ -5,8 +6,8 @@ import torch
from .utils import broadcast
torch.ops.load_library(
osp.join(osp.dirname(osp.abspath(__file__)), '_scatter.so'))
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_scatter', [osp.dirname(__file__)]).origin)
@torch.jit.script
......
import importlib
import os.path as osp
from typing import Optional, Tuple
import torch
torch.ops.load_library(
osp.join(osp.dirname(osp.abspath(__file__)), '_segment_coo.so'))
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_coo', [osp.dirname(__file__)]).origin)
@torch.jit.script
......
import importlib
import os.path as osp
from typing import Optional, Tuple
import torch
torch.ops.load_library(
osp.join(osp.dirname(osp.abspath(__file__)), '_segment_csr.so'))
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_csr', [osp.dirname(__file__)]).origin)
@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