Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
Mace
提交
6d2443a2
Mace
项目概览
慢慢CG
/
Mace
与 Fork 源项目一致
Fork自
Xiaomi / Mace
通知
1
Star
0
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看板
提交
6d2443a2
编写于
6月 14, 2018
作者:
Y
yejianwu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove unneeded dynamic library
上级
56905f82
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
27 addition
and
25 deletion
+27
-25
WORKSPACE
WORKSPACE
+2
-2
dynamic_lib/arm64-v8a/libgnustl_shared.so
dynamic_lib/arm64-v8a/libgnustl_shared.so
+0
-0
dynamic_lib/armeabi-v7a/libgnustl_shared.so
dynamic_lib/armeabi-v7a/libgnustl_shared.so
+0
-0
mace/benchmark/BUILD
mace/benchmark/BUILD
+2
-2
mace/tools/validation/libmace.BUILD
mace/tools/validation/libmace.BUILD
+1
-1
tools/sh_commands.py
tools/sh_commands.py
+22
-20
未找到文件。
WORKSPACE
浏览文件 @
6d2443a2
...
@@ -126,6 +126,6 @@ android_ndk_repository(
...
@@ -126,6 +126,6 @@ android_ndk_repository(
new_local_repository
(
new_local_repository
(
name
=
"libmace"
,
name
=
"libmace"
,
path
=
"./
dynamic_lib/
"
,
path
=
"./"
,
build_file
=
"./
dynamic_lib
/libmace.BUILD"
build_file
=
"./
mace/tools/validation
/libmace.BUILD"
)
)
dynamic_lib/arm64-v8a/libgnustl_shared.so
已删除
100755 → 0
浏览文件 @
56905f82
文件已删除
dynamic_lib/armeabi-v7a/libgnustl_shared.so
已删除
100755 → 0
浏览文件 @
56905f82
文件已删除
mace/benchmark/BUILD
浏览文件 @
6d2443a2
...
@@ -20,7 +20,7 @@ cc_library(
...
@@ -20,7 +20,7 @@ cc_library(
)
)
cc_binary
(
cc_binary
(
name
=
"benchmark_model"
,
name
=
"benchmark_model
_static
"
,
srcs
=
[
srcs
=
[
"benchmark_model.cc"
,
"benchmark_model.cc"
,
],
],
...
@@ -40,7 +40,7 @@ cc_binary(
...
@@ -40,7 +40,7 @@ cc_binary(
)
)
cc_binary
(
cc_binary
(
name
=
"benchmark_model_
deps_so
"
,
name
=
"benchmark_model_
shared
"
,
srcs
=
[
srcs
=
[
"benchmark_model.cc"
,
"benchmark_model.cc"
,
],
],
...
...
dynamic_lib
/libmace.BUILD
→
mace/tools/validation
/libmace.BUILD
浏览文件 @
6d2443a2
cc_library(
cc_library(
name = "libmace",
name = "libmace",
srcs = ["libmace.so"],
srcs = ["
bazel-bin/mace/
libmace.so"],
visibility = ["//visibility:public"],
visibility = ["//visibility:public"],
)
)
tools/sh_commands.py
浏览文件 @
6d2443a2
...
@@ -597,7 +597,6 @@ def update_libmace_shared_library(serial_num,
...
@@ -597,7 +597,6 @@ def update_libmace_shared_library(serial_num,
build_output_dir
,
build_output_dir
,
library_output_dir
):
library_output_dir
):
libmace_name
=
"libmace.so"
libmace_name
=
"libmace.so"
mace_library_dir
=
"./dynamic_lib/"
library_dir
=
"%s/%s/%s/%s"
%
(
library_dir
=
"%s/%s/%s/%s"
%
(
build_output_dir
,
project_name
,
library_output_dir
,
abi
)
build_output_dir
,
project_name
,
library_output_dir
,
abi
)
libmace_file
=
"%s/%s"
%
(
library_dir
,
libmace_name
)
libmace_file
=
"%s/%s"
%
(
library_dir
,
libmace_name
)
...
@@ -606,14 +605,11 @@ def update_libmace_shared_library(serial_num,
...
@@ -606,14 +605,11 @@ def update_libmace_shared_library(serial_num,
sh
.
rm
(
"-rf"
,
library_dir
)
sh
.
rm
(
"-rf"
,
library_dir
)
sh
.
mkdir
(
"-p"
,
library_dir
)
sh
.
mkdir
(
"-p"
,
library_dir
)
sh
.
cp
(
"-f"
,
"bazel-bin/mace/libmace.so"
,
library_dir
)
sh
.
cp
(
"-f"
,
"bazel-bin/mace/libmace.so"
,
library_dir
)
sh
.
cp
(
"-f"
,
"%s/%s/libgnustl_shared.so"
%
(
mace_library_dir
,
abi
),
sh
.
cp
(
"-f"
,
"%s/sources/cxx-stl/gnu-libstdc++/4.9/libs/%s/libgnustl_shared.so"
%
(
os
.
environ
[
"ANDROID_NDK"
],
abi
),
library_dir
)
library_dir
)
libmace_load_path
=
"%s/%s"
%
(
mace_library_dir
,
libmace_name
)
if
os
.
path
.
exists
(
libmace_load_path
):
sh
.
rm
(
"-f"
,
libmace_load_path
)
sh
.
cp
(
"-f"
,
"bazel-bin/mace/libmace.so"
,
mace_library_dir
)
def
tuning_run
(
abi
,
def
tuning_run
(
abi
,
serialno
,
serialno
,
...
@@ -1049,23 +1045,23 @@ def build_benchmark_model(abi,
...
@@ -1049,23 +1045,23 @@ def build_benchmark_model(abi,
model_output_dir
,
model_output_dir
,
hexagon_mode
,
hexagon_mode
,
linkshared
=
False
):
linkshared
=
False
):
benchmark_binary_file
=
"%s/benchmark_model"
%
model_output_dir
if
os
.
path
.
exists
(
benchmark_binary_file
):
sh
.
rm
(
"-rf"
,
benchmark_binary_file
)
if
linkshared
==
0
:
if
linkshared
==
0
:
benchmark_target
=
"//mace/benchmark:benchmark_model
"
target_name
=
"benchmark_model_static
"
else
:
else
:
benchmark_target
=
"//mace/benchmark:benchmark_model_deps_so"
target_name
=
"benchmark_model_shared"
benchmark_target
=
"//mace/benchmark:benchmark_model_shared"
benchmark_target
=
"//mace/benchmark:%s"
%
target_name
bazel_build
(
benchmark_target
,
bazel_build
(
benchmark_target
,
abi
=
abi
,
abi
=
abi
,
hexagon_mode
=
hexagon_mode
)
hexagon_mode
=
hexagon_mode
)
benchmark_binary_file
=
"%s/%s"
%
(
model_output_dir
,
target_name
)
if
os
.
path
.
exists
(
benchmark_binary_file
):
sh
.
rm
(
"-rf"
,
benchmark_binary_file
)
target_bin
=
"/"
.
join
(
bazel_target_to_bin
(
benchmark_target
))
target_bin
=
"/"
.
join
(
bazel_target_to_bin
(
benchmark_target
))
if
linkshared
==
0
:
sh
.
cp
(
"-f"
,
target_bin
,
model_output_dir
)
sh
.
cp
(
"-f"
,
target_bin
,
model_output_dir
)
else
:
sh
.
cp
(
"-f"
,
target_bin
,
"%s/benchmark_model"
%
model_output_dir
)
def
benchmark_model
(
abi
,
def
benchmark_model
(
abi
,
...
@@ -1093,6 +1089,11 @@ def benchmark_model(abi,
...
@@ -1093,6 +1089,11 @@ def benchmark_model(abi,
linkshared
=
0
):
linkshared
=
0
):
print
(
"* Benchmark for %s"
%
model_tag
)
print
(
"* Benchmark for %s"
%
model_tag
)
if
linkshared
==
0
:
benchmark_model_target
=
"benchmark_model_static"
else
:
benchmark_model_target
=
"benchmark_model_shared"
mace_model_path
=
""
mace_model_path
=
""
if
build_type
==
BuildType
.
proto
:
if
build_type
==
BuildType
.
proto
:
mace_model_path
=
"%s/%s.pb"
%
(
mace_model_dir
,
model_tag
)
mace_model_path
=
"%s/%s.pb"
%
(
mace_model_dir
,
model_tag
)
...
@@ -1101,7 +1102,7 @@ def benchmark_model(abi,
...
@@ -1101,7 +1102,7 @@ def benchmark_model(abi,
[
[
"env"
,
"env"
,
"MACE_CPP_MIN_VLOG_LEVEL=%s"
%
vlog_level
,
"MACE_CPP_MIN_VLOG_LEVEL=%s"
%
vlog_level
,
"%s/
benchmark_model"
%
benchmark_binary_dir
,
"%s/
%s"
%
(
benchmark_binary_dir
,
benchmark_model_target
)
,
"--model_name=%s"
%
model_tag
,
"--model_name=%s"
%
model_tag
,
"--input_node=%s"
%
","
.
join
(
input_nodes
),
"--input_node=%s"
%
","
.
join
(
input_nodes
),
"--output_node=%s"
%
","
.
join
(
output_nodes
),
"--output_node=%s"
%
","
.
join
(
output_nodes
),
...
@@ -1146,7 +1147,8 @@ def benchmark_model(abi,
...
@@ -1146,7 +1147,8 @@ def benchmark_model(abi,
adb_push
(
"%s/libgnustl_shared.so"
%
shared_library_dir
,
adb_push
(
"%s/libgnustl_shared.so"
%
shared_library_dir
,
phone_data_dir
,
phone_data_dir
,
serialno
)
serialno
)
adb_push
(
"%s/benchmark_model"
%
benchmark_binary_dir
,
phone_data_dir
,
adb_push
(
"%s/%s"
%
(
benchmark_binary_dir
,
benchmark_model_target
),
phone_data_dir
,
serialno
)
serialno
)
sh
.
adb
(
sh
.
adb
(
...
@@ -1159,7 +1161,7 @@ def benchmark_model(abi,
...
@@ -1159,7 +1161,7 @@ def benchmark_model(abi,
phone_data_dir
,
phone_data_dir
,
"MACE_INTERNAL_STORAGE_PATH=%s"
%
internal_storage_dir
,
"MACE_INTERNAL_STORAGE_PATH=%s"
%
internal_storage_dir
,
"MACE_OPENCL_PROFILING=1"
,
"MACE_OPENCL_PROFILING=1"
,
"%s/
benchmark_model"
%
phone_data_dir
,
"%s/
%s"
%
(
phone_data_dir
,
benchmark_model_target
)
,
"--model_name=%s"
%
model_tag
,
"--model_name=%s"
%
model_tag
,
"--input_node=%s"
%
","
.
join
(
input_nodes
),
"--input_node=%s"
%
","
.
join
(
input_nodes
),
"--output_node=%s"
%
","
.
join
(
output_nodes
),
"--output_node=%s"
%
","
.
join
(
output_nodes
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录