Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
f12cb756
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
f12cb756
编写于
6月 20, 2022
作者:
Z
zhangchunle
提交者:
GitHub
6月 20, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test=windows_ci (#43374)
上级
cf0d6027
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
86 addition
and
21 deletion
+86
-21
tools/windows/run_unittests.sh
tools/windows/run_unittests.sh
+86
-21
未找到文件。
tools/windows/run_unittests.sh
浏览文件 @
f12cb756
...
...
@@ -204,21 +204,10 @@ if [ ${WITH_GPU:-OFF} == "ON" ];then
echo
"Windows 1 card TestCases count is
$num
"
if
[
${
PRECISION_TEST
:-
OFF
}
==
"ON"
]
;
then
python
${
PADDLE_ROOT
}
/tools/get_pr_ut.py
||
echo
"Failed to obtain ut_list !"
if
[[
-f
"ut_list"
]]
;
then
echo
"PREC length: "
`
wc
-l
ut_list
`
precision_cases
=
`
cat
ut_list
`
if
[[
"
$precision_cases
"
!=
""
]]
;
then
python
${
PADDLE_ROOT
}
/tools/windows/get_prec_ut_list.py
fi
fi
fi
# sys.argv[1] may exceed max_arg_length when busybox run parallel_UT_rule in windows
output
=
$(
python
${
PADDLE_ROOT
}
/tools/parallel_UT_rule.py
)
cpu_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
1
)
tetrad_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
2
)
two_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
3
)
non_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
4
)
python
${
PADDLE_ROOT
}
/tools/group_case_for_parallel.py
${
PADDLE_ROOT
}
fi
failed_test_lists
=
''
...
...
@@ -268,7 +257,7 @@ function unittests_retry(){
wintest_error
=
1
retry_time
=
3
exec_times
=
0
exec_retry_threshold
=
1
0
exec_retry_threshold
=
3
0
retry_unittests
=
$(
echo
"
${
failed_test_lists
}
"
|
grep
-oEi
"
\-
.+
\(
"
|
sed
's/(//'
|
sed
's/- //'
)
need_retry_ut_counts
=
$(
echo
"
$retry_unittests
"
|awk
-F
' '
'{print }'
|
sed
'/^$/d'
|
wc
-l
)
retry_unittests_regular
=
$(
echo
"
$retry_unittests
"
|awk
-F
' '
'{print }'
|
awk
'BEGIN{ all_str=""}{if (all_str==""){all_str=$1}else{all_str=all_str"$|^"$1}} END{print "^"all_str"$"}'
)
...
...
@@ -306,7 +295,7 @@ function unittests_retry(){
exec_times
=
$(
echo
$exec_times
|
awk
'{print $0+1}'
)
done
else
# There are more than
1
0 failed unit tests, so no unit test retry
# There are more than
3
0 failed unit tests, so no unit test retry
is_retry_execuate
=
1
fi
rm
-f
$tmp_dir
/
*
...
...
@@ -316,7 +305,7 @@ function show_ut_retry_result() {
if
[[
"
$is_retry_execuate
"
!=
"0"
]]
;
then
failed_test_lists_ult
=
`
echo
"
${
failed_test_lists
}
"
`
echo
"========================================="
echo
"There are more than
1
0 failed unit tests, so no unit test retry!!!"
echo
"There are more than
3
0 failed unit tests, so no unit test retry!!!"
echo
"========================================="
echo
"
${
failed_test_lists_ult
}
"
exit
8
;
...
...
@@ -364,10 +353,86 @@ if nvcc --version | grep 11.2; then
fi
if
[
"
${
WITH_GPU
:-
OFF
}
"
==
"ON"
]
;
then
run_unittest_gpu
$cpu_parallel_job
10
run_unittest_gpu
$tetrad_parallel_job
4
run_unittest_gpu
$two_parallel_job
2
run_unittest_gpu
$non_parallel_job
single_ut_mem_0_startTime_s
=
`
date
+%s
`
while
read
line
do
run_unittest_gpu
"
$line
"
16
done
<
$PADDLE_ROOT
/tools/single_card_tests_mem0_new
single_ut_mem_0_endTime_s
=
`
date
+%s
`
single_ut_mem_0_Time_s
=
`
expr
$single_ut_mem_0_endTime_s
-
$single_ut_mem_0_startTime_s
`
echo
"ipipe_log_param_1_mem_0_TestCases_Total_Time:
$single_ut_mem_0_Time_s
s"
single_ut_startTime_s
=
`
date
+%s
`
while
read
line
do
num
=
`
echo
$line
|
awk
-F
"$"
'{print NF-1}'
`
para_num
=
`
expr
$num
/ 3
`
if
[
$para_num
-eq
0
]
;
then
para_num
=
4
fi
run_unittest_gpu
"
$line
"
$para_num
done
<
$PADDLE_ROOT
/tools/single_card_tests_new
single_ut_endTime_s
=
`
date
+%s
`
single_ut_Time_s
=
`
expr
$single_ut_endTime_s
-
$single_ut_startTime_s
`
echo
"ipipe_log_param_1_TestCases_Total_Time:
$single_ut_Time_s
s"
multiple_ut_mem_0_startTime_s
=
`
date
+%s
`
while
read
line
do
run_unittest_gpu
"
$line
"
10
done
<
$PADDLE_ROOT
/tools/multiple_card_tests_mem0_new
multiple_ut_mem_0_endTime_s
=
`
date
+%s
`
multiple_ut_mem_0_Time_s
=
`
expr
$multiple_ut_mem_0_endTime_s
-
$multiple_ut_mem_0_startTime_s
`
echo
"ipipe_log_param_2_mem0_TestCases_Total_Time:
$multiple_ut_mem_0_Time_s
s"
multiple_ut_startTime_s
=
`
date
+%s
`
while
read
line
do
num
=
`
echo
$line
|
awk
-F
"$"
'{print NF-1}'
`
para_num
=
`
expr
$num
/ 3
`
if
[
$para_num
-eq
0
]
;
then
para_num
=
4
fi
run_unittest_gpu
"
$line
"
$para_num
done
<
$PADDLE_ROOT
/tools/multiple_card_tests_new
multiple_ut_endTime_s
=
`
date
+%s
`
multiple_ut_Time_s
=
`
expr
$multiple_ut_endTime_s
-
$multiple_ut_startTime_s
`
echo
"ipipe_log_param_2_TestCases_Total_Time:
$multiple_ut_Time_s
s"
exclusive_ut_mem_0_startTime_s
=
`
date
+%s
`
while
read
line
do
run_unittest_gpu
"
$line
"
10
done
<
$PADDLE_ROOT
/tools/exclusive_card_tests_mem0_new
exclusive_ut_mem_0_endTime_s
=
`
date
+%s
`
exclusive_ut_mem_0_Time_s
=
`
expr
$exclusive_ut_mem_0_endTime_s
-
$exclusive_ut_mem_0_startTime_s
`
echo
"ipipe_log_param_-1_mem0_TestCases_Total_Time:
$exclusive_ut_mem_0_Time_s
s"
exclusive_ut_startTime_s
=
`
date
+%s
`
while
read
line
do
num
=
`
echo
$line
|
awk
-F
"$"
'{print NF-1}'
`
para_num
=
`
expr
$num
/ 3
`
if
[
$para_num
-eq
0
]
;
then
para_num
=
4
fi
run_unittest_gpu
"
$line
"
$para_num
done
<
$PADDLE_ROOT
/tools/exclusive_card_tests_new
exclusive_ut_endTime_s
=
`
date
+%s
`
exclusive_ut_Time_s
=
`
expr
$exclusive_ut_endTime_s
-
$exclusive_ut_startTime_s
`
echo
"ipipe_log_param_-1_TestCases_Total_Time:
$exclusive_ut_Time_s
s"
noparallel_ut_startTime_s
=
`
date
+%s
`
while
read
line
do
run_unittest_gpu
"
$line
"
3
done
<
$PADDLE_ROOT
/tools/no_parallel_case_file
noparallel_ut_endTime_s
=
`
date
+%s
`
noparallel_ut_Time_s
=
`
expr
$noparallel_ut_endTime_s
-
$noparallel_ut_startTime_s
`
echo
"ipipe_log_param_noparallel_TestCases_Total_Time:
$noparallel_ut_Time_s
s"
else
run_unittest_cpu
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录