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
9fa63034
Unverified
Commit
9fa63034
authored
Nov 23, 2018
by
Matthias Fey
Committed by
GitHub
Nov 23, 2018
Browse files
Merge pull request #4 from AntoinePrv/cuda_no_cuda
Cuda no cuda; Deprecation warning.
parents
9bc8aa96
84d5c89e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
setup.py
setup.py
+2
-2
torch_sparse/spspmm.py
torch_sparse/spspmm.py
+1
-1
No files found.
setup.py
View file @
9fa63034
from
setuptools
import
setup
,
find_packages
import
torch
from
torch.utils.cpp_extension
import
BuildExtension
,
CUDAExtension
from
torch.utils.cpp_extension
import
BuildExtension
,
CUDAExtension
,
CUDA_HOME
__version__
=
'0.2.2'
url
=
'https://github.com/rusty1s/pytorch_sparse'
...
...
@@ -11,7 +11,7 @@ tests_require = ['pytest', 'pytest-cov']
ext_modules
=
[]
cmdclass
=
{}
if
torch
.
cuda
.
is_available
()
:
if
CUDA_HOME
is
not
None
:
ext_modules
+=
[
CUDAExtension
(
'spspmm_cuda'
,
...
...
torch_sparse/spspmm.py
View file @
9fa63034
...
...
@@ -37,7 +37,7 @@ class SpSpMM(torch.autograd.Function):
@
staticmethod
def
backward
(
ctx
,
grad_indexC
,
grad_valueC
):
m
,
k
,
n
=
ctx
.
m
,
ctx
.
k
,
ctx
.
n
indexA
,
valueA
,
indexB
,
valueB
,
indexC
=
ctx
.
saved_
variable
s
indexA
,
valueA
,
indexB
,
valueB
,
indexC
=
ctx
.
saved_
tensor
s
grad_valueA
=
grad_valueB
=
None
...
...
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