提交 49c9bd76 编写于 作者: Z zhoufeng

vm no process empty graph

Signed-off-by: Nzhoufeng <zhoufeng54@huawei.com>
上级 28b0f528
......@@ -289,6 +289,12 @@ GraphId AscendSession::CompileGraph(NotNull<FuncGraphPtr> func_graph) {
std::vector<KernelGraphPtr> all_graphs;
auto root_graph = ConstructKernelGraph(func_graph, &all_graphs);
BackendOptimization(all_graphs);
// empty graph dont entry to backend
if (root_graph->execution_order().empty()) {
MS_LOG(INFO) << root_graph->ToString() << " is empty graph.";
InitRuntimeResource();
return root_graph->graph_id();
}
// split switch
SplitGraphs(NOT_NULL(root_graph));
// insert goto labels and label_sets
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册