forked from cody2007/alpha_go_zero_implementation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·28 lines (25 loc) · 1.35 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#export CC=gcc-6
#export CXX=g++-6
rm *.o
rm *.so
export TF_INC=TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
export TF_INC=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_include())')
export TF_LIB=$(python -c 'import tensorflow as tf; print(tf.sysconfig.get_lib())')
nvcc -std=c++11 -c -o cuda_op_kernel_52.cu.o cuda_op_kernel.cu.cc -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC \
--expt-relaxed-constexpr -arch=sm_52 -use_fast_math #-g -G -lineinfo
nvcc -std=c++11 -c -o cuda_op_kernel_75.cu.o cuda_op_kernel.cu.cc -I $TF_INC -I$TF_INC/external/nsync/public -D GOOGLE_CUDA=1 -x cu -Xcompiler -fPIC \
--expt-relaxed-constexpr -arch=sm_75 -use_fast_math #-g -G -lineinfo
#sm_52
#-gencode=arch=compute_61,code=sm_61
g++ -std=c++11 -shared -o cuda_op_kernel_52.so cuda_op_kernel.cc \
cuda_op_kernel_52.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L$TF_LIB -ltensorflow_framework \
-L/usr/local/cuda/lib64 -D_GLIBCXX_USE_CXX11_ABI=0 #-g #-O3
g++ -std=c++11 -shared -o cuda_op_kernel_75.so cuda_op_kernel.cc \
cuda_op_kernel_75.cu.o -I $TF_INC -I$TF_INC/external/nsync/public -fPIC -lcudart -L$TF_LIB -ltensorflow_framework \
-L/usr/local/cuda/lib64 -D_GLIBCXX_USE_CXX11_ABI=0 #-g #-O3
cd py_util
echo
echo ".................."
echo "building py_util"
./build.sh
cd ..