Skip to content

Commit 516d988

Browse files
committed
fix cuda context
1 parent 27090b0 commit 516d988

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

torch_cluster/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
f"{osp.dirname(__file__)}")
2222

2323
cuda_version = torch.ops.torch_cluster.cuda_version()
24-
if torch.cuda.is_available() and cuda_version != -1: # pragma: no cover
24+
if torch.version.cuda is not None and cuda_version != -1: # pragma: no cover
2525
if cuda_version < 10000:
2626
major, minor = int(str(cuda_version)[0]), int(str(cuda_version)[2])
2727
else:

0 commit comments

Comments
 (0)