Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
闹闹不闹!
Mace
提交
7819bebf
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,发现更多精彩内容 >>
提交
7819bebf
编写于
5月 27, 2018
作者:
L
Liangliang He
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor third_party
上级
6751c7be
变更
31
隐藏空白更改
内联
并排
Showing
31 changed file
with
29 addition
and
25 deletion
+29
-25
README.md
README.md
+1
-1
WORKSPACE
WORKSPACE
+5
-5
mace/benchmark/BUILD
mace/benchmark/BUILD
+0
-1
mace/codegen/BUILD
mace/codegen/BUILD
+0
-4
mace/core/BUILD
mace/core/BUILD
+9
-1
mace/core/runtime/hexagon/hexagon_controller.h
mace/core/runtime/hexagon/hexagon_controller.h
+1
-1
mace/core/runtime/hexagon/hexagon_nn_ops.h
mace/core/runtime/hexagon/hexagon_nn_ops.h
+2
-2
mace/python/tools/BUILD
mace/python/tools/BUILD
+1
-1
mace/python/tools/converter_tool/caffe_converter.py
mace/python/tools/converter_tool/caffe_converter.py
+2
-1
mace/utils/tuner.h
mace/utils/tuner.h
+1
-1
third_party/caffe/BUILD
third_party/caffe/BUILD
+0
-0
third_party/caffe/Dockerfile
third_party/caffe/Dockerfile
+0
-0
third_party/caffe/LICENSE
third_party/caffe/LICENSE
+0
-0
third_party/caffe/caffe.proto
third_party/caffe/caffe.proto
+0
-0
third_party/gflags/COPYING.txt
third_party/gflags/COPYING.txt
+0
-0
third_party/googletest/LICENSE
third_party/googletest/LICENSE
+0
-0
third_party/googletest/googletest.BUILD
third_party/googletest/googletest.BUILD
+0
-0
third_party/half/LICENSE.txt
third_party/half/LICENSE.txt
+0
-0
third_party/half/half.BUILD
third_party/half/half.BUILD
+0
-0
third_party/nnlib/BUILD
third_party/nnlib/BUILD
+0
-0
third_party/nnlib/hexagon_nn.h
third_party/nnlib/hexagon_nn.h
+3
-3
third_party/nnlib/libhexagon_controller.so
third_party/nnlib/libhexagon_controller.so
+0
-0
third_party/nnlib/license.txt
third_party/nnlib/license.txt
+0
-0
third_party/nnlib/ops.h
third_party/nnlib/ops.h
+0
-0
third_party/opencl-clhpp/LICENSE.txt
third_party/opencl-clhpp/LICENSE.txt
+0
-0
third_party/opencl-clhpp/opencl-clhpp.BUILD
third_party/opencl-clhpp/opencl-clhpp.BUILD
+0
-0
third_party/opencl-headers/LICENSE
third_party/opencl-headers/LICENSE
+0
-0
third_party/opencl-headers/opencl-headers.BUILD
third_party/opencl-headers/opencl-headers.BUILD
+0
-0
third_party/six/LICENSE
third_party/six/LICENSE
+0
-0
third_party/six/six.BUILD
third_party/six/six.BUILD
+0
-0
tools/sh_commands.py
tools/sh_commands.py
+4
-4
未找到文件。
README.md
浏览文件 @
7819bebf
...
...
@@ -59,7 +59,7 @@ please refer to [the contribution guide](docs/development/contributing.md).
## Acknowledgement
MiAI Compute Engine depends on several open source projects located in
[
third_party
](
mace/
third_party
)
directory. Particularly, we learned a lot from
[
third_party
](
third_party
)
directory. Particularly, we learned a lot from
the following projects during the development:
*
[
Qualcomm Hexagon NN Offload Framework
](
https://source.codeaurora.org/quic/hexagon_nn/nnlib
)
: the Hexagon DSP runtime
depends on this library.
...
...
WORKSPACE
浏览文件 @
7819bebf
...
...
@@ -15,7 +15,7 @@ http_archive(
new_http_archive
(
name
=
"gtest"
,
build_file
=
"
mace/
third_party/googletest/googletest.BUILD"
,
build_file
=
"third_party/googletest/googletest.BUILD"
,
sha256
=
"f3ed3b58511efd272eb074a3a6d6fb79d7c2e6a0e374323d1e6bcbcc1ef141bf"
,
strip_prefix
=
"googletest-release-1.8.0"
,
urls
=
[
...
...
@@ -26,7 +26,7 @@ new_http_archive(
new_http_archive
(
name
=
"opencl_headers"
,
build_file
=
"
mace/
third_party/opencl-headers/opencl-headers.BUILD"
,
build_file
=
"third_party/opencl-headers/opencl-headers.BUILD"
,
sha256
=
"5dc7087680853b5c825360fc04ca26534f4b9f22ac114c4d3a306bfbec3cd0f2"
,
strip_prefix
=
"OpenCL-Headers-master"
,
urls
=
[
...
...
@@ -37,7 +37,7 @@ new_http_archive(
new_http_archive
(
name
=
"opencl_clhpp"
,
build_file
=
"
mace/
third_party/opencl-clhpp/opencl-clhpp.BUILD"
,
build_file
=
"third_party/opencl-clhpp/opencl-clhpp.BUILD"
,
sha256
=
"dab6f1834ec6e3843438cc0f97d63817902aadd04566418c1fcc7fb78987d4e7"
,
strip_prefix
=
"OpenCL-CLHPP-4c6f7d56271727e37fb19a9b47649dd175df2b12"
,
urls
=
[
...
...
@@ -48,7 +48,7 @@ new_http_archive(
new_http_archive
(
name
=
"half"
,
build_file
=
"
mace/
third_party/half/half.BUILD"
,
build_file
=
"third_party/half/half.BUILD"
,
sha256
=
"0f514a1e877932b21dc5edc26a148ddc700b6af2facfed4c030ca72f74d0219e"
,
strip_prefix
=
"half-code-356-trunk"
,
urls
=
[
...
...
@@ -59,7 +59,7 @@ new_http_archive(
new_http_archive
(
name
=
"six_archive"
,
build_file
=
"
mace/
third_party/six/six.BUILD"
,
build_file
=
"third_party/six/six.BUILD"
,
sha256
=
"105f8d68616f8248e24bf0e9372ef04d3cc10104f1980f54d57b2ce73a5ad56a"
,
strip_prefix
=
"six-1.10.0"
,
urls
=
[
...
...
mace/benchmark/BUILD
浏览文件 @
7819bebf
...
...
@@ -15,7 +15,6 @@ cc_library(
name
=
"statistics"
,
srcs
=
[
"statistics.cc"
],
hdrs
=
[
"statistics.h"
],
linkstatic
=
1
,
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
],
deps
=
[
"//mace/kernels"
,
...
...
mace/codegen/BUILD
浏览文件 @
7819bebf
...
...
@@ -9,7 +9,6 @@ cc_library(
name
=
"generated_models"
,
srcs
=
glob
([
"models/*/*.cc"
]),
hdrs
=
glob
([
"models/*/*.h"
]),
linkstatic
=
1
,
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
],
deps
=
[
"//mace/core"
,
...
...
@@ -21,21 +20,18 @@ cc_library(
name
=
"generated_opencl"
,
srcs
=
glob
([
"opencl/*.cc"
]),
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
],
linkstatic
=
1
,
)
cc_library
(
name
=
"generated_tuning_params"
,
srcs
=
[
"tuning/tuning_params.cc"
],
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
],
linkstatic
=
1
,
)
cc_library
(
name
=
"generated_version"
,
srcs
=
[
"version/version.cc"
],
copts
=
[
"-Werror"
,
"-Wextra"
,
"-Wno-missing-field-initializers"
],
linkstatic
=
1
,
)
cc_library
(
...
...
mace/core/BUILD
浏览文件 @
7819bebf
...
...
@@ -75,7 +75,7 @@ cc_library(
])
+
if_not_production_mode
([
"//mace/utils:utils_dev"
,
])
+
if_hexagon_enabled
([
"//
mace/
third_party/nnlib:libhexagon"
,
"//third_party/nnlib:libhexagon"
,
]),
)
...
...
@@ -109,3 +109,11 @@ cc_library(
],
alwayslink
=
1
,
)
cc_binary
(
name
=
"libmace.so"
,
linkshared
=
1
,
deps
=
[
"//mace/core"
,
],
)
mace/core/runtime/hexagon/hexagon_controller.h
浏览文件 @
7819bebf
...
...
@@ -15,7 +15,7 @@
#ifndef MACE_CORE_RUNTIME_HEXAGON_HEXAGON_CONTROLLER_H_
#define MACE_CORE_RUNTIME_HEXAGON_HEXAGON_CONTROLLER_H_
#include "
mace/
third_party/nnlib/hexagon_nn.h"
#include "third_party/nnlib/hexagon_nn.h"
#ifdef __cplusplus
extern
"C"
{
...
...
mace/core/runtime/hexagon/hexagon_nn_ops.h
浏览文件 @
7819bebf
...
...
@@ -27,7 +27,7 @@ namespace mace {
typedef
enum
op_type_enum
{
#define DEF_OP(NAME, ...) OP_##NAME,
#include "
mace/
third_party/nnlib/ops.h" // NOLINT(build/include)
#include "third_party/nnlib/ops.h" // NOLINT(build/include)
NN_OPS_MAX
#undef DEF_OP
...
...
@@ -38,7 +38,7 @@ class OpMap {
void
Init
()
{
#define DEF_OP(NAME) op_map_[#NAME] = OP_##NAME;
#include "
mace/
third_party/nnlib/ops.h" // NOLINT(build/include)
#include "third_party/nnlib/ops.h" // NOLINT(build/include)
#undef DEF_OP
}
...
...
mace/python/tools/BUILD
浏览文件 @
7819bebf
...
...
@@ -15,7 +15,7 @@ py_library(
deps
=
[
":memory_optimizer"
,
"//mace/proto:mace_py"
,
"//
mace/
third_party/caffe:caffe_py"
,
"//third_party/caffe:caffe_py"
,
],
)
...
...
mace/python/tools/converter_tool/caffe_converter.py
浏览文件 @
7819bebf
...
...
@@ -18,7 +18,6 @@ import numpy as np
import
google.protobuf.text_format
from
mace.proto
import
mace_pb2
from
mace.third_party.caffe
import
caffe_pb2
from
mace.python.tools.converter_tool
import
base_converter
from
mace.python.tools.converter_tool
import
shape_inference
from
mace.python.tools.converter_tool.base_converter
import
PoolingType
...
...
@@ -31,6 +30,8 @@ from mace.python.tools.converter_tool.base_converter import MaceKeyword
from
mace.python.tools.converter_tool.base_converter
import
ConverterUtil
from
mace.python.tools.convert_util
import
mace_check
from
third_party.caffe
import
caffe_pb2
caffe_group_str
=
'group'
caffe_kernel_h_str
=
'kernel_h'
caffe_kernel_w_str
=
'kernel_w'
...
...
mace/utils/tuner.h
浏览文件 @
7819bebf
...
...
@@ -140,7 +140,7 @@ class Tuner {
int
num_runs
,
double
*
time_us
,
std
::
vector
<
param_type
>
*
tuning_result
)
{
RetType
res
;
RetType
res
=
0
;
int
iter
=
0
;
int64_t
total_time_us
=
0
;
for
(
iter
=
0
;
iter
<
num_runs
;
++
iter
)
{
...
...
mace/
third_party/caffe/BUILD
→
third_party/caffe/BUILD
浏览文件 @
7819bebf
文件已移动
mace/
third_party/caffe/Dockerfile
→
third_party/caffe/Dockerfile
浏览文件 @
7819bebf
文件已移动
mace/
third_party/caffe/LICENSE
→
third_party/caffe/LICENSE
浏览文件 @
7819bebf
文件已移动
mace/
third_party/caffe/caffe.proto
→
third_party/caffe/caffe.proto
浏览文件 @
7819bebf
文件已移动
mace/
third_party/gflags/COPYING.txt
→
third_party/gflags/COPYING.txt
浏览文件 @
7819bebf
文件已移动
mace/
third_party/googletest/LICENSE
→
third_party/googletest/LICENSE
浏览文件 @
7819bebf
文件已移动
mace/
third_party/googletest/googletest.BUILD
→
third_party/googletest/googletest.BUILD
浏览文件 @
7819bebf
文件已移动
mace/
third_party/half/LICENSE.txt
→
third_party/half/LICENSE.txt
浏览文件 @
7819bebf
文件已移动
mace/
third_party/half/half.BUILD
→
third_party/half/half.BUILD
浏览文件 @
7819bebf
文件已移动
mace/
third_party/nnlib/BUILD
→
third_party/nnlib/BUILD
浏览文件 @
7819bebf
文件已移动
mace/
third_party/nnlib/hexagon_nn.h
→
third_party/nnlib/hexagon_nn.h
浏览文件 @
7819bebf
...
...
@@ -33,8 +33,8 @@
*
*/
#ifndef
MACE_
THIRD_PARTY_NNLIB_HEXAGON_NN_H_
#define
MACE_
THIRD_PARTY_NNLIB_HEXAGON_NN_H_
#ifndef THIRD_PARTY_NNLIB_HEXAGON_NN_H_
#define THIRD_PARTY_NNLIB_HEXAGON_NN_H_
#ifndef __QAIC_HEADER
#define __QAIC_HEADER(ff) ff
#endif // __QAIC_HEADER
...
...
@@ -221,4 +221,4 @@ __QAIC_HEADER_EXPORT int __QAIC_HEADER(hexagon_nn_execute_new)(
#ifdef __cplusplus
}
#endif
#endif //
MACE_
THIRD_PARTY_NNLIB_HEXAGON_NN_H_
#endif // THIRD_PARTY_NNLIB_HEXAGON_NN_H_
mace/
third_party/nnlib/libhexagon_controller.so
→
third_party/nnlib/libhexagon_controller.so
浏览文件 @
7819bebf
文件已移动
mace/
third_party/nnlib/license.txt
→
third_party/nnlib/license.txt
浏览文件 @
7819bebf
文件已移动
mace/
third_party/nnlib/ops.h
→
third_party/nnlib/ops.h
浏览文件 @
7819bebf
文件已移动
mace/
third_party/opencl-clhpp/LICENSE.txt
→
third_party/opencl-clhpp/LICENSE.txt
浏览文件 @
7819bebf
文件已移动
mace/
third_party/opencl-clhpp/opencl-clhpp.BUILD
→
third_party/opencl-clhpp/opencl-clhpp.BUILD
浏览文件 @
7819bebf
文件已移动
mace/
third_party/opencl-headers/LICENSE
→
third_party/opencl-headers/LICENSE
浏览文件 @
7819bebf
文件已移动
mace/
third_party/opencl-headers/opencl-headers.BUILD
→
third_party/opencl-headers/opencl-headers.BUILD
浏览文件 @
7819bebf
文件已移动
mace/
third_party/six/LICENSE
→
third_party/six/LICENSE
浏览文件 @
7819bebf
文件已移动
mace/
third_party/six/six.BUILD
→
third_party/six/six.BUILD
浏览文件 @
7819bebf
文件已移动
tools/sh_commands.py
浏览文件 @
7819bebf
...
...
@@ -657,7 +657,7 @@ def tuning_run(abi,
if
not
embed_model_data
:
adb_push
(
"%s/%s.data"
%
(
model_output_dir
,
model_tag
),
phone_data_dir
,
serialno
)
adb_push
(
"
mace/third_party/
nnlib/libhexagon_controller.so"
,
adb_push
(
"nnlib/libhexagon_controller.so"
,
phone_data_dir
,
serialno
)
if
mace_model_dir
:
...
...
@@ -772,7 +772,7 @@ def validate_model(abi,
if
not
docker_image_id
:
print
(
"Build caffe docker"
)
sh
.
docker
(
"build"
,
"-t"
,
image_name
,
"
mace/
third_party/caffe"
)
"third_party/caffe"
)
container_id
=
sh
.
docker
(
"ps"
,
"-qa"
,
"-f"
,
"name=%s"
%
container_name
)
...
...
@@ -866,7 +866,7 @@ def merge_libs(target_soc,
project_output_dir
=
"%s/%s"
%
(
libmace_output_dir
,
project_name
)
model_header_dir
=
"%s/include/mace/public"
%
project_output_dir
model_data_dir
=
"%s/data"
%
project_output_dir
hexagon_lib_file
=
"
mace/
third_party/nnlib/libhexagon_controller.so"
hexagon_lib_file
=
"third_party/nnlib/libhexagon_controller.so"
model_bin_dir
=
"%s/%s/"
%
(
project_output_dir
,
abi
)
if
not
os
.
path
.
exists
(
model_bin_dir
):
...
...
@@ -1197,7 +1197,7 @@ def build_run_throughput_test(abi,
adb_push
(
"codegen/models/%s/%s.data"
%
dsp_model_tag
,
phone_data_dir
,
serialno
)
adb_push
(
"
mace/
third_party/nnlib/libhexagon_controller.so"
,
adb_push
(
"third_party/nnlib/libhexagon_controller.so"
,
phone_data_dir
,
serialno
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录