提交 0babd61a 编写于 作者: 刘琦

Merge branch 'rename_third_party' into 'master'

mv third_party to top level

See merge request !532
......@@ -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.
......
......@@ -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 = [
......
......@@ -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",
......
......@@ -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(
......
......@@ -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",
],
)
......@@ -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" {
......
......@@ -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
}
......
......@@ -15,7 +15,7 @@ py_library(
deps = [
":memory_optimizer",
"//mace/proto:mace_py",
"//mace/third_party/caffe:caffe_py",
"//third_party/caffe:caffe_py",
],
)
......
......@@ -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'
......
......@@ -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) {
......
......@@ -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_
......@@ -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.
先完成此消息的编辑!
想要评论请 注册