From 72acae3300d4f11966cf210a07d07a372a7a5960 Mon Sep 17 00:00:00 2001 From: y00500818 Date: Mon, 21 Dec 2020 10:32:28 +0800 Subject: [PATCH] bugfix for load plugin. --- ge/common/ge/tbe_plugin_manager.cc | 13 ++++++++++--- parser | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ge/common/ge/tbe_plugin_manager.cc b/ge/common/ge/tbe_plugin_manager.cc index 44199c32..0cc7d553 100755 --- a/ge/common/ge/tbe_plugin_manager.cc +++ b/ge/common/ge/tbe_plugin_manager.cc @@ -181,12 +181,19 @@ void TBEPluginManager::GetCustomOpPath(std::string &customop_path) { void TBEPluginManager::LoadCustomOpLib() { 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; + } std::vector registration_datas = domi::OpRegistry::Instance()->registrationDatas; GELOGI("The size of registration_datas is: %zu", registration_datas.size()); for (OpRegistrationData reg_data : registration_datas) { - GELOGD("Begin to register optype: %s, imply_type: %s", reg_data.GetOmOptype().c_str(), - TypeUtils::ImplyTypeToSerialString(reg_data.GetImplyType()).c_str()); - domi::OpRegistry::Instance()->Register(reg_data); + if (std::to_string(reg_data.GetFrameworkType()) == fmk_type) { + GELOGD("Begin to register optype: %s, imply_type: %s", reg_data.GetOmOptype().c_str(), + TypeUtils::ImplyTypeToSerialString(reg_data.GetImplyType()).c_str()); + (void)domi::OpRegistry::Instance()->Register(reg_data); + } } } diff --git a/parser b/parser index dc250b93..866d6a2b 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit dc250b93ec6b1f08938cbe4a20091fcf68635d7d +Subproject commit 866d6a2b45ab00a08fbb9b07b5ef04722730c946