Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
ebb979dc
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,发现更多精彩内容 >>
提交
ebb979dc
编写于
4月 04, 2018
作者:
Y
yejianwu
浏览文件
操作
浏览文件
下载
差异文件
merge with origin master
上级
3eebc9d3
fb84272e
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
13 addition
and
3 deletion
+13
-3
.gitlab-ci.yml
.gitlab-ci.yml
+2
-2
tools/bazel_adb_run.py
tools/bazel_adb_run.py
+4
-1
tools/sh_commands.py
tools/sh_commands.py
+7
-0
未找到文件。
.gitlab-ci.yml
浏览文件 @
ebb979dc
...
...
@@ -13,10 +13,10 @@ ops_test:
stage
:
ops_test
script
:
-
if [ -z "$TARGET_SOCS" ]; then TARGET_SOCS=random; fi
-
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" --run_target=True --stdout_processor=ops_test_stdout_processor --target_
socs=$TARGET_SOCS
-
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" --run_target=True --stdout_processor=ops_test_stdout_processor --target_
abis=armeabi-v7a,arm64-v8a --target_socs=$TARGET_SOCS
ops_benchmark
:
stage
:
ops_benchmark
script
:
-
if [ -z "$TARGET_SOCS" ]; then TARGET_SOCS=random; fi
-
python tools/bazel_adb_run.py --target="//mace/ops:ops_benchmark" --run_target=True --stdout_processor=ops_benchmark_stdout_processor --target_
socs=$TARGET_SOCS
-
python tools/bazel_adb_run.py --target="//mace/ops:ops_benchmark" --run_target=True --stdout_processor=ops_benchmark_stdout_processor --target_
abis=armeabi-v7a,arm64-v8a --target_socs=$TARGET_SOCS --args="--filter=.*CONV.*"
tools/bazel_adb_run.py
浏览文件 @
ebb979dc
...
...
@@ -94,13 +94,16 @@ def main(unused_args):
sh_commands
.
bazel_build
(
target
,
abi
=
target_abi
)
if
FLAGS
.
run_target
:
for
serialno
in
target_devices
:
device_properties
=
sh_commands
.
adb_getprop_by_serialno
(
serialno
)
if
target_abi
not
in
set
(
sh_commands
.
adb_supported_abis
(
serialno
)):
print
(
"Skip device %s which does not support ABI %s"
%
(
serialno
,
target_abi
))
continue
stdouts
=
sh_commands
.
adb_run
(
serialno
,
host_bin_path
,
bin_name
,
args
=
FLAGS
.
args
,
opencl_profiling
=
1
,
vlog_level
=
0
,
device_bin_path
=
"/data/local/tmp/mace"
,
out_of_range_check
=
1
)
device_properties
=
sh_commands
.
adb_getprop_by_serialno
(
serialno
)
globals
()[
FLAGS
.
stdout_processor
](
stdouts
,
device_properties
,
target_abi
)
if
__name__
==
"__main__"
:
...
...
tools/sh_commands.py
浏览文件 @
ebb979dc
...
...
@@ -49,6 +49,12 @@ def adb_getprop_by_serialno(serialno):
props
[
m
.
group
(
1
)]
=
m
.
group
(
2
)
return
props
def
adb_supported_abis
(
serialno
):
props
=
adb_getprop_by_serialno
(
serialno
)
abilist_str
=
props
[
"ro.product.cpu.abilist"
]
abis
=
[
abi
.
strip
()
for
abi
in
abilist_str
.
split
(
','
)]
return
abis
def
adb_get_all_socs
():
socs
=
[]
for
d
in
adb_devices
():
...
...
@@ -89,6 +95,7 @@ def adb_run(serialno, host_bin_path, bin_name,
# bazel commands
################################
def
bazel_build
(
target
,
strip
=
"always"
,
abi
=
"armeabi-v7a"
):
print
(
"Build %s with ABI %s"
%
(
target
,
abi
))
stdout_buff
=
[]
process_output
=
make_output_processor
(
stdout_buff
)
p
=
sh
.
bazel
(
"build"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录