From ca7ebcbda86696400f66c77079359134f9679252 Mon Sep 17 00:00:00 2001 From: Margaret_wangrui Date: Tue, 16 Jun 2020 14:08:56 +0800 Subject: [PATCH] handle the case which child_graph is nullptr --- mindspore/ccsrc/session/ascend_session.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mindspore/ccsrc/session/ascend_session.cc b/mindspore/ccsrc/session/ascend_session.cc index bf1fa87530..49ffff55fb 100644 --- a/mindspore/ccsrc/session/ascend_session.cc +++ b/mindspore/ccsrc/session/ascend_session.cc @@ -779,6 +779,9 @@ void AscendSession::GetSummaryNodes(KernelGraph *graph) { auto graph_order = GetGraphOrder(graph->graph_id()); for (size_t i = 0; i < graph_order.size(); i++) { auto child_graph = GetGraph(graph_order[i]); + if (child_graph == nullptr) { + continue; + } SessionBasic::GetSummaryNodes(child_graph.get()); auto child_graph_summary = child_graph->summary_nodes(); summary.insert(child_graph_summary.begin(), child_graph_summary.end());