|
|
|
@@ -533,7 +533,7 @@ Status OnnxModelParser::GetModelFromMemory(const char *data, uint32_t size, ge:: |
|
|
|
return SUCCESS; |
|
|
|
} |
|
|
|
|
|
|
|
Status OnnxModelParser::RealParse(const ge::onnx::ModelProto &onnx_model, ge::Graph &graph) { |
|
|
|
Status OnnxModelParser::ModelParseToGraph(const ge::onnx::ModelProto &onnx_model, ge::Graph &graph) { |
|
|
|
if (!onnx_model.has_graph()) { |
|
|
|
ErrorManager::GetInstance().ATCReportErrMessage("E16004"); |
|
|
|
GELOGE(PARAM_INVALID, "Onnx model do not has graph."); |
|
|
|
@@ -635,7 +635,7 @@ Status OnnxModelParser::Parse(const char *file, ge::Graph &graph) { |
|
|
|
GELOGE(FAILED, "get model from file failed."); |
|
|
|
return FAILED; |
|
|
|
} |
|
|
|
ret = RealParse(onnx_model, graph); |
|
|
|
ret = ModelParseToGraph(onnx_model, graph); |
|
|
|
if (ret != SUCCESS) { |
|
|
|
GELOGE(FAILED, "parse model failed."); |
|
|
|
return FAILED; |
|
|
|
@@ -650,7 +650,7 @@ Status OnnxModelParser::ParseFromMemory(const char *data, uint32_t size, ge::Gra |
|
|
|
GELOGE(FAILED, "get model from file failed."); |
|
|
|
return FAILED; |
|
|
|
} |
|
|
|
ret = RealParse(onnx_model, graph); |
|
|
|
ret = ModelParseToGraph(onnx_model, graph); |
|
|
|
if (ret != SUCCESS) { |
|
|
|
GELOGE(FAILED, "parse model failed."); |
|
|
|
return FAILED; |
|
|
|
|