From dd6beb0a811efaf9f41c5406709cfc1b61ab428b Mon Sep 17 00:00:00 2001 From: yuchaojie Date: Fri, 25 Jun 2021 14:16:43 +0800 Subject: [PATCH] fix bug of UnifyMindIR repeatly match same node --- mindspore/ccsrc/backend/session/ascend_session.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/backend/session/ascend_session.cc b/mindspore/ccsrc/backend/session/ascend_session.cc index 101c1bead02..2354f36cc84 100644 --- a/mindspore/ccsrc/backend/session/ascend_session.cc +++ b/mindspore/ccsrc/backend/session/ascend_session.cc @@ -389,8 +389,8 @@ GraphId AscendSession::CompileGraphImpl(NotNull func_graph) { auto root_graph = ConstructKernelGraph(func_graph, &all_graphs); for (const auto &graph : all_graphs) { graph->set_root_graph_id(root_graph->graph_id()); - UnifyMindIR(graph); } + UnifyMindIR(root_graph); // Update Graph Dynamic Shape Attr UpdateAllGraphDynamicShapeAttr(all_graphs); opt::BackendCommonOptimization(root_graph);