From 118afdc74fecb51db11f5dbd6cbb1efc403cda3a Mon Sep 17 00:00:00 2001 From: y00500818 Date: Thu, 17 Dec 2020 16:32:27 +0800 Subject: [PATCH] restore code --- parser/common/acl_graph_parser_util.cc | 14 ++------------ parser/common/parser_api.cc | 11 +---------- parser/common/register_tbe.cc | 3 +-- 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/parser/common/acl_graph_parser_util.cc b/parser/common/acl_graph_parser_util.cc index 61c82a3..a2b90da 100644 --- a/parser/common/acl_graph_parser_util.cc +++ b/parser/common/acl_graph_parser_util.cc @@ -27,7 +27,6 @@ #include "ge/ge_api_types.h" #include "graph/opsproto_manager.h" -#include "graph/utils/type_utils.h" #include "omg/parser/parser_inner_ctx.h" #include "framework/common/debug/ge_log.h" #include "parser/common/register_tbe.h" @@ -207,20 +206,11 @@ domi::Status AclGrphParseUtil::AclParserInitialize(const std::mapsecond; - GELOGD("frameworkType is %s", fmk_type.c_str()); std::vector registrationDatas = op_registry->registrationDatas; GELOGI("The size of registrationDatas in parser is: %zu", registrationDatas.size()); for (OpRegistrationData ®_data : registrationDatas) { - if (std::to_string(reg_data.GetFrameworkType()) == fmk_type) { - (void)OpRegistrationTbe::Instance()->Finalize(reg_data, false); - (void)domi::OpRegistry::Instance()->Register(reg_data); - } + (void)OpRegistrationTbe::Instance()->Finalize(reg_data, false); + domi::OpRegistry::Instance()->Register(reg_data); } // set init status diff --git a/parser/common/parser_api.cc b/parser/common/parser_api.cc index 651d1b1..65f6061 100644 --- a/parser/common/parser_api.cc +++ b/parser/common/parser_api.cc @@ -19,7 +19,6 @@ #include "common/ge/tbe_plugin_manager.h" #include "framework/common/debug/ge_log.h" -#include "graph/utils/type_utils.h" #include "parser/common/register_tbe.h" #include "framework/omg/parser/parser_inner_ctx.h" #include "external/ge/ge_api_types.h" @@ -39,18 +38,10 @@ Status ParserInitialize(const std::map &options) { // load custom op plugin TBEPluginManager::Instance().LoadPluginSo(options); - std::string fmk_type = std::to_string(domi::TENSORFLOW); - auto it = options.find(ge::FRAMEWORK_TYPE); - if (it != options.end()) { - fmk_type = it->second; - } - GELOGD("frameworkType is %s", fmk_type.c_str()); std::vector registrationDatas = domi::OpRegistry::Instance()->registrationDatas; GELOGI("The size of registrationDatas in parser is: %zu", registrationDatas.size()); for (OpRegistrationData ®_data : registrationDatas) { - if (std::to_string(reg_data.GetFrameworkType()) == fmk_type) { - (void)OpRegistrationTbe::Instance()->Finalize(reg_data, true); - } + (void)OpRegistrationTbe::Instance()->Finalize(reg_data, true); } auto iter = options.find(ge::OPTION_EXEC_ENABLE_SCOPE_FUSION_PASSES); diff --git a/parser/common/register_tbe.cc b/parser/common/register_tbe.cc index 6a8f986..cb610d5 100644 --- a/parser/common/register_tbe.cc +++ b/parser/common/register_tbe.cc @@ -124,8 +124,7 @@ bool OpRegistrationTbe::RegisterParser(const OpRegistrationData ®_data) { PARSER_CREATOR_FN func = CustomParserAdapterRegistry::Instance()->GetCreateFunc(reg_data.GetFrameworkType()); if (func == nullptr) { - GELOGE(INTERNAL_ERROR, - "Get custom parser adapter failed for fmk type %s.", + GELOGW("Get custom parser adapter failed for fmk type %s.", TypeUtils::FmkTypeToSerialString(reg_data.GetFrameworkType()).c_str()); return false; }