未验证 提交 390cebee 编写于 作者: Y YUNSHEN XIE 提交者: GitHub

Prec on windows exclude check_added_ut (#31372)

* add precision test for windows ci exclude check_added_ut

* fix error

* added PRECISION_TEST parameters

* fix format error
上级 634a12b3
...@@ -493,7 +493,7 @@ setlocal enabledelayedexpansion ...@@ -493,7 +493,7 @@ setlocal enabledelayedexpansion
:: for /F %%# in ('cmd /C nvidia-smi -L ^|find "GPU" /C') do set CUDA_DEVICE_COUNT=%%# :: for /F %%# in ('cmd /C nvidia-smi -L ^|find "GPU" /C') do set CUDA_DEVICE_COUNT=%%#
set CUDA_DEVICE_COUNT=1 set CUDA_DEVICE_COUNT=1
%cache_dir%\tools\busybox64.exe bash %work_dir%\tools\windows\run_unittests.sh %NIGHTLY_MODE% %cache_dir%\tools\busybox64.exe bash %work_dir%\tools\windows\run_unittests.sh %NIGHTLY_MODE% %PRECISION_TEST%
goto:eof goto:eof
......
...@@ -15,8 +15,9 @@ ...@@ -15,8 +15,9 @@
set -e set -e
set +x set +x
NIGHTLY_MODE=$1 NIGHTLY_MODE=$1
PRECISION_TEST=$2
PADDLE_ROOT="$(cd "$PWD/../" && pwd )" export PADDLE_ROOT="$(cd "$PWD/../" && pwd )"
if [ ${NIGHTLY_MODE:-OFF} == "ON" ]; then if [ ${NIGHTLY_MODE:-OFF} == "ON" ]; then
nightly_label="" nightly_label=""
else else
...@@ -210,6 +211,34 @@ export CUDA_VISIBLE_DEVICES=0 ...@@ -210,6 +211,34 @@ export CUDA_VISIBLE_DEVICES=0
UT_list=$(ctest -N | awk -F ': ' '{print $2}' | sed '/^$/d' | sed '$d') UT_list=$(ctest -N | awk -F ': ' '{print $2}' | sed '/^$/d' | sed '$d')
num=$(ctest -N | awk -F ': ' '{print $2}' | sed '/^$/d' | sed '$d' | wc -l) num=$(ctest -N | awk -F ': ' '{print $2}' | sed '/^$/d' | sed '$d' | wc -l)
echo "Windows 1 card TestCases count is $num" echo "Windows 1 card TestCases count is $num"
if [ ${PRECISION_TEST:-OFF} == "ON" ]; then
python ${PADDLE_ROOT}/tools/get_pr_ut.py
if [[ -f "ut_list" ]]; then
set +x
echo "PREC length: "`wc -l ut_list`
precision_cases=`cat ut_list`
set -x
fi
fi
if [ ${PRECISION_TEST:-OFF} == "ON" ] && [[ "$precision_cases" != "" ]];then
UT_list_prec=''
re=$(cat ut_list|awk -F ' ' '{print }' | awk 'BEGIN{ all_str=""}{if (all_str==""){all_str=$1}else{all_str=all_str"$|^"$1}} END{print "^"all_str"$"}')
for case in $UT_list; do
flag=$(echo $case|grep -oE $re)
if [ -n "$flag" ];then
if [ -z "$UT_list_prec" ];then
UT_list_prec=$case
else
UT_list_prec=$UT_list_prec'\n'$case
fi
else
echo $case "won't run in PRECISION_TEST mode."
fi
done
UT_list=$UT_list_prec
fi
output=$(python ${PADDLE_ROOT}/tools/parallel_UT_rule.py "${UT_list}") output=$(python ${PADDLE_ROOT}/tools/parallel_UT_rule.py "${UT_list}")
eight_parallel_job=$(echo $output | cut -d ";" -f 1) eight_parallel_job=$(echo $output | cut -d ";" -f 1)
tetrad_parallel_jog=$(echo $output | cut -d ";" -f 2) tetrad_parallel_jog=$(echo $output | cut -d ";" -f 2)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册