| @@ -27,7 +27,6 @@ | |||||
| #include "ge/ge_api_types.h" | #include "ge/ge_api_types.h" | ||||
| #include "graph/opsproto_manager.h" | #include "graph/opsproto_manager.h" | ||||
| #include "graph/utils/type_utils.h" | |||||
| #include "omg/parser/parser_inner_ctx.h" | #include "omg/parser/parser_inner_ctx.h" | ||||
| #include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
| #include "parser/common/register_tbe.h" | #include "parser/common/register_tbe.h" | ||||
| @@ -207,20 +206,11 @@ domi::Status AclGrphParseUtil::AclParserInitialize(const std::map<std::string, s | |||||
| return FAILED; | return FAILED; | ||||
| } | } | ||||
| auto it = options.find(ge::FRAMEWORK_TYPE); | |||||
| if (it == options.end()) { | |||||
| GELOGE(FAILED, "Can not find ge.frameworkType in options"); | |||||
| return FAILED; | |||||
| } | |||||
| std::string fmk_type = it->second; | |||||
| GELOGD("frameworkType is %s", fmk_type.c_str()); | |||||
| std::vector<OpRegistrationData> registrationDatas = op_registry->registrationDatas; | std::vector<OpRegistrationData> registrationDatas = op_registry->registrationDatas; | ||||
| GELOGI("The size of registrationDatas in parser is: %zu", registrationDatas.size()); | GELOGI("The size of registrationDatas in parser is: %zu", registrationDatas.size()); | ||||
| for (OpRegistrationData ®_data : registrationDatas) { | 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 | // set init status | ||||
| @@ -19,7 +19,6 @@ | |||||
| #include "common/ge/tbe_plugin_manager.h" | #include "common/ge/tbe_plugin_manager.h" | ||||
| #include "framework/common/debug/ge_log.h" | #include "framework/common/debug/ge_log.h" | ||||
| #include "graph/utils/type_utils.h" | |||||
| #include "parser/common/register_tbe.h" | #include "parser/common/register_tbe.h" | ||||
| #include "framework/omg/parser/parser_inner_ctx.h" | #include "framework/omg/parser/parser_inner_ctx.h" | ||||
| #include "external/ge/ge_api_types.h" | #include "external/ge/ge_api_types.h" | ||||
| @@ -39,18 +38,10 @@ Status ParserInitialize(const std::map<std::string, std::string> &options) { | |||||
| // load custom op plugin | // load custom op plugin | ||||
| TBEPluginManager::Instance().LoadPluginSo(options); | 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<OpRegistrationData> registrationDatas = domi::OpRegistry::Instance()->registrationDatas; | std::vector<OpRegistrationData> registrationDatas = domi::OpRegistry::Instance()->registrationDatas; | ||||
| GELOGI("The size of registrationDatas in parser is: %zu", registrationDatas.size()); | GELOGI("The size of registrationDatas in parser is: %zu", registrationDatas.size()); | ||||
| for (OpRegistrationData ®_data : registrationDatas) { | 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); | auto iter = options.find(ge::OPTION_EXEC_ENABLE_SCOPE_FUSION_PASSES); | ||||
| @@ -124,8 +124,7 @@ bool OpRegistrationTbe::RegisterParser(const OpRegistrationData ®_data) { | |||||
| PARSER_CREATOR_FN func = CustomParserAdapterRegistry::Instance()->GetCreateFunc(reg_data.GetFrameworkType()); | PARSER_CREATOR_FN func = CustomParserAdapterRegistry::Instance()->GetCreateFunc(reg_data.GetFrameworkType()); | ||||
| if (func == nullptr) { | 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()); | TypeUtils::FmkTypeToSerialString(reg_data.GetFrameworkType()).c_str()); | ||||
| return false; | return false; | ||||
| } | } | ||||