Commit d386a375 authored by rusty1s's avatar rusty1s
Browse files

clean

parent a8ec223f
...@@ -6,16 +6,19 @@ import os.path as osp ...@@ -6,16 +6,19 @@ import os.path as osp
import torch import torch
__version__ = '2.0.3' __version__ = '2.0.3'
expected_torch_version = '1.4' expected_torch_version = (1, 4)
try: try:
torch.ops.load_library(importlib.machinery.PathFinder().find_spec( torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
'_version', [osp.dirname(__file__)]).origin) '_version', [osp.dirname(__file__)]).origin)
except OSError as e: except OSError as e:
major, minor = [int(x) for x in torch.__version__.split('.')[:2]] if 'undefined symbol' in str(e):
if 'undefined symbol' in str(e) and major != 1 and minor != 4: major, minor = [int(x) for x in torch.__version__.split('.')[:2]]
raise RuntimeError('Expected PyTorch version {} but found version ' t_major, t_minor = expected_torch_version
'{}.{}.'.format(torch_version, major, minor)) if major != t_major or (major == t_major and minor != t_minor):
raise RuntimeError(
'Expected PyTorch version {}.{} but found version '
'{}.{}.'.format(t_major, t_minor, 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,
......
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