From 851ed315c891c5286e85bb669f2d0b3aceababf4 Mon Sep 17 00:00:00 2001 From: wjm Date: Mon, 22 Feb 2021 16:45:24 +0800 Subject: [PATCH 1/8] provide interface for atc --- ge/common/helper/model_helper.cc | 96 +++++++++++++++++++++++++++++++ ge/graph/optimize/common/params.h | 2 +- ge/init/gelib.cc | 18 ++++++ inc/framework/omg/ge_init.h | 36 ++++++++++++ inc/framework/omg/model_tool.h | 35 +++++++++++ 5 files changed, 186 insertions(+), 1 deletion(-) mode change 100755 => 100644 ge/init/gelib.cc create mode 100644 inc/framework/omg/ge_init.h create mode 100644 inc/framework/omg/model_tool.h diff --git a/ge/common/helper/model_helper.cc b/ge/common/helper/model_helper.cc index 7de7d8e0..e09aafd1 100644 --- a/ge/common/helper/model_helper.cc +++ b/ge/common/helper/model_helper.cc @@ -21,6 +21,7 @@ #include "framework/common/debug/log.h" #include "framework/common/util.h" #include "framework/common/debug/ge_log.h" +#include "framework/omg/model_tool.h" #include "framework/omg/version.h" #include "graph/debug/ge_attr_define.h" #include "graph/load/model_manager/davinci_model_parser.h" @@ -879,4 +880,99 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::GetModelNam GE_CHK_BOOL_EXEC_WARN(!model_name.empty(), return FAILED, "Get model_name failed, check params --output"); return SUCCESS; } + +FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoFromOm(const char *model_file, + ge::proto::ModelDef &model_def, + uint32_t &modeldef_size) { + GE_CHECK_NOTNULL(model_file); + ge::ModelData model; + int32_t priority = 0; + + Status ret = ModelParserBase::LoadFromFile(model_file, "", priority, model); + if (ret != SUCCESS) { + GELOGE(ret, "LoadFromFile failed."); + return ret; + } + std::function< void() > callback = [&]() { + if (model.model_data != nullptr) { + delete[] reinterpret_cast(model.model_data); + model.model_data = nullptr; + } + }; + + uint8_t *model_data = nullptr; + uint32_t model_len = 0; + ret = ModelParserBase::ParseModelContent(model, model_data, model_len); + if (ret != SUCCESS) { + ErrorManager::GetInstance().ATCReportErrMessage("E10003", + {"parameter", "value", "reason"}, {"om", model_file, "invalid om file"}); + GELOGE(ACL_ERROR_GE_PARAM_INVALID, + "ParseModelContent failed because of invalid om file. Please check --om param."); + return ret; + } + + OmFileLoadHelper omFileLoadHelper; + ret = omFileLoadHelper.Init(model_data, model_len); + if (ret != ge::GRAPH_SUCCESS) { + ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"Om file init failed"}); + GELOGE(ge::FAILED, "Om file init failed."); + return ret; + } + + ModelPartition ir_part; + ret = omFileLoadHelper.GetModelPartition(MODEL_DEF, ir_part); + if (ret != ge::GRAPH_SUCCESS) { + ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"Get model part failed"}); + GELOGE(ge::FAILED, "Get model part failed."); + return ret; + } + + bool flag = ReadProtoFromArray(ir_part.data, ir_part.size, &model_def); + if (!flag) { + ret = INTERNAL_ERROR; + ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"ReadProtoFromArray failed"}); + GELOGE(ret, "ReadProtoFromArray failed."); + return ret; + } + modeldef_size = ir_part.size; + return ret; +} + +FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoFromPbtxt(const char *model_file, + ge::proto::ModelDef &model_def) { + GE_CHECK_NOTNULL(model_file); + ge::ModelData model; + int32_t priority = 0; + + Status ret = ModelParserBase::LoadFromFile(model_file, "", priority, model); + auto free_model_data = [](void **ptr) -> void { + if (ptr != nullptr && *ptr != nullptr) { + delete[] reinterpret_cast(*ptr); + *ptr = nullptr; + } + }; + if (ret != SUCCESS) { + free_model_data(&model.model_data); + GELOGE(ret, "LoadFromFile failed."); + return ret; + } + + try { + bool flag = google::protobuf::TextFormat::ParseFromString(reinterpret_cast(model.model_data), &model_def); + if (!flag) { + free_model_data(&model.model_data); + ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"ParseFromString failed"}); + GELOGE(FAILED, "ParseFromString failed."); + return FAILED; + } + free_model_data(&model.model_data); + return SUCCESS; + } catch (google::protobuf::FatalException &e) { + free_model_data(&model.model_data); + ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"ParseFromString failed, exception message[" + + std::string(e.what()) + "]"}); + GELOGE(FAILED, "ParseFromString failed. exception message : %s", e.what()); + return FAILED; + } +} } // namespace ge diff --git a/ge/graph/optimize/common/params.h b/ge/graph/optimize/common/params.h index c174a4d1..d5b66b8f 100644 --- a/ge/graph/optimize/common/params.h +++ b/ge/graph/optimize/common/params.h @@ -55,7 +55,7 @@ class Params : public Singleton { Params() : target_("MINI") {} string target_; - uint8_t target_8bit_ = 0; + uint8_t target_8bit_ = TARGET_TYPE_MINI_8BIT; }; } // namespace ge diff --git a/ge/init/gelib.cc b/ge/init/gelib.cc old mode 100755 new mode 100644 index faa06962..a0014018 --- a/ge/init/gelib.cc +++ b/ge/init/gelib.cc @@ -31,6 +31,7 @@ #include "framework/common/debug/ge_log.h" #include "framework/common/debug/log.h" #include "framework/common/util.h" +#include "framework/omg/ge_init.h" #include "analyzer/analyzer.h" #include "ge/ge_api_types.h" #include "ge_local_engine/engine/host_cpu_engine.h" @@ -531,4 +532,21 @@ void GELib::RollbackInit() { HostMemManager::Instance().Finalize(); VarManagerPool::Instance().Destory(); } + +Status GEInit::Initialize(const map &options) { + Status ret = SUCCESS; + std::shared_ptr instance_ptr = ge::GELib::GetInstance(); + if (instance_ptr == nullptr || !instance_ptr->InitFlag()) { + ret = GELib::Initialize(options); + } + return ret; +} + +Status GEInit::Finalize() { + return GELib::GetInstance()->Finalize(); +} + +string GEInit::GetPath() { + return GELib::GetPath(); +} } // namespace ge diff --git a/inc/framework/omg/ge_init.h b/inc/framework/omg/ge_init.h new file mode 100644 index 00000000..42fd8979 --- /dev/null +++ b/inc/framework/omg/ge_init.h @@ -0,0 +1,36 @@ +/** + * Copyright 2020 Huawei Technologies Co., Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INC_FRAMEWORK_OMG_GE_INIT_H_ +#define INC_FRAMEWORK_OMG_GE_INIT_H_ +#include +#include +#include "common/ge_inner_error_codes.h" + +namespace ge { +class GE_FUNC_VISIBILITY GEInit { + public: + // GE Environment Initialize, return Status: SUCCESS,FAILED + static Status Initialize(const std::map &options); + + static std::string GetPath(); + + // GE Environment Finalize, return Status: SUCCESS,FAILED + static Status Finalize(); +}; +} // namespace ge + +#endif // INC_FRAMEWORK_OMG_GE_INIT_H_ diff --git a/inc/framework/omg/model_tool.h b/inc/framework/omg/model_tool.h new file mode 100644 index 00000000..8c425823 --- /dev/null +++ b/inc/framework/omg/model_tool.h @@ -0,0 +1,35 @@ +/** + * Copyright 2019-2020 Huawei Technologies Co., Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INC_FRAMEWORK_OMG_MODEL_TOOL_H_ +#define INC_FRAMEWORK_OMG_MODEL_TOOL_H_ + +#include +#include + +#include "framework/common/debug/ge_log.h" +#include "proto/ge_ir.pb.h" + +namespace ge { +class GE_FUNC_VISIBILITY ModelTool { + public: + static Status GetModelInfoFromOm(const char *model_file, ge::proto::ModelDef &model_def, uint32_t &modeldef_size); + + static Status GetModelInfoFromPbtxt(const char *model_file, ge::proto::ModelDef &model_def); +}; +} // namespace ge + +#endif // INC_FRAMEWORK_OMG_MODEL_TOOL_H_ From 8b5804a4bf24b087606384242e4844b530fd4d5e Mon Sep 17 00:00:00 2001 From: wjm Date: Wed, 24 Feb 2021 20:15:18 +0800 Subject: [PATCH 2/8] fix ut --- ge/common/helper/model_helper.cc | 4 ++-- ge/init/gelib.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ge/common/helper/model_helper.cc b/ge/common/helper/model_helper.cc index e09aafd1..a18183c1 100644 --- a/ge/common/helper/model_helper.cc +++ b/ge/common/helper/model_helper.cc @@ -881,7 +881,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::GetModelNam return SUCCESS; } -FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoFromOm(const char *model_file, +/*FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoFromOm(const char *model_file, ge::proto::ModelDef &model_def, uint32_t &modeldef_size) { GE_CHECK_NOTNULL(model_file); @@ -974,5 +974,5 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoF GELOGE(FAILED, "ParseFromString failed. exception message : %s", e.what()); return FAILED; } -} +}*/ } // namespace ge diff --git a/ge/init/gelib.cc b/ge/init/gelib.cc index a0014018..1463f25e 100644 --- a/ge/init/gelib.cc +++ b/ge/init/gelib.cc @@ -533,7 +533,7 @@ void GELib::RollbackInit() { VarManagerPool::Instance().Destory(); } -Status GEInit::Initialize(const map &options) { +/*Status GEInit::Initialize(const map &options) { Status ret = SUCCESS; std::shared_ptr instance_ptr = ge::GELib::GetInstance(); if (instance_ptr == nullptr || !instance_ptr->InitFlag()) { @@ -548,5 +548,5 @@ Status GEInit::Finalize() { string GEInit::GetPath() { return GELib::GetPath(); -} +}*/ } // namespace ge From 35f3641d131c39757716511b57f7e10475b4773f Mon Sep 17 00:00:00 2001 From: wjm Date: Fri, 26 Feb 2021 01:33:33 +0800 Subject: [PATCH 3/8] fix --- ge/common/helper/model_helper.cc | 16 +++++++------- ge/init/gelib.cc | 9 +++++--- tests/depends/mmpa/src/mmpa_stub.cc | 7 ++++++- .../ut/ge/graph/load/model_helper_unittest.cc | 21 ++++++++++++++++++- 4 files changed, 40 insertions(+), 13 deletions(-) diff --git a/ge/common/helper/model_helper.cc b/ge/common/helper/model_helper.cc index a18183c1..f57d7b67 100644 --- a/ge/common/helper/model_helper.cc +++ b/ge/common/helper/model_helper.cc @@ -881,13 +881,12 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::GetModelNam return SUCCESS; } -/*FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoFromOm(const char *model_file, +FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoFromOm(const char *model_file, ge::proto::ModelDef &model_def, uint32_t &modeldef_size) { GE_CHECK_NOTNULL(model_file); ge::ModelData model; int32_t priority = 0; - Status ret = ModelParserBase::LoadFromFile(model_file, "", priority, model); if (ret != SUCCESS) { GELOGE(ret, "LoadFromFile failed."); @@ -899,6 +898,7 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::GetModelNam model.model_data = nullptr; } }; + GE_MAKE_GUARD(release, callback); uint8_t *model_data = nullptr; uint32_t model_len = 0; @@ -911,17 +911,17 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::GetModelNam return ret; } - OmFileLoadHelper omFileLoadHelper; - ret = omFileLoadHelper.Init(model_data, model_len); - if (ret != ge::GRAPH_SUCCESS) { + OmFileLoadHelper om_load_helper; + ret = om_load_helper.Init(model_data, model_len); + if (ret != SUCCESS) { ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"Om file init failed"}); GELOGE(ge::FAILED, "Om file init failed."); return ret; } ModelPartition ir_part; - ret = omFileLoadHelper.GetModelPartition(MODEL_DEF, ir_part); - if (ret != ge::GRAPH_SUCCESS) { + ret = om_load_helper.GetModelPartition(MODEL_DEF, ir_part); + if (ret != SUCCESS) { ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"Get model part failed"}); GELOGE(ge::FAILED, "Get model part failed."); return ret; @@ -974,5 +974,5 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoF GELOGE(FAILED, "ParseFromString failed. exception message : %s", e.what()); return FAILED; } -}*/ +} } // namespace ge diff --git a/ge/init/gelib.cc b/ge/init/gelib.cc index 1463f25e..19085c19 100644 --- a/ge/init/gelib.cc +++ b/ge/init/gelib.cc @@ -533,7 +533,7 @@ void GELib::RollbackInit() { VarManagerPool::Instance().Destory(); } -/*Status GEInit::Initialize(const map &options) { +Status GEInit::Initialize(const map &options) { Status ret = SUCCESS; std::shared_ptr instance_ptr = ge::GELib::GetInstance(); if (instance_ptr == nullptr || !instance_ptr->InitFlag()) { @@ -543,10 +543,13 @@ void GELib::RollbackInit() { } Status GEInit::Finalize() { - return GELib::GetInstance()->Finalize(); + std::shared_ptr instance_ptr = ge::GELib::GetInstance(); + if (instance_ptr != nullptr) { + return instance_ptr->Finalize(); + } } string GEInit::GetPath() { return GELib::GetPath(); -}*/ +} } // namespace ge diff --git a/tests/depends/mmpa/src/mmpa_stub.cc b/tests/depends/mmpa/src/mmpa_stub.cc index de09c52c..d3184bc1 100644 --- a/tests/depends/mmpa/src/mmpa_stub.cc +++ b/tests/depends/mmpa/src/mmpa_stub.cc @@ -230,7 +230,12 @@ INT32 mmGetTimeOfDay(mmTimeval *timeVal, mmTimezone *timeZone) INT32 mmRealPath(const CHAR *path, CHAR *realPath, INT32 realPathLen) { - return 0; + INT32 ret = EN_OK; + char *pRet = realpath(path, realPath); + if (pRet == NULL) { + ret = EN_ERROR; + } + return ret; } INT32 mmGetErrorCode() diff --git a/tests/ut/ge/graph/load/model_helper_unittest.cc b/tests/ut/ge/graph/load/model_helper_unittest.cc index 455285bf..1d2127cb 100644 --- a/tests/ut/ge/graph/load/model_helper_unittest.cc +++ b/tests/ut/ge/graph/load/model_helper_unittest.cc @@ -8,7 +8,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, + * distributed under the License is distributed on an "AS I#include "common/model_parser/base.h"S" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. @@ -18,6 +18,8 @@ #define private public #define protected public #include "framework/common/helper/model_helper.h" +#include "framework/omg/model_tool.h" +#include "framework/omg/ge_init.h" #include "ge/model/ge_model.h" #undef private #undef protected @@ -49,4 +51,21 @@ TEST_F(UtestModelHelper, save_size_to_modeldef) ModelHelper model_helper; EXPECT_EQ(SUCCESS, model_helper.SaveSizeToModelDef(ge_model)); } +TEST_F(UtestModelHelper, atc_test) +{ + ge::proto::ModelDef model_def; + uint32_t modeldef_size = 0; + + GEInit::Finalize(); + char buffer[1024]; + getcwd(buffer, 1024); + printf("%s", buffer); + string path=buffer; + string file_path=path + "Makefile"; + + ModelTool::GetModelInfoFromOm(file_path.c_str(), model_def, modeldef_size); + ModelTool::GetModelInfoFromOm("123.om", model_def, modeldef_size); + ModelTool::GetModelInfoFromPbtxt(file_path.c_str(), model_def); + ModelTool::GetModelInfoFromPbtxt("123.pbtxt", model_def); +} } // namespace ge From b082417c6b626bc138e8147f9a6ed1e9f07d76ef Mon Sep 17 00:00:00 2001 From: wjm Date: Fri, 26 Feb 2021 01:37:31 +0800 Subject: [PATCH 4/8] fix --- tests/ut/ge/graph/load/model_helper_unittest.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ut/ge/graph/load/model_helper_unittest.cc b/tests/ut/ge/graph/load/model_helper_unittest.cc index 1d2127cb..9282ccb0 100644 --- a/tests/ut/ge/graph/load/model_helper_unittest.cc +++ b/tests/ut/ge/graph/load/model_helper_unittest.cc @@ -8,7 +8,7 @@ * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS I#include "common/model_parser/base.h"S" BASIS, + * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. From f3d6d8fc639574a36fd88c23ca7edc96c9ab81ef Mon Sep 17 00:00:00 2001 From: wjm Date: Fri, 26 Feb 2021 01:45:41 +0800 Subject: [PATCH 5/8] fix --- tests/ut/ge/graph/load/model_helper_unittest.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/ut/ge/graph/load/model_helper_unittest.cc b/tests/ut/ge/graph/load/model_helper_unittest.cc index 9282ccb0..7a85e417 100644 --- a/tests/ut/ge/graph/load/model_helper_unittest.cc +++ b/tests/ut/ge/graph/load/model_helper_unittest.cc @@ -59,9 +59,8 @@ TEST_F(UtestModelHelper, atc_test) GEInit::Finalize(); char buffer[1024]; getcwd(buffer, 1024); - printf("%s", buffer); string path=buffer; - string file_path=path + "Makefile"; + string file_path=path + "/Makefile"; ModelTool::GetModelInfoFromOm(file_path.c_str(), model_def, modeldef_size); ModelTool::GetModelInfoFromOm("123.om", model_def, modeldef_size); From fa3ee39dafebdaad075a8388dd3e57160fdf09e3 Mon Sep 17 00:00:00 2001 From: wjm Date: Fri, 26 Feb 2021 15:29:24 +0800 Subject: [PATCH 6/8] test --- ge/common/helper/model_helper.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ge/common/helper/model_helper.cc b/ge/common/helper/model_helper.cc index f57d7b67..ebfec9cc 100644 --- a/ge/common/helper/model_helper.cc +++ b/ge/common/helper/model_helper.cc @@ -882,11 +882,11 @@ FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelHelper::GetModelNam } FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY Status ModelTool::GetModelInfoFromOm(const char *model_file, - ge::proto::ModelDef &model_def, - uint32_t &modeldef_size) { + ge::proto::ModelDef &model_def, uint32_t &modeldef_size) { GE_CHECK_NOTNULL(model_file); ge::ModelData model; int32_t priority = 0; + Status ret = ModelParserBase::LoadFromFile(model_file, "", priority, model); if (ret != SUCCESS) { GELOGE(ret, "LoadFromFile failed."); From b0a360426de1bebf284b530fd71eae7f4344dce9 Mon Sep 17 00:00:00 2001 From: wjm Date: Fri, 26 Feb 2021 20:21:34 +0800 Subject: [PATCH 7/8] fix --- tests/ut/ge/graph/load/model_helper_unittest.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/ut/ge/graph/load/model_helper_unittest.cc b/tests/ut/ge/graph/load/model_helper_unittest.cc index 7a85e417..03605dc7 100644 --- a/tests/ut/ge/graph/load/model_helper_unittest.cc +++ b/tests/ut/ge/graph/load/model_helper_unittest.cc @@ -51,6 +51,7 @@ TEST_F(UtestModelHelper, save_size_to_modeldef) ModelHelper model_helper; EXPECT_EQ(SUCCESS, model_helper.SaveSizeToModelDef(ge_model)); } + TEST_F(UtestModelHelper, atc_test) { ge::proto::ModelDef model_def; From ac2ac4fd1d806227360a4effd24d3bb55872bbb0 Mon Sep 17 00:00:00 2001 From: wjm Date: Fri, 26 Feb 2021 20:39:24 +0800 Subject: [PATCH 8/8] fix --- tests/ut/ge/graph/load/model_helper_unittest.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/ut/ge/graph/load/model_helper_unittest.cc b/tests/ut/ge/graph/load/model_helper_unittest.cc index 03605dc7..7a85e417 100644 --- a/tests/ut/ge/graph/load/model_helper_unittest.cc +++ b/tests/ut/ge/graph/load/model_helper_unittest.cc @@ -51,7 +51,6 @@ TEST_F(UtestModelHelper, save_size_to_modeldef) ModelHelper model_helper; EXPECT_EQ(SUCCESS, model_helper.SaveSizeToModelDef(ge_model)); } - TEST_F(UtestModelHelper, atc_test) { ge::proto::ModelDef model_def;