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-scatter
Commits
77cfe4be
Unverified
Commit
77cfe4be
authored
Mar 25, 2022
by
Matthias Fey
Committed by
GitHub
Mar 25, 2022
Browse files
prevent creating cuda context on import (#282)
parent
19130401
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
torch_scatter/__init__.py
torch_scatter/__init__.py
+1
-1
No files found.
torch_scatter/__init__.py
View file @
77cfe4be
...
@@ -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
:
...
...
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