提交 7676043b 编写于 作者: M Margaret_wangrui

copy ref map to final graph in RecurseCompileGraph

上级 927278be
...@@ -1727,6 +1727,14 @@ void AscendSession::RecurseCompileGraph(NotNull<KernelGraphPtr> graph, const Not ...@@ -1727,6 +1727,14 @@ void AscendSession::RecurseCompileGraph(NotNull<KernelGraphPtr> graph, const Not
continue; continue;
} }
RecurseCompileGraph(NOT_NULL(child_graph), memo); RecurseCompileGraph(NOT_NULL(child_graph), memo);
// copy ref map to final graph
auto child_ref_map = child_graph->GetRefMap();
for (auto &item : child_ref_map) {
if (graph->IsInRefOutputMap(item.first)) {
MS_LOG(EXCEPTION) << "The ref pair is already in final graph!";
}
graph->AddRefCorrespondPairs(item.first, item.second);
}
} }
} }
} // namespace session } // namespace session
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册