Browse Source

!673 bugfix for load plugin

From: @yangyongqiang5033
Reviewed-by: @xchu42,@ji_chen
Signed-off-by: @ji_chen
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
a8666c44a4
2 changed files with 11 additions and 4 deletions
  1. +10
    -3
      ge/common/ge/tbe_plugin_manager.cc
  2. +1
    -1
      parser

+ 10
- 3
ge/common/ge/tbe_plugin_manager.cc View File

@@ -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<OpRegistrationData> 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);
}
}
}



+ 1
- 1
parser

@@ -1 +1 @@
Subproject commit dc250b93ec6b1f08938cbe4a20091fcf68635d7d
Subproject commit 866d6a2b45ab00a08fbb9b07b5ef04722730c946

Loading…
Cancel
Save