From ead696ae0339a08aa57304383f9f48a157fec9ab Mon Sep 17 00:00:00 2001 From: Qi Li Date: Mon, 25 Jul 2022 13:15:13 +0800 Subject: [PATCH] skip dist test cases if mlu card number only one, test=develop (#44549) --- paddle/scripts/paddle_build.sh | 9 ++++++++- tools/get_quick_disable_lt.py | 3 +++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/paddle/scripts/paddle_build.sh b/paddle/scripts/paddle_build.sh index 056df18ee42..dd0af79c94d 100755 --- a/paddle/scripts/paddle_build.sh +++ b/paddle/scripts/paddle_build.sh @@ -2280,7 +2280,14 @@ EOF set +x test_cases=$(ctest -N -V) # get all test cases - get_quickly_disable_ut||disable_ut_quickly='disable_ut' # indicate whether the case was in quickly disable list + + mlu_card_num=$(cnmon info -t | grep Card | wc -l) + if [[ $mlu_card_num == 1 ]]; then + get_quickly_disable_ut||disable_ut_quickly='disable_ut' # indicate whether the case was in quickly disable list + else + disable_ut_quickly='disable_ut' + fi + while read -r line; do if [[ "$line" == "" ]]; then continue diff --git a/tools/get_quick_disable_lt.py b/tools/get_quick_disable_lt.py index f56e8c24e8f..856d71d18cf 100644 --- a/tools/get_quick_disable_lt.py +++ b/tools/get_quick_disable_lt.py @@ -33,6 +33,9 @@ def download_file(): if paddle.is_compiled_with_npu(): url = "https://sys-p0.bj.bcebos.com/prec/{}".format('disable_ut_npu') + if paddle.is_compiled_with_mlu(): + url = "https://sys-p0.bj.bcebos.com/prec/{}".format('disable_ut_mlu') + f = requests.get(url) data = f.text status_code = f.status_code -- GitLab