Browse Source

!10081 add check for inputs size of return node in dump

From: @zhangbuxue
Reviewed-by: 
Signed-off-by:
tags/v1.1.0
mindspore-ci-bot Gitee 5 years ago
parent
commit
dbc93d7872
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      mindspore/ccsrc/debug/dump_proto.cc

+ 3
- 0
mindspore/ccsrc/debug/dump_proto.cc View File

@@ -481,6 +481,9 @@ void ProtoExporter::ExportFuncGraphOutput(const FuncGraphPtr &func_graph, const
if (ret_node == nullptr || !ret_node->isa<CNode>()) { if (ret_node == nullptr || !ret_node->isa<CNode>()) {
MS_LOG(EXCEPTION) << "Graph return node is illegal"; MS_LOG(EXCEPTION) << "Graph return node is illegal";
} }
if (ret_node->inputs().size() != 2) {
return;
}
AnfNodePtr arg = ret_node->input(1); AnfNodePtr arg = ret_node->input(1);
if (graph_proto == nullptr) { if (graph_proto == nullptr) {
MS_LOG(EXCEPTION) << "graph_proto is nullptr"; MS_LOG(EXCEPTION) << "graph_proto is nullptr";


Loading…
Cancel
Save