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

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
rusty1s committed
6
7
8
SRC_DIR=torch_spline_conv/kernel
BUILD_DIR=torch_spline_conv/build

rusty1s's avatar
rusty1s committed
9
10
mkdir -p "$BUILD_DIR"
$(which nvcc) -c -o "$BUILD_DIR/kernel.so" "$SRC_DIR/kernel.cu" -arch=sm_35 -Xcompiler -fPIC -shared "-I$1/lib/include/TH" "-I$1/lib/include/THC" "-I$SRC_DIR"