未验证 提交 7ab47e8d 编写于 作者: Y YUNSHEN XIE 提交者: GitHub

Fix prec on windows for long args (#32218)

* fix error for long args

* remove unneccessary code
上级 6e946e9d
...@@ -462,27 +462,11 @@ dir %THIRD_PARTY_PATH:/=\%\install\mkldnn\bin ...@@ -462,27 +462,11 @@ dir %THIRD_PARTY_PATH:/=\%\install\mkldnn\bin
dir %THIRD_PARTY_PATH:/=\%\install\warpctc\bin dir %THIRD_PARTY_PATH:/=\%\install\warpctc\bin
pip install requests pip install requests
python %work_dir%\tools\get_quick_disable_lt.py > Output
if %errorlevel%==0 (
set /p disable_ut_quickly=<Output
DEL Output
) else (
set disable_ut_quickly=''
)
set PATH=%THIRD_PARTY_PATH:/=\%\install\openblas\lib;%THIRD_PARTY_PATH:/=\%\install\openblas\bin;^ set PATH=%THIRD_PARTY_PATH:/=\%\install\openblas\lib;%THIRD_PARTY_PATH:/=\%\install\openblas\bin;^
%THIRD_PARTY_PATH:/=\%\install\zlib\bin;%THIRD_PARTY_PATH:/=\%\install\mklml\lib;^ %THIRD_PARTY_PATH:/=\%\install\zlib\bin;%THIRD_PARTY_PATH:/=\%\install\mklml\lib;^
%THIRD_PARTY_PATH:/=\%\install\mkldnn\bin;%THIRD_PARTY_PATH:/=\%\install\warpctc\bin;%PATH% %THIRD_PARTY_PATH:/=\%\install\mkldnn\bin;%THIRD_PARTY_PATH:/=\%\install\warpctc\bin;%PATH%
if "%NIGHTLY_MODE%"=="ON" (
set nightly_label="()"
) else (
set nightly_label="(RUN_TYPE=NIGHTLY^|RUN_TYPE=DIST:NIGHTLY^|RUN_TYPE=EXCLUSIVE:NIGHTLY)"
echo ========================================
echo "Unittests with nightly labels are only run at night"
echo ========================================
)
if "%WITH_GPU%"=="ON" ( if "%WITH_GPU%"=="ON" (
goto:parallel_test_base_gpu goto:parallel_test_base_gpu
) else ( ) else (
......
...@@ -37,6 +37,9 @@ def get_prec_ut_list(all_test_cases, prec_test_cases): ...@@ -37,6 +37,9 @@ def get_prec_ut_list(all_test_cases, prec_test_cases):
if __name__ == '__main__': if __name__ == '__main__':
# get prec cases lists
with open('ut_list', 'r') as f:
prec_test_cases = f.read()
all_test_cases = sys.argv[1] all_test_cases = sys.argv[1]
prec_test_cases = sys.argv[2] #prec_test_cases = sys.argv[2]
get_prec_ut_list(all_test_cases, prec_test_cases) get_prec_ut_list(all_test_cases, prec_test_cases)
...@@ -38,11 +38,13 @@ else ...@@ -38,11 +38,13 @@ else
fi fi
# check added ut # check added ut
set +e if [ ${WITH_GPU:-OFF} == "ON" ];then
cp $PADDLE_ROOT/tools/check_added_ut.sh $PADDLE_ROOT/tools/check_added_ut_win.sh set +e
bash $PADDLE_ROOT/tools/check_added_ut_win.sh cp $PADDLE_ROOT/tools/check_added_ut.sh $PADDLE_ROOT/tools/check_added_ut_win.sh
rm -rf $PADDLE_ROOT/tools/check_added_ut_win.sh bash $PADDLE_ROOT/tools/check_added_ut_win.sh
set -e rm -rf $PADDLE_ROOT/tools/check_added_ut_win.sh
set -e
fi
# /*==================Fixed Disabled Windows unittests==============================*/ # /*==================Fixed Disabled Windows unittests==============================*/
...@@ -231,9 +233,9 @@ if [ ${WITH_GPU:-OFF} == "ON" ];then ...@@ -231,9 +233,9 @@ if [ ${WITH_GPU:-OFF} == "ON" ];then
set +e set +e
if [ ${PRECISION_TEST:-OFF} == "ON" ] && [[ "$precision_cases" != "" ]];then if [ ${PRECISION_TEST:-OFF} == "ON" ] && [[ "$precision_cases" != "" ]];then
UT_list_res=$(python ${PADDLE_ROOT}/tools/windows/get_prec_ut_list.py "$UT_list" "$precision_cases" ) UT_list_res=$(python ${PADDLE_ROOT}/tools/windows/get_prec_ut_list.py "$UT_list" )
UT_list_prec=$(echo "${UT_list_res}" | grep -v 'PRECISION_TEST') UT_list_prec=$(echo "${UT_list_res}" | grep -v 'PRECISION_TEST')
UT_list_prec_info=$(echo "${UT_list_res}" | grep 'PRECISION_TEST') echo "${UT_list_res}" | grep 'PRECISION_TEST'
UT_list=$UT_list_prec UT_list=$UT_list_prec
fi fi
set -e set -e
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册