Skip to content

Commit

Permalink
fix bug of Linux UT parallel level (PaddlePaddle#30971)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhwesky2010 authored Feb 9, 2021
1 parent f5ca2db commit 5c03327
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -995,19 +995,20 @@ function card_test() {
fi

testcases=$1
parallel_level_base=${CTEST_PARALLEL_LEVEL:-1}
if (( $# > 1 )); then
cardnumber=$2
if (( $cardnumber > $CUDA_DEVICE_COUNT )); then
cardnumber=$CUDA_DEVICE_COUNT
fi
if (( $# > 2 )); then
parallel_job=$3
parallel_job=`expr $3 \* $parallel_level_base`
else
parallel_job=1
parallel_job=$parallel_level_base
fi
else
cardnumber=$CUDA_DEVICE_COUNT
parallel_job=1
parallel_job=$parallel_level_base
fi

if [[ "$testcases" == "" ]]; then
Expand Down

0 comments on commit 5c03327

Please sign in to comment.