Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
7990fe57
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
大约 1 年 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
7990fe57
编写于
7月 28, 2022
作者:
G
gaotingquan
提交者:
Tingquan Gao
8月 05, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tipc: set num_wokers=8
上级
3d1fb324
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
8 deletion
+8
-8
test_tipc/benchmark_train.sh
test_tipc/benchmark_train.sh
+8
-8
未找到文件。
test_tipc/benchmark_train.sh
浏览文件 @
7990fe57
...
...
@@ -7,10 +7,10 @@ export str_tmp=$(echo `pip list|grep paddlepaddle-gpu|awk -F ' ' '{print $2}'`)
export
frame_version
=
${
str_tmp
%%.post*
}
export
frame_commit
=
$(
echo
`
${
python
}
-c
"import paddle;print(paddle.version.commit)"
`
)
# run benchmark sh
# run benchmark sh
# Usage:
# bash run_benchmark_train.sh config.txt params
# or
# or
# bash run_benchmark_train.sh config.txt
function
func_parser_params
(){
...
...
@@ -73,8 +73,8 @@ model_type=$4
IFS
=
$'
\n
'
# parser params from train_benchmark.txt
sed
-i
's/ -o DataLoader.Train.sampler.shuffle=False//g'
$FILENAME
sed
-i
's/ -o DataLoader.Train.loader.num_workers=0/ -o
Global.print_batch_step=1
/g'
$FILENAME
sed
-i
's/ -o DataLoader.Train.sampler.shuffle=False/
-o Global.print_batch_step=1
/g'
$FILENAME
sed
-i
's/ -o DataLoader.Train.loader.num_workers=0/ -o
DataLoader.Train.loader.num_workers=8
/g'
$FILENAME
sed
-i
's/-o DataLoader.Train.loader.use_shared_memory=False/ -o Global.eval_during_train=False/g'
$FILENAME
dataline
=
`
cat
$FILENAME
`
# parser params
...
...
@@ -170,7 +170,7 @@ fi
IFS
=
"|"
for
batch_size
in
${
batch_size_list
[*]
}
;
do
for
batch_size
in
${
batch_size_list
[*]
}
;
do
for
precision
in
${
fp_items_list
[*]
}
;
do
for
device_num
in
${
device_num_list
[*]
}
;
do
# sed batchsize and precision
...
...
@@ -199,7 +199,7 @@ for batch_size in ${batch_size_list[*]}; do
log_path
=
"
$SAVE_LOG
/profiling_log"
mkdir
-p
$log_path
log_name
=
"
${
repo_name
}
_
${
model_name
}
_bs
${
batch_size
}
_
${
precision
}
_
${
run_mode
}
_
${
device_num
}
_
${
to_static
}
profiling"
func_sed_params
"
$FILENAME
"
"
${
line_gpuid
}
"
"0"
# sed used gpu_id
func_sed_params
"
$FILENAME
"
"
${
line_gpuid
}
"
"0"
# sed used gpu_id
# set profile_option params
tmp
=
`
sed
-i
"
${
line_profile
}
s/.*/
${
profile_option
}
/"
"
${
FILENAME
}
"
`
...
...
@@ -251,7 +251,7 @@ for batch_size in ${batch_size_list[*]}; do
mkdir
-p
$speed_log_path
log_name
=
"
${
repo_name
}
_
${
model_name
}
_bs
${
batch_size
}
_
${
precision
}
_
${
run_mode
}
_
${
device_num
}
_
${
to_static
}
log"
speed_log_name
=
"
${
repo_name
}
_
${
model_name
}
_bs
${
batch_size
}
_
${
precision
}
_
${
run_mode
}
_
${
device_num
}
_
${
to_static
}
speed"
func_sed_params
"
$FILENAME
"
"
${
line_gpuid
}
"
"
$gpu_id
"
# sed used gpu_id
func_sed_params
"
$FILENAME
"
"
${
line_gpuid
}
"
"
$gpu_id
"
# sed used gpu_id
func_sed_params
"
$FILENAME
"
"
${
line_profile
}
"
"null"
# sed --profile_option as null
cmd
=
"bash test_tipc/test_train_inference_python.sh
${
FILENAME
}
benchmark_train >
${
log_path
}
/
${
log_name
}
2>&1 "
echo
$cmd
...
...
@@ -262,7 +262,7 @@ for batch_size in ${batch_size_list[*]}; do
eval
"cat
${
log_path
}
/
${
log_name
}
"
# parser log
_model_name
=
"
${
model_name
}
_bs
${
batch_size
}
_
${
precision
}
_
${
run_mode
}
"
cmd
=
"
${
python
}
${
BENCHMARK_ROOT
}
/scripts/analysis.py --filename
${
log_path
}
/
${
log_name
}
\
--speed_log_file '
${
speed_log_path
}
/
${
speed_log_name
}
'
\
--model_name
${
_model_name
}
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录