diff --git a/mace/core/proto_utils.cc b/mace/core/arg_helper.cc similarity index 99% rename from mace/core/proto_utils.cc rename to mace/core/arg_helper.cc index 064f5b2834bff89e75b6b58f19ef6342af5bbb04..d2230c44ca3247b532854f194b07ea2c071ded6a 100644 --- a/mace/core/proto_utils.cc +++ b/mace/core/arg_helper.cc @@ -2,7 +2,7 @@ // Copyright (c) 2017 XiaoMi All rights reserved. // -#include "mace/core/proto_utils.h" +#include "mace/core/arg_helper.h" namespace mace { diff --git a/mace/core/proto_utils.h b/mace/core/arg_helper.h similarity index 95% rename from mace/core/proto_utils.h rename to mace/core/arg_helper.h index 6ccf98a4e1728df2160bd2dd63d1ea8f2a170af3..a7c66173a98032a5decc8cdf7983b4cd91e0fa4a 100644 --- a/mace/core/proto_utils.h +++ b/mace/core/arg_helper.h @@ -2,8 +2,8 @@ // Copyright (c) 2017 XiaoMi All rights reserved. // -#ifndef MACE_CORE_PROTO_UTILS_H_ -#define MACE_CORE_PROTO_UTILS_H_ +#ifndef MACE_CORE_ARG_HELPER_H_ +#define MACE_CORE_ARG_HELPER_H_ #include @@ -68,4 +68,4 @@ class ArgumentHelper { } // namespace mace -#endif // MACE_CORE_PROTO_UTILS_H_ +#endif // MACE_CORE_ARG_HELPER_H_ diff --git a/mace/core/operator.h b/mace/core/operator.h index e5fc44f077fc4b57fb543085f855b77c3c513f09..ef0cd7bd560fba0a8de62b55d821bb1a812cce26 100644 --- a/mace/core/operator.h +++ b/mace/core/operator.h @@ -6,7 +6,7 @@ #define MACE_CORE_OPERATOR_H #include "mace/core/common.h" -#include "mace/core/proto_utils.h" +#include "mace/core/arg_helper.h" #include "mace/core/registry.h" #include "mace/core/tensor.h" #include "mace/core/workspace.h" diff --git a/mace/core/workspace.cc b/mace/core/workspace.cc index cc575ddda4a58c26af04f3f6544fa012f9ff81f7..b21fcf6db84f065d305b68b28e741d21c5d84b5d 100644 --- a/mace/core/workspace.cc +++ b/mace/core/workspace.cc @@ -4,7 +4,7 @@ #include "mace/core/workspace.h" #include "mace/core/serializer.h" -#include "mace/core/proto_utils.h" +#include "mace/core/arg_helper.h" namespace mace { @@ -69,7 +69,7 @@ void Workspace::LoadModelTensor(const NetDef &net_def, DeviceType type) { } void Workspace::CreateImageOutputTensor(const NetDef &net_def) { - if (net_def.has_mem_arena() || net_def.mem_arena().mem_block_size() == 0) { + if (!net_def.has_mem_arena() || net_def.mem_arena().mem_block_size() == 0) { return; } std::map> mem_tensor_map; diff --git a/mace/proto/BUILD b/mace/proto/BUILD index 593fdea5a7740b445f639977a3ed9d9fcad3e8ff..e166ade2bf1b5d1628b815279bc627d3460beac6 100644 --- a/mace/proto/BUILD +++ b/mace/proto/BUILD @@ -10,16 +10,6 @@ licenses(["notice"]) # Apache 2.0 load("@com_google_protobuf//:protobuf.bzl", "py_proto_library") -proto_library( - name = "proto", - srcs = ["mace.proto"], -) - -cc_proto_library( - name = "cc_proto", - deps = [":proto"], -) - proto_library( name = "stats", srcs = ["stats.proto"],