Browse Source

!633 support load om through LoadRootModel

From: @lichun30
Reviewed-by: @xchu42,@ji_chen
Signed-off-by: @ji_chen
tags/v1.2.0
mindspore-ci-bot Gitee 3 years ago
parent
commit
91b79ca84c
1 changed files with 10 additions and 1 deletions
  1. +10
    -1
      ge/graph/load/new_model_manager/model_manager.cc

+ 10
- 1
ge/graph/load/new_model_manager/model_manager.cc View File

@@ -1055,7 +1055,16 @@ Status ModelManager::LoadModelOffline(uint32_t &model_id, const ModelData &model
mmTimespec timespec = mmGetTickCount(); mmTimespec timespec = mmGetTickCount();


ModelHelper model_helper; ModelHelper model_helper;
Status ret = model_helper.LoadModel(model);
Status ret = model_helper.LoadRootModel(model);
if (model_helper.GetModelType()) {
bool is_shape_unknown = false;
GE_CHK_STATUS_RET(model_helper.GetGeRootModel()->CheckIsUnknownShape(is_shape_unknown),
"CheckIsUnknownShape failed, model id:%u",
model_id);
if (is_shape_unknown || GetContext().GetHostExecFlag()) {
return DoLoadHybridModelOnline(model_id, model_helper.GetGeRootModel(), listener);
}
}
if (ret != SUCCESS) { if (ret != SUCCESS) {
GELOGE(ret, "load model failed."); GELOGE(ret, "load model failed.");
return ret; return ret;


Loading…
Cancel
Save