"packaging/git@developer.sourcefind.cn:OpenDAS/vision.git" did not exist on "98aa805eb91e0378e118b654cf67c41ba2064e62"
Unverified Commit 77cfe4be authored by Matthias Fey's avatar Matthias Fey Committed by GitHub
Browse files

prevent creating cuda context on import (#282)

parent 19130401
...@@ -47,7 +47,7 @@ for library in ['_version', '_scatter', '_segment_csr', '_segment_coo']: ...@@ -47,7 +47,7 @@ for library in ['_version', '_scatter', '_segment_csr', '_segment_coo']:
torch.ops.torch_scatter.gather_coo = gather_coo_placeholder torch.ops.torch_scatter.gather_coo = gather_coo_placeholder
cuda_version = torch.ops.torch_scatter.cuda_version() cuda_version = torch.ops.torch_scatter.cuda_version()
if torch.cuda.is_available() and cuda_version != -1: # pragma: no cover if torch.version.cuda is not None and cuda_version != -1: # pragma: no cover
if cuda_version < 10000: if cuda_version < 10000:
major, minor = int(str(cuda_version)[0]), int(str(cuda_version)[2]) major, minor = int(str(cuda_version)[0]), int(str(cuda_version)[2])
else: else:
......
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