Unverified Commit 9fa63034 authored by Matthias Fey's avatar Matthias Fey Committed by GitHub
Browse files

Merge pull request #4 from AntoinePrv/cuda_no_cuda

Cuda no cuda; Deprecation warning.
parents 9bc8aa96 84d5c89e
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',
......
......@@ -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_variables
indexA, valueA, indexB, valueB, indexC = ctx.saved_tensors
grad_valueA = grad_valueB = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment