We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 77b4b50 + ce46b2c commit 15afee0Copy full SHA for 15afee0
setup.py
@@ -1,6 +1,6 @@
1
from setuptools import setup, find_packages
2
import torch
3
-from torch.utils.cpp_extension import CppExtension, CUDAExtension
+from torch.utils.cpp_extension import CppExtension, CUDAExtension, CUDA_HOME
4
5
ext_modules = [
6
CppExtension(
@@ -9,7 +9,7 @@
9
]
10
cmdclass = {'build_ext': torch.utils.cpp_extension.BuildExtension}
11
12
-if torch.cuda.is_available():
+if CUDA_HOME is not None:
13
ext_modules += [
14
CUDAExtension('scatter_cuda',
15
['cuda/scatter.cpp', 'cuda/scatter_kernel.cu'])
0 commit comments