Commit c60c456c authored by rusty1s's avatar rusty1s
Browse files

rename

parent e6812b97
...@@ -18,7 +18,7 @@ extra_objects = [] ...@@ -18,7 +18,7 @@ extra_objects = []
with_cuda = False with_cuda = False
if torch.cuda.is_available(): if torch.cuda.is_available():
subprocess.call(['./build_new.sh', osp.dirname(torch.__file__)]) subprocess.call(['./build.sh', osp.dirname(torch.__file__)])
headers += ['aten/THCC/THCC{}.h'.format(f) for f in files] headers += ['aten/THCC/THCC{}.h'.format(f) for f in files]
sources += ['aten/THCC/THCC{}.c'.format(f) for f in files] sources += ['aten/THCC/THCC{}.c'.format(f) for f in files]
......
...@@ -3,10 +3,8 @@ ...@@ -3,10 +3,8 @@
echo "Compiling kernel..." echo "Compiling kernel..."
if [ -z "$1" ]; then TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__))"); else TORCH="$1"; fi if [ -z "$1" ]; then TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__))"); else TORCH="$1"; fi
SRC_DIR=torch_cluster/kernel SRC_DIR=aten/THC
BUILD_DIR=torch_cluster/build BUILD_DIR=aten/build
mkdir -p $BUILD_DIR mkdir -p $BUILD_DIR
for i in serial grid; do $(which nvcc) -c -o "$BUILD_DIR/THC.so" "$SRC_DIR/THC.cu" -arch=sm_52 -Xcompiler -fPIC -shared "-I$TORCH/lib/include/TH" "-I$TORCH/lib/include" "-I$SRC_DIR"
$(which nvcc) -c -o "$BUILD_DIR/$i.so" "$SRC_DIR/$i.cu" -arch=sm_35 -Xcompiler -fPIC -shared "-I$TORCH/lib/include/TH" "-I$TORCH/lib/include/THC" "-I$SRC_DIR"
done
#!/bin/sh
echo "Compiling kernel..."
if [ -z "$1" ]; then TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__))"); else TORCH="$1"; fi
SRC_DIR=aten/THC
BUILD_DIR=aten/build
mkdir -p $BUILD_DIR
$(which nvcc) -c -o "$BUILD_DIR/THC.so" "$SRC_DIR/THC.cu" -arch=sm_52 -Xcompiler -fPIC -shared "-I$TORCH/lib/include/TH" "-I$TORCH/lib/include" "-I$SRC_DIR"
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