Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
闹闹不闹!
Mace
提交
e3db01e5
Mace
项目概览
闹闹不闹!
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
1
Fork
0
代码
文件
提交
分支
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,发现更多精彩内容 >>
提交
e3db01e5
编写于
12月 17, 2018
作者:
李
李寅
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix-travis-ci' into 'master'
Fix travis CI problems. See merge request !907
上级
7a79a9cf
f3e416ce
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
73 addition
and
38 deletion
+73
-38
mace/test/BUILD
mace/test/BUILD
+58
-22
mace/test/mace_api_mt_test.cc
mace/test/mace_api_mt_test.cc
+0
-2
tools/bazel_adb_run.py
tools/bazel_adb_run.py
+15
-14
未找到文件。
mace/test/BUILD
浏览文件 @
e3db01e5
...
...
@@ -4,7 +4,16 @@ package(
licenses
([
"notice"
])
# Apache 2.0
load
(
"//mace:mace.bzl"
,
"if_android"
,
"if_neon_enabled"
,
"if_openmp_enabled"
,
"if_android_armv7"
,
"if_hexagon_enabled"
)
load
(
"//mace:mace.bzl"
,
"if_android"
,
"if_hexagon_enabled"
,
"if_not_hexagon_enabled"
,
"if_openmp_enabled"
,
"if_neon_enabled"
,
"if_opencl_enabled"
,
"if_quantize_enabled"
,
)
cc_library
(
name
=
"mace_api_test_header"
,
...
...
@@ -18,13 +27,22 @@ cc_test(
name
=
"mace_api_test"
,
testonly
=
1
,
srcs
=
[
"mace_api_test.cc"
],
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
]
+
if_openmp_enabled
([
"-fopenmp"
])
+
if_neon_enabled
([
"-DMACE_ENABLE_NEON"
])
+
if_android_armv7
([
"-mfpu=neon"
])
+
if_android_armv7
([
"-mfloat-abi=softfp"
])
+
if_android
([
"-DMACE_ENABLE_OPENCL"
])
+
if_hexagon_enabled
([
"-DMACE_ENABLE_HEXAGON"
]),
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
,
]
+
if_openmp_enabled
([
"-fopenmp"
,
"-DMACE_ENABLE_OPENMP"
,
])
+
if_opencl_enabled
([
"-DMACE_ENABLE_OPENCL"
,
])
+
if_quantize_enabled
([
"-DMACE_ENABLE_QUANTIZE"
,
])
+
if_hexagon_enabled
([
"-DMACE_ENABLE_HEXAGON"
,
])
+
if_neon_enabled
([
"-DMACE_ENABLE_NEON"
,
]),
linkopts
=
[
"-fopenmp"
],
linkstatic
=
1
,
deps
=
[
...
...
@@ -39,13 +57,22 @@ cc_test(
name
=
"mace_api_mt_test"
,
testonly
=
1
,
srcs
=
[
"mace_api_mt_test.cc"
],
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
]
+
if_openmp_enabled
([
"-fopenmp"
])
+
if_neon_enabled
([
"-DMACE_ENABLE_NEON"
])
+
if_android_armv7
([
"-mfpu=neon"
])
+
if_android_armv7
([
"-mfloat-abi=softfp"
])
+
if_android
([
"-DMACE_ENABLE_OPENCL"
])
+
if_hexagon_enabled
([
"-DMACE_ENABLE_HEXAGON"
]),
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
,
]
+
if_openmp_enabled
([
"-fopenmp"
,
"-DMACE_ENABLE_OPENMP"
,
])
+
if_opencl_enabled
([
"-DMACE_ENABLE_OPENCL"
,
])
+
if_quantize_enabled
([
"-DMACE_ENABLE_QUANTIZE"
,
])
+
if_hexagon_enabled
([
"-DMACE_ENABLE_HEXAGON"
,
])
+
if_neon_enabled
([
"-DMACE_ENABLE_NEON"
,
]),
linkopts
=
[
"-fopenmp"
],
linkstatic
=
1
,
deps
=
[
...
...
@@ -60,13 +87,22 @@ cc_test(
name
=
"mace_api_exception_test"
,
testonly
=
1
,
srcs
=
[
"mace_api_exception_test.cc"
],
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
]
+
if_openmp_enabled
([
"-fopenmp"
])
+
if_neon_enabled
([
"-DMACE_ENABLE_NEON"
])
+
if_android_armv7
([
"-mfpu=neon"
])
+
if_android_armv7
([
"-mfloat-abi=softfp"
])
+
if_android
([
"-DMACE_ENABLE_OPENCL"
])
+
if_hexagon_enabled
([
"-DMACE_ENABLE_HEXAGON"
]),
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
,
]
+
if_openmp_enabled
([
"-fopenmp"
,
"-DMACE_ENABLE_OPENMP"
,
])
+
if_opencl_enabled
([
"-DMACE_ENABLE_OPENCL"
,
])
+
if_quantize_enabled
([
"-DMACE_ENABLE_QUANTIZE"
,
])
+
if_hexagon_enabled
([
"-DMACE_ENABLE_HEXAGON"
,
])
+
if_neon_enabled
([
"-DMACE_ENABLE_NEON"
,
]),
linkopts
=
[
"-fopenmp"
],
linkstatic
=
1
,
deps
=
[
...
...
mace/test/mace_api_mt_test.cc
浏览文件 @
e3db01e5
...
...
@@ -33,8 +33,6 @@ void MaceRunFunc(const int in_out_size) {
}
std
::
string
filter_tensor_name
=
"filter"
;
const
DeviceType
device
=
DeviceType
::
GPU
;
const
std
::
vector
<
std
::
vector
<
int64_t
>>
input_shapes
=
{{
1
,
32
,
32
,
16
}};
const
std
::
vector
<
std
::
vector
<
int64_t
>>
output_shapes
=
{{
1
,
32
,
32
,
16
}};
const
std
::
vector
<
int64_t
>
filter_shape
=
{
16
,
16
,
3
,
3
};
...
...
tools/bazel_adb_run.py
浏览文件 @
e3db01e5
...
...
@@ -125,20 +125,6 @@ def parse_args():
def
main
(
unused_args
):
target_socs
=
None
target_devices
=
DeviceManager
.
list_devices
(
FLAGS
.
device_yml
)
if
FLAGS
.
target_socs
!=
"all"
and
FLAGS
.
target_socs
!=
"random"
:
target_socs
=
set
(
FLAGS
.
target_socs
.
split
(
','
))
target_devices
=
[
dev
for
dev
in
target_devices
if
dev
[
YAMLKeyword
.
target_socs
]
in
target_socs
]
if
FLAGS
.
target_socs
==
"random"
:
unlocked_devices
=
\
[
d
for
d
in
target_devices
if
not
sh_commands
.
is_device_locked
(
d
)]
if
len
(
unlocked_devices
)
>
0
:
target_devices
=
[
random
.
choice
(
unlocked_devices
)]
else
:
target_devices
=
[
random
.
choice
(
target_devices
)]
target
=
FLAGS
.
target
host_bin_path
,
bin_name
=
sh_commands
.
bazel_target_to_bin
(
target
)
target_abis
=
FLAGS
.
target_abis
.
split
(
','
)
...
...
@@ -150,6 +136,21 @@ def main(unused_args):
enable_neon
=
FLAGS
.
enable_neon
,
address_sanitizer
=
FLAGS
.
address_sanitizer
)
if
FLAGS
.
run_target
:
target_devices
=
DeviceManager
.
list_devices
(
FLAGS
.
device_yml
)
if
FLAGS
.
target_socs
!=
"all"
and
FLAGS
.
target_socs
!=
"random"
:
target_socs
=
set
(
FLAGS
.
target_socs
.
split
(
','
))
target_devices
=
\
[
dev
for
dev
in
target_devices
if
dev
[
YAMLKeyword
.
target_socs
]
in
target_socs
]
if
FLAGS
.
target_socs
==
"random"
:
unlocked_devices
=
\
[
d
for
d
in
target_devices
if
not
sh_commands
.
is_device_locked
(
d
)]
if
len
(
unlocked_devices
)
>
0
:
target_devices
=
[
random
.
choice
(
unlocked_devices
)]
else
:
target_devices
=
[
random
.
choice
(
target_devices
)]
for
dev
in
target_devices
:
if
target_abi
not
in
dev
[
YAMLKeyword
.
target_abis
]:
print
(
"Skip device %s which does not support ABI %s"
%
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录