File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 44
55ext_modules = [
66 CppExtension (
7- 'scatter_cpu' , ['cpu/scatter.cpp' ],
7+ 'torch_scatter. scatter_cpu' , ['cpu/scatter.cpp' ],
88 extra_compile_args = ['-Wno-unused-variable' ])
99]
1010cmdclass = {'build_ext' : torch .utils .cpp_extension .BuildExtension }
1111
1212if CUDA_HOME is not None :
1313 ext_modules += [
14- CUDAExtension ('scatter_cuda' ,
14+ CUDAExtension ('torch_scatter. scatter_cuda' ,
1515 ['cuda/scatter.cpp' , 'cuda/scatter_kernel.cu' ])
1616 ]
1717
Original file line number Diff line number Diff line change 11import torch
2- import scatter_cpu
2+ import torch_scatter . scatter_cpu
33
44if torch .cuda .is_available ():
5- import scatter_cuda
5+ import torch_scatter . scatter_cuda
66
77
88def get_func (name , tensor ):
9- module = scatter_cuda if tensor .is_cuda else scatter_cpu
9+ if tensor .is_cuda :
10+ module = torch_scatter .scatter_cuda
11+ else :
12+ module = torch_scatter .scatter_cpu
1013 return getattr (module , name )
You can’t perform that action at this time.
0 commit comments