|
|
@ -297,10 +297,11 @@ Status ModelManager::LoadModelOnline(uint32_t &model_id, const shared_ptr<ge::Ge
|
|
|
|
if (model_id == INVALID_MODEL_ID) {
|
|
|
|
if (model_id == INVALID_MODEL_ID) {
|
|
|
|
GenModelId(&model_id);
|
|
|
|
GenModelId(&model_id);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
auto name_to_model = ge_root_model->GetSubgraphInstanceNameToModel();
|
|
|
|
string model_name = "";
|
|
|
|
string model_name = "";
|
|
|
|
bool is_shape_unknown = ge_root_model->GetRootGraph()->GetGraphUnknownFlag();
|
|
|
|
bool is_shape_unknown = ge_root_model->GetRootGraph()->GetGraphUnknownFlag();
|
|
|
|
if (is_shape_unknown || GetContext().GetHostExecFlag()) {
|
|
|
|
// if multi subgraph is known, do hybrid load process
|
|
|
|
|
|
|
|
if (is_shape_unknown || GetContext().GetHostExecFlag() || (name_to_model.size() > 1)) {
|
|
|
|
return DoLoadHybridModelOnline(model_id, model_name, ge_root_model, listener);
|
|
|
|
return DoLoadHybridModelOnline(model_id, model_name, ge_root_model, listener);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -322,7 +323,6 @@ Status ModelManager::LoadModelOnline(uint32_t &model_id, const shared_ptr<ge::Ge
|
|
|
|
auto root_graph = ge_root_model->GetRootGraph();
|
|
|
|
auto root_graph = ge_root_model->GetRootGraph();
|
|
|
|
GE_CHECK_NOTNULL(root_graph);
|
|
|
|
GE_CHECK_NOTNULL(root_graph);
|
|
|
|
string root_model_name = root_graph->GetName();
|
|
|
|
string root_model_name = root_graph->GetName();
|
|
|
|
auto name_to_model = ge_root_model->GetSubgraphInstanceNameToModel();
|
|
|
|
|
|
|
|
GeModelPtr ge_model = name_to_model[root_model_name];
|
|
|
|
GeModelPtr ge_model = name_to_model[root_model_name];
|
|
|
|
Status ret = SUCCESS;
|
|
|
|
Status ret = SUCCESS;
|
|
|
|
do {
|
|
|
|
do {
|
|
|
|