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
1f175220
"vscode:/vscode.git/clone" did not exist on "96598639c072d7f6dadf173c8c53ddcd4abfc6e5"
Commit
1f175220
authored
Feb 10, 2020
by
rusty1s
Browse files
fix cuda
parent
24c599ea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
torch_sparse/tensor.py
torch_sparse/tensor.py
+2
-1
No files found.
torch_sparse/tensor.py
View file @
1f175220
...
...
@@ -321,7 +321,8 @@ class SparseTensor(object):
def
cpu
(
self
):
return
self
.
device_as
(
torch
.
tensor
(
0.
),
non_blocking
=
False
)
def
cuda
(
self
,
options
=
Optional
[
torch
.
Tensor
],
non_blocking
:
bool
=
False
):
def
cuda
(
self
,
options
:
Optional
[
torch
.
Tensor
]
=
None
,
non_blocking
:
bool
=
False
):
if
options
is
not
None
:
return
self
.
device_as
(
options
,
non_blocking
)
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