Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
096b0f2e
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
096b0f2e
编写于
8月 20, 2021
作者:
T
tianshuo78520a
提交者:
GitHub
8月 20, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add op benchmark run function log (#35034)
* Add run function log * test=document_fix
上级
4641e8fc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
12 addition
and
0 deletion
+12
-0
tools/test_ci_op_benchmark.sh
tools/test_ci_op_benchmark.sh
+12
-0
未找到文件。
tools/test_ci_op_benchmark.sh
浏览文件 @
096b0f2e
...
...
@@ -36,6 +36,7 @@ function LOG {
# Limit cu file directory
function
match_cu_file_directory
{
LOG
"[INFO] run function match_cu_file_directory"
local
sub_dir cu_file_dir
cu_file_dir
=
$(
dirname
${
1
}
)
for
sub_dir
in
""
"/elementwise"
"/reduce_ops"
...
...
@@ -47,6 +48,7 @@ function match_cu_file_directory {
# Load op files by header file
function
load_CHANGE_OP_FILES_by_header_file
{
LOG
"[INFO] run function load_CHANGE_OP_FILES_by_header_file"
local
change_file
for
change_file
in
$(
grep
-rl
"
${
1
}
"
paddle/fluid/operators
)
do
...
...
@@ -68,6 +70,7 @@ function load_CHANGE_OP_FILES_by_header_file {
# Load op files that PR changes
function
load_CHANGE_OP_FILES
{
LOG
"[INFO] run function load_CHANGE_OP_FILES"
local
sub_dir change_file
# TODO(Avin0323): Need to filter the files added by the new OP.
for
change_file
in
$(
git diff
--name-only
origin/develop
)
...
...
@@ -108,6 +111,7 @@ function prepare_benchmark_environment {
# Load unique op name from CHANGE_OP_FILES
function
load_CHANGE_OP_MAP
{
LOG
"[INFO] run function load_CHANGE_OP_MAP"
local
op_name change_file change_file_name
source
benchmark/ci/scripts/op_benchmark.config
for
change_file
in
${
CHANGE_OP_FILES
[@]
}
...
...
@@ -133,6 +137,7 @@ function load_CHANGE_OP_MAP {
# Load ops that will run benchmark test
function
load_BENCHMARK_OP_MAP
{
LOG
"[INFO] run function load_BENCHMARK_OP_MAP"
local
line op_name api_name
source
benchmark/ci/scripts/op_benchmark.config
for
line
in
$(
cat
api_info.txt
)
...
...
@@ -173,6 +178,7 @@ function compile_install_paddlepaddle {
}
function
build_whl
{
LOG
"[INFO] run function build_whl"
for
branch_name
in
"develop"
"test"
do
git checkout
${
branch_name
}
...
...
@@ -184,6 +190,7 @@ function build_whl {
# run op benchmark test
function
run_op_benchmark_test
{
LOG
"[INFO] run function run_op_benchmark_test"
[
${#
BENCHMARK_OP_MAP
[*]
}
-eq
0
]
&&
return
local
logs_dir op_name branch_name api_info_file
[
-z
"
$VISIBLE_DEVICES
"
]
&&
export
VISIBLE_DEVICES
=
0
...
...
@@ -219,6 +226,7 @@ function run_op_benchmark_test {
# check benchmark result
function
check_op_benchmark_result
{
LOG
"[INFO] run function check_op_benchmark_result"
local
logs_dir api_info_file check_status_code
# default 3 times
[
-z
"
${
RETRY_TIMES
}
"
]
&&
RETRY_TIMES
=
3
...
...
@@ -254,6 +262,7 @@ function check_op_benchmark_result {
}
function
check_CHANGE_OP_MAP
{
LOG
"[INFO] run function check_CHANGE_OP_MAP"
for
op_name
in
${
!CHANGE_OP_MAP[@]
}
do
if
[
-z
"
${
BENCHMARK_OP_MAP
[
$op_name
]
}
"
]
...
...
@@ -271,6 +280,7 @@ function check_CHANGE_OP_MAP {
# diff benchmakr result and miss op
function
summary_problems
{
LOG
"[INFO] run function summary_problems"
local
op_name exit_code
exit_code
=
0
if
[
${#
BENCHMARK_OP_MAP
[*]
}
-ne
0
]
...
...
@@ -297,6 +307,8 @@ function cpu_op_benchmark {
function
gpu_op_benchmark
{
LOG
"[INFO] Start run op benchmark gpu test ..."
load_CHANGE_OP_FILES
load_CHANGE_OP_MAP
load_BENCHMARK_OP_MAP
run_op_benchmark_test
summary_problems
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录