Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Xiaomi
Mace
提交
e935a0b5
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,发现更多精彩内容 >>
提交
e935a0b5
编写于
7月 19, 2018
作者:
L
liuqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix bug: host dynamic library not work.
上级
5865fbca
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
25 addition
and
18 deletion
+25
-18
mace/benchmark/BUILD
mace/benchmark/BUILD
+10
-2
mace/examples/cli/BUILD
mace/examples/cli/BUILD
+1
-1
mace/libmace/BUILD
mace/libmace/BUILD
+1
-1
mace/tools/validation/BUILD
mace/tools/validation/BUILD
+10
-2
tools/sh_commands.py
tools/sh_commands.py
+3
-12
未找到文件。
mace/benchmark/BUILD
浏览文件 @
e935a0b5
...
...
@@ -51,8 +51,16 @@ cc_binary(
"-Wextra"
,
"-Wno-missing-field-initializers"
,
]
+
if_android
([
"-DMACE_ENABLE_OPENCL"
]),
linkopts
=
[
"-lm"
,
"-pie"
,
"-fPIE"
]
+
if_openmp_enabled
([
"-fopenmp"
]),
linkstatic
=
0
,
linkopts
=
[
"-lm"
,
]
+
if_openmp_enabled
([
"-fopenmp"
])
+
if_android
([
"-ldl"
,
"-pie"
,
"-llog"
,
]),
linkstatic
=
1
,
deps
=
[
":statistics"
,
"//external:gflags_nothreads"
,
...
...
mace/examples/cli/BUILD
浏览文件 @
e935a0b5
...
...
@@ -54,7 +54,7 @@ cc_binary(
"-pie"
,
"-llog"
,
]),
linkstatic
=
0
,
linkstatic
=
1
,
deps
=
[
"//external:gflags_nothreads"
,
"//mace/codegen:generated_mace_engine_factory"
,
...
...
mace/libmace/BUILD
浏览文件 @
e935a0b5
...
...
@@ -51,7 +51,7 @@ cc_binary(
"mace_version_script.lds"
,
],
linkshared
=
1
,
linkstatic
=
0
,
linkstatic
=
1
,
deps
=
[
":mace_version_script.lds"
,
"//mace/libmace"
,
...
...
mace/tools/validation/BUILD
浏览文件 @
e935a0b5
...
...
@@ -29,8 +29,16 @@ cc_binary(
]
+
if_opencl_enabled
([
"-DMACE_ENABLE_OPENCL"
,
]),
linkopts
=
[
"-lm"
,
"-pie"
,
"-fPIE"
]
+
if_openmp_enabled
([
"-fopenmp"
]),
linkstatic
=
0
,
linkopts
=
[
"-lm"
,
]
+
if_openmp_enabled
([
"-fopenmp"
])
+
if_android
([
"-ldl"
,
"-pie"
,
"-llog"
,
]),
linkstatic
=
1
,
deps
=
[
"//external:gflags_nothreads"
,
"//mace/codegen:generated_mace_engine_factory"
,
...
...
tools/sh_commands.py
浏览文件 @
e935a0b5
...
...
@@ -269,12 +269,6 @@ def find_asan_rt_library(abi, asan_rt_path=''):
return
"%s/%s"
%
(
asan_rt_path
,
asan_rt_library_names
(
abi
))
def
find_gnustl_shared_path
(
abi
):
return
\
"%s/sources/cxx-stl/gnu-libstdc++/4.9/libs/%s/libgnustl_shared.so"
%
\
(
os
.
environ
[
"ANDROID_NDK_HOME"
],
abi
)
################################
# bazel commands
################################
...
...
@@ -640,9 +634,12 @@ def tuning_run(abi,
if
model_graph_format
==
ModelFormat
.
file
:
mace_model_path
=
"%s/%s.pb"
%
(
mace_model_dir
,
model_tag
)
if
abi
==
"host"
:
libmace_dynamic_lib_path
=
\
os
.
path
.
dirname
(
libmace_dynamic_library_path
)
p
=
subprocess
.
Popen
(
[
"env"
,
"LD_LIBRARY_PATH=%s"
%
libmace_dynamic_lib_path
,
"MACE_CPP_MIN_VLOG_LEVEL=%s"
%
vlog_level
,
"MACE_RUNTIME_FAILURE_RATIO=%f"
%
runtime_failure_ratio
,
"%s/%s"
%
(
target_dir
,
target_name
),
...
...
@@ -705,9 +702,6 @@ def tuning_run(abi,
if
link_dynamic
:
adb_push
(
libmace_dynamic_library_path
,
phone_data_dir
,
serialno
)
adb_push
(
find_gnustl_shared_path
(
abi
),
phone_data_dir
,
serialno
)
adb_push
(
"%s/%s"
%
(
target_dir
,
target_name
),
phone_data_dir
,
serialno
)
...
...
@@ -1018,9 +1012,6 @@ def benchmark_model(abi,
if
link_dynamic
:
adb_push
(
libmace_dynamic_library_path
,
phone_data_dir
,
serialno
)
adb_push
(
find_gnustl_shared_path
(
abi
),
phone_data_dir
,
serialno
)
adb_push
(
"%s/%s"
%
(
benchmark_binary_dir
,
benchmark_binary_name
),
phone_data_dir
,
serialno
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录