Commit ac0825f5 authored by rusty1s's avatar rusty1s
Browse files

bugfix

parent b1b7116a
# import subprocess
import torch
from torch.utils.ffi import create_extension
......@@ -9,6 +11,8 @@ extra_objects = []
with_cuda = False
if torch.cuda.is_available():
# subprocess.call('./build.sh') # Compile kernel.
headers += ['torch_scatter/src/cuda.h']
sources += ['torch_scatter/src/cuda.c']
define_macros += [('WITH_CUDA', None)]
......
......@@ -4,6 +4,5 @@ TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__
SRC_DIR=torch_scatter/kernel
BUILD_DIR=torch_scatter/build
rm -rf $BUILD_DIR
mkdir -p $BUILD_DIR
nvcc -c -o $BUILD_DIR/kernel.so $SRC_DIR/kernel.cu -Xcompiler -fPIC -shared -I$TORCH/lib/include/TH -I$TORCH/lib/include/THC -I$TORCH/lib/include -I$SRC_DIR
......@@ -18,8 +18,6 @@ setup(
install_requires=install_requires,
setup_requires=setup_requires,
tests_require=tests_require,
docs_require=docs_require,
packages=find_packages(exclude=['build']),
ext_package='',
cffi_modules=[osp.join(osp.dirname(__file__), 'build.py:ffi')],
)
cffi_modules=[osp.join(osp.dirname(__file__), 'build.py:ffi')], )
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