Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
torch-sparse
Commits
000b1ac5
Commit
000b1ac5
authored
Jul 17, 2020
by
mpariente
Browse files
No RuntimeError if cuda is not available.
torch.version.cuda can still exists when it was installed CPU-only.
parent
ed3de958
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_sparse/__init__.py
torch_sparse/__init__.py
+1
-1
No files found.
torch_sparse/__init__.py
View file @
000b1ac5
...
...
@@ -12,7 +12,7 @@ for library in [
torch
.
ops
.
load_library
(
importlib
.
machinery
.
PathFinder
().
find_spec
(
library
,
[
osp
.
dirname
(
__file__
)]).
origin
)
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_sparse
.
cuda_version
()
if
cuda_version
==
-
1
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment