Commit fc91b516 authored by rusty1s's avatar rusty1s
Browse files

replaced importlib with glob

parent 6640a5e4
language: shell
os:
- linux
- osx
# - linux
# - osx
- windows
env:
global:
- CUDA_HOME=/usr/local/cuda
jobs:
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cpu
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu100
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cpu
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu92
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu100
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.8 IDX=cu101
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cpu
- 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=cu101
- 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=cu100
- TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.7 IDX=cpu
# - 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=cu101
# - 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=cu100
# - TORCH_VERSION=1.4.0 PYTHON_VERSION=3.6 IDX=cu101
jobs:
exclude: # Exclude *all* macOS CUDA jobs and Windows CUDA 9.2/10.0 jobs.
......@@ -65,7 +65,6 @@ install:
- source script/torch.sh
- pip install flake8 codecov
- python setup.py install
script:
- flake8 .
- python setup.py test
......@@ -85,6 +84,6 @@ deploy:
acl: public_read
on:
repo: rusty1s/pytorch_scatter
tags: true
branch: master
notifications:
email: false
# flake8: noqa
import os
import importlib
import glob
import os.path as osp
import torch
......@@ -10,8 +10,8 @@ __version__ = '2.0.3'
expected_torch_version = (1, 4)
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_version', [osp.dirname(__file__)]).origin)
torch.ops.load_library(
glob.glob(osp.join(osp.dirname(__file__), '_version.*'))[0])
except OSError as e:
if 'undefined symbol' in str(e):
major, minor = [int(x) for x in torch.__version__.split('.')[:2]]
......
import os
import importlib
import glob
import os.path as osp
from typing import Optional, Tuple
......@@ -8,8 +8,8 @@ import torch
from .utils import broadcast
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_scatter', [osp.dirname(__file__)]).origin)
torch.ops.load_library(
glob.glob(osp.join(osp.dirname(__file__), '_scatter.*'))[0])
except OSError as e:
if os.getenv('BUILD_DOCS', '0') == '1':
pass
......
import os
import importlib
import glob
import os.path as osp
from typing import Optional, Tuple
import torch
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_coo', [osp.dirname(__file__)]).origin)
torch.ops.load_library(
glob.glob(osp.join(osp.dirname(__file__), '_segment_coo.*'))[0])
except OSError as e:
if os.getenv('BUILD_DOCS', '0') == '1':
pass
......
import os
import importlib
import glob
import os.path as osp
from typing import Optional, Tuple
import torch
try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_segment_csr', [osp.dirname(__file__)]).origin)
torch.ops.load_library(
glob.glob(osp.join(osp.dirname(__file__), '_segment_csr.*'))[0])
except OSError as e:
if os.getenv('BUILD_DOCS', '0') == '1':
pass
......
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