Skip to content

Commit

Permalink
optimize CINN CI test time
Browse files Browse the repository at this point in the history
  • Loading branch information
risemeup1 committed Sep 24, 2023
1 parent 832309b commit 9e49a9f
Showing 1 changed file with 78 additions and 0 deletions.
78 changes: 78 additions & 0 deletions paddle/scripts/paddle_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2346,6 +2346,84 @@ set +x
matchstr=''
testcase=''
done <<< "$test_cases";

python ${PADDLE_ROOT}/tools/group_case_for_parallel.py ${PADDLE_ROOT}

single_ut_mem_0_startTime_s=`date +%s`
while read line
do
card_test "$line" 1 4
done < $PADDLE_ROOT/tools/single_card_tests_mem0_new
single_ut_mem_0_endTime_s=`date +%s`
echo "ipipe_log_param_1_mem_0_TestCases_Total_Time: $[ $single_ut_mem_0_endTime_s - $single_ut_mem_0_startTime_s ]s"
echo "ipipe_log_param_1_mem_0_TestCases_Total_Time: $[ $single_ut_mem_0_endTime_s - $single_ut_mem_0_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt

single_ut_startTime_s=`date +%s`
while read line
do
num=$[(`echo $line | awk -F"$" '{print NF-1}'`-1)/6]
if [ $num -eq 0 ]; then
num=1
fi
card_test "$line" 1 $num
done < $PADDLE_ROOT/tools/single_card_tests_new
single_ut_endTime_s=`date +%s`
echo "ipipe_log_param_1_TestCases_Total_Time: $[ $single_ut_endTime_s - $single_ut_startTime_s ]s"
echo "ipipe_log_param_1_TestCases_Total_Time: $[ $single_ut_endTime_s - $single_ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt

multiple_ut_mem_0_startTime_s=`date +%s`
while read line
do
card_test "$line" 2 4
done < $PADDLE_ROOT/tools/multiple_card_tests_mem0_new
multiple_ut_mem_0_endTime_s=`date +%s`
echo "ipipe_log_param_2_mem0_TestCases_Total_Time: $[ $multiple_ut_mem_0_endTime_s - $multiple_ut_mem_0_startTime_s ]s"
echo "ipipe_log_param_2_mem0_TestCases_Total_Time: $[ $multiple_ut_mem_0_endTime_s - $multiple_ut_mem_0_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
multiple_ut_startTime_s=`date +%s`
while read line
do
num=$[(`echo $line | awk -F"$" '{print NF-1}'`-1)/6]
if [ $num -eq 0 ]; then
num=1
fi
card_test "$line" 2 $num

done < $PADDLE_ROOT/tools/multiple_card_tests_new
multiple_ut_endTime_s=`date +%s`
echo "ipipe_log_param_2_TestCases_Total_Time: $[ $multiple_ut_endTime_s - $multiple_ut_startTime_s ]s"
echo "ipipe_log_param_2_TestCases_Total_Time: $[ $multiple_ut_endTime_s - $multiple_ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt

exclusive_ut_mem_0_startTime_s=`date +%s`
while read line
do
card_test "$line" -1 4
done < $PADDLE_ROOT/tools/exclusive_card_tests_mem0_new
exclusive_ut_mem_0_endTime_s=`date +%s`
echo "ipipe_log_param_-1_mem0_TestCases_Total_Time: $[ $exclusive_ut_mem_0_endTime_s - $exclusive_ut_mem_0_startTime_s ]s"
echo "ipipe_log_param_-1_mem0_TestCases_Total_Time: $[ $exclusive_ut_mem_0_endTime_s - $exclusive_ut_mem_0_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt

exclusive_ut_startTime_s=`date +%s`
while read line
do
num=$[(`echo $line | awk -F"$" '{print NF-1}'`-1)/6]
if [ $num -eq 0 ]; then
num=1
fi
card_test "$line" -1 $num
done < $PADDLE_ROOT/tools/exclusive_card_tests_new
exclusive_ut_endTime_s=`date +%s`
echo "ipipe_log_param_-1_TestCases_Total_Time: $[ $exclusive_ut_endTime_s - $exclusive_ut_startTime_s ]s"
echo "ipipe_log_param_-1_TestCases_Total_Time: $[ $exclusive_ut_endTime_s - $exclusive_ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt

noparallel_ut_startTime_s=`date +%s`
while read line
do
card_test "$line" -1 4
done < $PADDLE_ROOT/tools/no_parallel_case_file
noparallel_ut_endTime_s=`date +%s`
echo "ipipe_log_param_noparallel_TestCases_Total_Time: $[ $noparallel_ut_endTime_s - $noparallel_ut_startTime_s ]s"
echo "ipipe_log_param_noparallel_TestCases_Total_Time: $[ $noparallel_ut_endTime_s - $noparallel_ut_startTime_s ]s" >> ${PADDLE_ROOT}/build/build_summary.txt
###retry
card_test "$single_card_tests" 1
collect_failed_tests
set -x
Expand Down

0 comments on commit 9e49a9f

Please sign in to comment.