build.sh 418 Bytes
Newer Older
rusty1s's avatar
rusty1s committed
1
2
#!/bin/sh

rusty1s's avatar
rusty1s committed
3
4
echo "Compiling kernel..."

rusty1s's avatar
rusty1s committed
5
if [ -z "$1" ]; then TORCH=$(python -c "import os; import torch; print(os.path.dirname(torch.__file__))"); else TORCH="$1"; fi
rusty1s's avatar
rename  
rusty1s committed
6
SRC_DIR=aten/THC
rusty1s's avatar
rusty1s committed
7
BUILD_DIR=torch_cluster/_ext
rusty1s's avatar
rusty1s committed
8
9

mkdir -p $BUILD_DIR
rusty1s's avatar
rusty1s committed
10
$(which nvcc) "-I$TORCH/lib/include" "-I$TORCH/lib/include/TH" "-I$TORCH/lib/include/THC" "-I$SRC_DIR" -c "$SRC_DIR/THC.cu" -o "$BUILD_DIR/THC.so" --compiler-options '-fPIC' -std=c++11