Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
1223238f
P
Paddle
项目概览
PaddlePaddle
/
Paddle
1 年多 前同步成功
通知
2302
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看板
未验证
提交
1223238f
编写于
11月 17, 2021
作者:
Z
zhangchunle
提交者:
GitHub
11月 17, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add ut parallel (#37211)
上级
5e4b419b
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
943 addition
and
414 deletion
+943
-414
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+36
-44
tools/parallel_UT_rule.py
tools/parallel_UT_rule.py
+907
-370
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
1223238f
...
...
@@ -1209,15 +1209,17 @@ set +x
single_card_tests_high_parallel
=
'^job$'
# cases list which would run 24 job each time with single GPU
single_card_tests_secondary_high_parallel
=
'^job$'
# cases list which would run 15 job each time with single GPU
single_card_tests_third_high_parallel
=
'^job$'
# cases list which would run 12 job each time with single GPU
single_card_tests_medium_parallel
=
'^job$'
# cases list which would run 7 job each time with single GPU
single_card_tests_non_parallel
=
'^job$'
# cases list which would run 2 job each time with single GPU
single_card_tests_forth_high_parallel
=
'^job$'
# cases list which would run 7 job each time with single GPU
single_card_tests_fifth_high_parallel
=
'^job$'
# cases list which would run 4 job each time with single GPU
single_card_tests_lowest_parallel
=
'^job$'
# cases list which would run 2 job each time with single GPU
single_card_tests_non_parallel
=
'^job$'
# cases list which would run 4 job each time with single GPU
single_card_tests
=
'^job$'
# all cases list which would take single GPU
multiple_card_tests_medium_parallel
=
'^job$'
# cases list which would run 4 job each time with multiple GPUs, most cases would be two GPUs
multiple_card_tests_non_parallel
=
'^job$'
# cases list which would run
2
job each time with multiple GPUs, most cases would be two GPUs
multiple_card_tests_non_parallel
=
'^job$'
# cases list which would run
3
job each time with multiple GPUs, most cases would be two GPUs
exclusive_tests_high_parallel
=
'^job$'
# cases list which would run
5
job exclusively(with all GPUs)
exclusive_tests_medium_parallel
=
'^job$'
# cases list which would run
3
job exclusively(with all GPUs)
exclusive_tests_high_parallel
=
'^job$'
# cases list which would run
7
job exclusively(with all GPUs)
exclusive_tests_medium_parallel
=
'^job$'
# cases list which would run
4
job exclusively(with all GPUs)
exclusive_tests_non_parallel
=
'^job$'
# cases list which would run 2 job exclusively(with all GPUs)
is_exclusive
=
''
# indicate whether the case is exclusive type
...
...
@@ -1227,12 +1229,15 @@ set +x
UT_list
=
$(
ctest
-N
|
awk
-F
': '
'{print $2}'
|
sed
'/^$/d'
|
sed
'$d'
)
output
=
$(
python
${
PADDLE_ROOT
}
/tools/parallel_UT_rule.py
"
${
UT_list
}
"
)
cpu_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
1
)
secondary_cpu_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
2
)
third_cpu_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
3
)
tetrad_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
4
)
two_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
5
)
non_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
6
)
high_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
1
)
secondary_high_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
2
)
third_high_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
3
)
fourth_high_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
4
)
fifth_high_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
5
)
sixth_high_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
6
)
lowest_high_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
7
)
non_parallel_job
=
$(
echo
$output
|
cut
-d
";"
-f
8
)
while
read
-r
line
;
do
if
[[
"
$line
"
==
""
]]
;
then
continue
...
...
@@ -1274,28 +1279,32 @@ set +x
fi
if
[[
"
$is_exclusive
"
!=
""
]]
;
then
if
[[
$(
echo
$
cpu
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
if
[[
$(
echo
$
high
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
exclusive_tests_high_parallel
=
"
$exclusive_tests_high_parallel
|^
$testcase
$"
elif
[[
$(
echo
$
tetrad_parallel_job$two
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
elif
[[
$(
echo
$
fourth_high_parallel_job$fifth_high
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
exclusive_tests_medium_parallel
=
"
$exclusive_tests_medium_parallel
|^
$testcase
$"
else
exclusive_tests_non_parallel
=
"
$exclusive_tests_non_parallel
|^
$testcase
$"
fi
elif
[[
"
$is_multicard
"
!=
""
]]
;
then
if
[[
$(
echo
$
cpu_parallel_job$tetrad
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
if
[[
$(
echo
$
high_parallel_job$fourth_high
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
multiple_card_tests_medium_parallel
=
"
$multiple_card_tests_medium_parallel
|^
$testcase
$"
else
multiple_card_tests_non_parallel
=
"
$multiple_card_tests_non_parallel
|^
$testcase
$"
fi
else
if
[[
$(
echo
$
cpu
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
if
[[
$(
echo
$
high
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
single_card_tests_high_parallel
=
"
$single_card_tests_high_parallel
|^
$testcase
$"
elif
[[
$(
echo
$secondary_
cpu
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
elif
[[
$(
echo
$secondary_
high
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
single_card_tests_secondary_high_parallel
=
"
$single_card_tests_secondary_high_parallel
|^
$testcase
$"
elif
[[
$(
echo
$third_
cpu
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
elif
[[
$(
echo
$third_
high
_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
single_card_tests_third_high_parallel
=
"
$single_card_tests_third_high_parallel
|^
$testcase
$"
elif
[[
$(
echo
$tetrad_parallel_job$two_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
single_card_tests_medium_parallel
=
"
$single_card_tests_medium_parallel
|^
$testcase
$"
elif
[[
$(
echo
$fourth_high_parallel_job$fifth_high_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
single_card_tests_forth_high_parallel
=
"
$single_card_tests_forth_high_parallel
|^
$testcase
$"
elif
[[
$(
echo
$sixth_high_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
single_card_tests_fifth_high_parallel
=
"
$single_card_tests_fifth_high_parallel
|^
$testcase
$"
elif
[[
$(
echo
$lowest_high_parallel_job
|
grep
-o
"
\^
$testcase
\\
$"
)
!=
""
]]
;
then
single_card_tests_lowest_parallel
=
"
$single_card_tests_lowest_parallel
|^
$testcase
$"
else
single_card_tests_non_parallel
=
"
$single_card_tests_non_parallel
|^
$testcase
$"
fi
...
...
@@ -1312,41 +1321,24 @@ set +x
single_ut_startTime_s
=
`
date
+%s
`
card_test
"
$single_card_tests_high_parallel
"
1 24
# run cases 24 job each time with single GPU
echo
"single_card_tests_high_parallel finished!!!"
card_test
"
$single_card_tests_secondary_high_parallel
"
1 15
# run cases 15 job each time with single GPU
echo
"single_card_tests_secondary_high_parallel finished!!!"
card_test
"
$single_card_tests_third_high_parallel
"
1 12
# run cases 12 job each time with single GPU
echo
"single_card_tests_third_high_parallel finished!!!"
card_test
"
$single_card_tests_medium_parallel
"
1 7
# run cases 7 job each time with single GPU
echo
"single_card_tests_medium_parallel finished!!!"
card_test
"
$single_card_tests_non_parallel
"
1 2
# run cases 2 job each time with single GPU
echo
"single_card_tests_non_parallel finished!!!"
card_test
"
$single_card_tests_forth_high_parallel
"
1 7
# run cases 7 job each time with single GPU
card_test
"
$single_card_tests_fifth_high_parallel
"
1 4
# run cases 4 job each time with single GPU
card_test
"
$single_card_tests_lowest_parallel
"
1 2
# run cases 2 job each time with single GPU
card_test
"
$single_card_tests_non_parallel
"
1 4
# run cases 4 job each time with single GPU
single_ut_endTime_s
=
`
date
+%s
`
echo
"single_card_tests finished!!!"
multi_ut_startTime_s
=
`
date
+%s
`
echo
"multiple_card_tests begined!!!!!"
card_test
"
$multiple_card_tests_medium_parallel
"
2 4
# run cases 2 job each time with two GPUs
echo
"multiple_card_tests_medium_parallel finished!!!"
card_test
"
$multiple_card_tests_non_parallel
"
2 2
# run cases 1 job each time with two GPUs
echo
"multiple_card_tests_non_parallel finished!!!"
card_test
"
$multiple_card_tests_non_parallel
"
2 3
# run cases 1 job each time with two GPUs
multi_ut_endTime_s
=
`
date
+%s
`
echo
"multiple_card_tests finished!!!"
exclu_ut_startTime_s
=
`
date
+%s
`
echo
"exclu_card_tests begined!!!!!"
card_test
"
$exclusive_tests_high_parallel
"
-1
5
# run cases exclusively, in this cases would be run with 2/4/8 GPUs
echo
"exclusive_tests_high_parallel finished!!!"
card_test
"
$exclusive_tests_medium_parallel
"
-1
3
# run cases exclusively, in this cases would be run with 2/4/8 GPUs
echo
"exclusive_tests_medium_parallel finished!!!"
card_test
"
$exclusive_tests_non_parallel
"
-1
2
# run cases exclusively, in this cases would be run with 2/4/8 GPUs
echo
"exclusive_tests_non_parallel finished!!!"
card_test
"
$exclusive_tests_high_parallel
"
-1
7
# run cases exclusively, in this cases would be run with 2/4/8 GPUs
card_test
"
$exclusive_tests_medium_parallel
"
-1
4
# run cases exclusively, in this cases would be run with 2/4/8 GPUs
card_test
"
$exclusive_tests_non_parallel
"
-1
2
# run cases exclusively, in this cases would be run with 2/4/8 GPUs
exclu_ut_endTime_s
=
`
date
+%s
`
echo
"exclusive_tests finished!!!"
echo
"ipipe_log_param_1aaa_TestCases_Total_Time:
$[
$single_ut_endTime_s
-
$single_ut_startTime_s
]s"
echo
"ipipe_log_param_2aaa_TestCases_Total_Time:
$[
$multi_ut_endTime_s
-
$multi_ut_startTime_s
]s"
echo
"ipipe_log_param_Exclusiveaaaa_TestCases_Total_Time:
$[
$exclu_ut_endTime_s
-
$exclu_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
echo
"ipipe_log_param_2_TestCases_Total_Time:
$[
$multi_ut_endTime_s
-
$multi_ut_startTime_s
]s"
>>
${
PADDLE_ROOT
}
/build/build_summary.txt
...
...
tools/parallel_UT_rule.py
浏览文件 @
1223238f
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录