Browse Source

display model info

tags/v1.2.0
wangwenhua1@huawei.com 3 years ago
parent
commit
028df1048a
2 changed files with 4 additions and 5 deletions
  1. +1
    -2
      ge/offline/main.cc
  2. +3
    -3
      ge/session/omg.cc

+ 1
- 2
ge/offline/main.cc View File

@@ -459,8 +459,7 @@ class GFlagUtils {
ret = ge::FAILED, "check enable single stream failed!"); ret = ge::FAILED, "check enable single stream failed!");


GE_CHK_BOOL_TRUE_EXEC_WITH_LOG((FLAGS_display_model_info != "0") && (FLAGS_display_model_info != "1"), GE_CHK_BOOL_TRUE_EXEC_WITH_LOG((FLAGS_display_model_info != "0") && (FLAGS_display_model_info != "1"),
ErrorManager::GetInstance().ATCReportErrMessage(
"E10006", {"parameter"}, {"display_model_info", FLAGS_display_model_info}),
ErrorManager::GetInstance().ATCReportErrMessage("E10006", {"parameter"}, {"display_model_info"});
ret = ge::FAILED, "Input parameter[--display_model_info]'s value must be 1 or 0."); ret = ge::FAILED, "Input parameter[--display_model_info]'s value must be 1 or 0.");


return ret; return ret;


+ 3
- 3
ge/session/omg.cc View File

@@ -1017,7 +1017,7 @@ FMK_FUNC_HOST_VISIBILITY Status ConvertOm(const char *model_file, const char *js
return ret; return ret;
} catch (const std::exception &e) { } catch (const std::exception &e) {
ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"},
{"Convert om model to json failed, exception message[" + e.what() + "]"});
{"Convert om model to json failed, exception message[" + std::string(e.what()) + "]"});
GELOGE(FAILED, "Convert om model to json failed, exception message : %s.", e.what()); GELOGE(FAILED, "Convert om model to json failed, exception message : %s.", e.what());
return FAILED; return FAILED;
} }
@@ -1066,12 +1066,12 @@ FMK_FUNC_HOST_VISIBILITY Status ConvertPbtxtToJson(const char *model_file, const
} catch (google::protobuf::FatalException &e) { } catch (google::protobuf::FatalException &e) {
free_model_data(&model.model_data); free_model_data(&model.model_data);
ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"ParseFromString failed, exception message[" ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, {"ParseFromString failed, exception message["
+ e.what() + "]");
+ std::string(e.what()) + "]"});
GELOGE(FAILED, "ParseFromString failed. exception message : %s", e.what()); GELOGE(FAILED, "ParseFromString failed. exception message : %s", e.what());
return FAILED; return FAILED;
} catch (const std::exception &e) { } catch (const std::exception &e) {
ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"}, ErrorManager::GetInstance().ATCReportErrMessage("E19021", {"reason"},
{"Convert pbtxt to json failed, exception message[" + e.what() + "]"});
{"Convert pbtxt to json failed, exception message[" + std::string(e.what()) + "]"});
GELOGE(FAILED, "Convert pbtxt to json failed, exception message : %s.", e.what()); GELOGE(FAILED, "Convert pbtxt to json failed, exception message : %s.", e.what());
return FAILED; return FAILED;
} }


Loading…
Cancel
Save