Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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'
Expand All @@ -11,7 +11,7 @@
ext_modules = []
cmdclass = {}

if torch.cuda.is_available():
if CUDA_HOME is not None:
ext_modules += [
CUDAExtension(
'spspmm_cuda',
Expand Down
2 changes: 1 addition & 1 deletion torch_sparse/spspmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def forward(ctx, indexA, valueA, indexB, valueB, m, k, n):
@staticmethod
def backward(ctx, grad_indexC, grad_valueC):
m, k, n = ctx.m, ctx.k, ctx.n
indexA, valueA, indexB, valueB, indexC = ctx.saved_variables
indexA, valueA, indexB, valueB, indexC = ctx.saved_tensors

grad_valueA = grad_valueB = None

Expand Down