Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
da3784cd
Mace
项目概览
Xiaomi
/
Mace
通知
107
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看板
提交
da3784cd
编写于
3月 15, 2018
作者:
Y
yejianwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix run
上级
72544211
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
8 deletion
+9
-8
tools/example.yaml
tools/example.yaml
+1
-0
tools/mace_tools.py
tools/mace_tools.py
+6
-6
tools/tuning_run.sh
tools/tuning_run.sh
+2
-2
未找到文件。
tools/example.yaml
浏览文件 @
da3784cd
# example.yaml
# Each yaml file describes a exported library (could be named [target_abi]/libmace-${filename}.a),
# which can contains more than one models
# target_soc can get by `adb shell getprop | grep ro.board.platform | cut -d [ -f3 | cut -d ] -f1`
target_abis
:
[
armeabi-v7a
,
arm64-v8a
]
target_socs
:
[
MSM8953
]
embed_model_data
:
1
...
...
tools/mace_tools.py
浏览文件 @
da3784cd
...
...
@@ -136,10 +136,10 @@ def build_run_throughput_test(run_seconds, merged_lib_file, model_input_dir):
run_command
(
command
)
def
validate_model
(
model_output_dir
):
def
validate_model
(
target_soc
,
model_output_dir
):
generate_data_or_not
=
False
command
=
"bash tools/validate_tools.sh {} {}"
.
format
(
model_output_dir
,
int
(
generate_data_or_not
))
command
=
"bash tools/validate_tools.sh {} {}
{}
"
.
format
(
target_soc
,
model_output_dir
,
int
(
generate_data_or_not
))
run_command
(
command
)
...
...
@@ -262,13 +262,13 @@ def main(unused_args):
build_mace_run_prod
(
target_soc
,
model_output_dir
,
FLAGS
.
tuning
,
global_runtime
)
if
FLAGS
.
mode
==
"run"
or
FLAGS
.
mode
==
"validate"
or
FLAGS
.
mode
==
"all"
:
run_model
(
target_soc
,
model_output_dir
,
FLAGS
.
round
,
FLAGS
.
restart_round
)
run_model
(
target_soc
,
model_output_dir
,
FLAGS
.
round
,
FLAGS
.
restart_round
,
option_args
)
if
FLAGS
.
mode
==
"benchmark"
:
benchmark_model
(
model_output_dir
)
benchmark_model
(
model_output_dir
,
option_args
)
if
FLAGS
.
mode
==
"validate"
or
FLAGS
.
mode
==
"all"
:
validate_model
(
model_output_dir
)
validate_model
(
target_soc
,
model_output_dir
)
if
FLAGS
.
mode
==
"build"
or
FLAGS
.
mode
==
"merge"
or
FLAGS
.
mode
==
"all"
:
merge_libs_and_tuning_results
(
target_soc
,
FLAGS
.
output_dir
+
"/"
+
os
.
environ
[
"PROJECT_NAME"
],
...
...
tools/tuning_run.sh
浏览文件 @
da3784cd
...
...
@@ -79,13 +79,13 @@ else
--device=
${
DEVICE_TYPE
}
\
--round=
$ROUND
\
--restart_round=
$RESTART_ROUND
\
$OPTION_ARGS
; echo
\
\
$?
"
$OPTION_ARGS
; echo
\$
?"
echo
$ADB_CMD_STR
mace_adb_output
=
`
adb
-s
$DEVICE_ID
</dev/null shell
"
$ADB_CMD_STR
"
`
||
exit
1
echo
"
$mace_adb_output
"
|
head
-n
-1
mace_adb_return_code
=
`
echo
"
$mace_adb_output
"
|
tail
-1
`
if
[
${
mace_adb_return_code
%?
}
-ne
0
]
;
then
if
!
[[
${
mace_adb_return_code
%?
}
=
0
||
${
mace_adb_return_code
}
=
0
]
]
;
then
exit
1
fi
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录