Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
cb7d1396
Mace
项目概览
Xiaomi
/
Mace
通知
106
Star
40
Fork
27
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Mace
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cb7d1396
编写于
4月 27, 2018
作者:
吴
吴承辉
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix_report_ci_for_host_abi' into 'master'
fix report ci for host abi See merge request !432
上级
1e5d7f7a
9d904c6d
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
21 addition
and
13 deletion
+21
-13
tools/mace_tools.py
tools/mace_tools.py
+9
-6
tools/sh_commands.py
tools/sh_commands.py
+12
-7
未找到文件。
tools/mace_tools.py
浏览文件 @
cb7d1396
...
...
@@ -121,21 +121,24 @@ def model_benchmark_stdout_processor(stdout,
metrics
[
4
]
=
str
(
float
(
parts
[
5
]))
break
device_name
=
""
target_soc
=
""
if
abi
!=
"host"
:
props
=
sh_commands
.
adb_getprop_by_serialno
(
serialno
)
device_typ
e
=
props
.
get
(
"ro.product.model"
,
""
)
device_nam
e
=
props
.
get
(
"ro.product.model"
,
""
)
target_soc
=
props
.
get
(
"ro.board.platform"
,
""
)
report_filename
=
FLAGS
.
output_dir
+
"/report.csv"
if
not
os
.
path
.
exists
(
report_filename
):
with
open
(
report_filename
,
'w'
)
as
f
:
f
.
write
(
"model_name,device_
typ
e,soc,abi,runtime,create_net,"
f
.
write
(
"model_name,device_
nam
e,soc,abi,runtime,create_net,"
"engine_ctor,init,warmup,run_avg
\n
"
)
data_str
=
"{model_name},{device_
typ
e},{soc},{abi},{runtime},"
\
data_str
=
"{model_name},{device_
nam
e},{soc},{abi},{runtime},"
\
"{create_net},{engine_ctor},{init},{warmup},{run_avg}
\n
"
\
.
format
(
model_name
=
model_name
,
device_
type
=
device_typ
e
,
device_
name
=
device_nam
e
,
soc
=
target_soc
,
abi
=
abi
,
runtime
=
runtime
,
...
...
tools/sh_commands.py
浏览文件 @
cb7d1396
...
...
@@ -530,8 +530,6 @@ def tuning_run(abi,
output_file_name
=
"model_out"
):
print
(
"* Run '%s' with round=%s, restart_round=%s, tuning=%s"
%
(
model_tag
,
running_round
,
restart_round
,
str
(
tuning
)))
stdout_buff
=
[]
process_output
=
make_output_processor
(
stdout_buff
)
if
abi
==
"host"
:
p
=
subprocess
.
Popen
([
"env"
,
...
...
@@ -547,8 +545,14 @@ def tuning_run(abi,
"--device=%s"
%
device_type
,
"--round=%s"
%
running_round
,
"--restart_round=%s"
%
restart_round
,
"%s"
%
option_args
])
p
.
wait
()
"%s"
%
option_args
],
stderr
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
)
out
,
err
=
p
.
communicate
()
stdout
=
err
+
out
print
stdout
print
(
"Running finished!
\n
"
)
return
stdout
else
:
sh
.
adb
(
"-s"
,
serialno
,
"shell"
,
"mkdir"
,
"-p"
,
phone_data_dir
)
compiled_opencl_dir
=
"/data/local/tmp/mace_run/cl_program/"
...
...
@@ -567,6 +571,8 @@ def tuning_run(abi,
adb_push
(
"mace/core/runtime/hexagon/libhexagon_controller.so"
,
phone_data_dir
,
serialno
)
stdout_buff
=
[]
process_output
=
make_output_processor
(
stdout_buff
)
p
=
sh
.
adb
(
"-s"
,
serialno
,
...
...
@@ -596,7 +602,6 @@ def tuning_run(abi,
_bg
=
True
,
_err_to_out
=
True
)
p
.
wait
()
print
(
"Running finished!
\n
"
)
return
""
.
join
(
stdout_buff
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录