提交 ee80dbc3 编写于 作者: 叶剑武

Merge branch 'package' into 'master'

package the output files after run.

See merge request !672
......@@ -107,6 +107,11 @@ python_tools_tests:
- rm -rf mace-models
- GIT_SSH_COMMAND="ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" git clone git@github.com:XiaoMi/mace-models.git
- CONF_FILE=mace-models/mobilenet-v2/mobilenet-v2.yml
- >
python tools/converter.py convert --config=${CONF_FILE} --target_abis=armeabi-v7a --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --round=1 --target_abis=armeabi-v7a --validate --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --example --target_abis=armeabi-v7a --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1;
- CONF_FILE=mace-models/mobilenet-v2/mobilenet-v2-host.yml
- >
python tools/converter.py convert --config=${CONF_FILE} --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1;
......
......@@ -1196,6 +1196,16 @@ def run_specific_target(flags, configs, target_abi,
opencl_parameter_bin_path)
def print_package_summary(package_path):
title = "Library"
header = ["key", "value"]
data = list()
data.append(["MACE Model package Path",
package_path])
MaceLogger.summary(StringFormatter.table(header, data, title))
def run_mace(flags):
configs = format_model_config(flags)
if flags.mace_lib_type == MACELibType.dynamic and \
......@@ -1237,6 +1247,11 @@ def run_mace(flags):
run_specific_target(flags, configs, target_abi,
target_soc, serial_num)
# package the output files
package_path = sh_commands.packaging_lib(BUILD_OUTPUT_DIR,
configs[YAMLKeyword.library_name])
print_package_summary(package_path)
################################
# benchmark model
......
......@@ -928,6 +928,7 @@ def packaging_lib(libmace_output_dir, project_name):
glob.glob("%s/*" % project_dir),
_fg=True)
print("Packaging Done!\n")
return tar_package_path
################################
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册