diff --git a/ge/session/omg.cc b/ge/session/omg.cc index 59ecbbed..c507a9d8 100755 --- a/ge/session/omg.cc +++ b/ge/session/omg.cc @@ -872,6 +872,7 @@ void GetGroupName(ge::proto::ModelDef &model_def) { FMK_FUNC_HOST_VISIBILITY void PrintModelInfo(ge::proto::ModelDef *model_def) { std::cout << "------------ Display Model Info start ------------" << std::endl; + auto model_attr_map = model_def->mutable_attr(); // system info iter = model_attr_map->find(ATTR_MODEL_ATC_VERSION); auto atc_version = (iter != model_attr_map->end()) ? iter->second.s() : ""; @@ -888,7 +889,6 @@ FMK_FUNC_HOST_VISIBILITY void PrintModelInfo(ge::proto::ModelDef *model_def) { << "[" << framework_type << "]." << std::endl; // resource info - auto model_attr_map = model_def->mutable_attr(); auto iter = model_attr_map->find(ATTR_MODEL_MEMORY_SIZE); auto memory_size = (iter != model_attr_map->end()) ? iter->second.i() : -1; iter = model_attr_map->find(ATTR_MODEL_WEIGHT_SIZE);