From f5d6937fe163f3ee774c25e95246371288ea2b1c Mon Sep 17 00:00:00 2001 From: wopeizl Date: Wed, 24 Apr 2019 13:08:33 +0800 Subject: [PATCH] =?UTF-8?q?specify=20the=20cuda=20arch=20name=20and=20bin?= =?UTF-8?q?=20to=20decrease=20the=20compile=20time=20for=20i=E2=80=A6=20(#?= =?UTF-8?q?17020)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. specify the cuda arch name and bin to decrease the compile time for inference test=develop 2. simplify the script and add comments 3. remove the fluid process from cicheck --- paddle/scripts/paddle_build.sh | 92 ++++++++-------------------------- 1 file changed, 21 insertions(+), 71 deletions(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 99320e27135..760a4437072 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -194,6 +194,7 @@ function cmake_gen() { -DWITH_AVX=${WITH_AVX:-OFF} -DWITH_GOLANG=${WITH_GOLANG:-OFF} -DCUDA_ARCH_NAME=${CUDA_ARCH_NAME:-All} + -DCUDA_ARCH_BIN=${CUDA_ARCH_BIN} \ -DWITH_PYTHON=${WITH_PYTHON:-ON} -DCUDNN_ROOT=/usr/ -DWITH_TESTING=${WITH_TESTING:-ON} @@ -228,6 +229,7 @@ EOF -DWITH_AVX=${WITH_AVX:-OFF} \ -DWITH_GOLANG=${WITH_GOLANG:-OFF} \ -DCUDA_ARCH_NAME=${CUDA_ARCH_NAME:-All} \ + -DCUDA_ARCH_BIN=${CUDA_ARCH_BIN} \ -DWITH_PYTHON=${WITH_PYTHON:-ON} \ -DCUDNN_ROOT=/usr/ \ -DWITH_TESTING=${WITH_TESTING:-ON} \ @@ -561,57 +563,6 @@ function bind_test() { wait } -function parallel_test() { - mkdir -p ${PADDLE_ROOT}/build - cd ${PADDLE_ROOT}/build - if [ ${WITH_TESTING:-ON} == "ON" ] ; then - cat < ${CODE}" ; - EXIT_CODE=1; - fi - done - wait; # wait for all subshells to finish - - echo "EXIT_CODE => $EXIT_CODE" - if [[ "${EXIT_CODE}" != "0" ]]; then - exit "$EXIT_CODE" - fi - fi -} - EXIT_CODE=0; function caught_error() { for job in `jobs -p`; do @@ -657,7 +608,6 @@ function card_test() { cuda_list="$cuda_list,$[i*cardnumber+j]" fi done - # echo $cuda_list if [ ${TESTING_DEBUG_MODE:-OFF} == "ON" ] ; then if [[ $cardnumber == $CUDA_DEVICE_COUNT ]]; then ctest -I $i,,$NUM_PROC -R "($testcases)" -V & @@ -675,26 +625,27 @@ function card_test() { done wait; # wait for all subshells to finish + set +m } -function aggresive_test() { +function parallel_test() { mkdir -p ${PADDLE_ROOT}/build cd ${PADDLE_ROOT}/build if [ ${WITH_TESTING:-ON} == "ON" ] ; then cat <