提交 e83c5630 编写于 作者: M mindspore-ci-bot 提交者: Gitee

!2651 handle RecurseCompileGraph when one branch is Assign

Merge pull request !2651 from Margaret_wangrui/copy_ref_map_to_final_graph_in_RecurseCompileGraph
......@@ -1735,6 +1735,14 @@ void AscendSession::RecurseCompileGraph(NotNull<KernelGraphPtr> graph, const Not
continue;
}
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册