Commit 4945965c authored by mpariente's avatar mpariente
Browse files

No RuntimeError if cuda is not available.

torch.version.cuda can still exists when it was installed CPU-only.
parent 54d23137
...@@ -39,7 +39,7 @@ except AttributeError as e: ...@@ -39,7 +39,7 @@ except AttributeError as e:
torch.ops.torch_scatter.segment_max_coo = segment_coo_arg_placeholder torch.ops.torch_scatter.segment_max_coo = segment_coo_arg_placeholder
torch.ops.torch_scatter.gather_coo = gather_coo_placeholder torch.ops.torch_scatter.gather_coo = gather_coo_placeholder
if torch.version.cuda is not None: # pragma: no cover if torch.version.cuda is not None and torch.cuda.is_available(): # pragma: no cover
cuda_version = torch.ops.torch_scatter.cuda_version() cuda_version = torch.ops.torch_scatter.cuda_version()
if cuda_version == -1: if cuda_version == -1:
......
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