From 54edf24170fcdbe765af9d5d75af73a3c93b8c2f Mon Sep 17 00:00:00 2001 From: lichun Date: Tue, 23 Mar 2021 17:14:21 +0800 Subject: [PATCH] Bugfix: support unknown control op subgraph --- tests/ut/ge/hybrid/ge_hybrid_unittest.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/ut/ge/hybrid/ge_hybrid_unittest.cc b/tests/ut/ge/hybrid/ge_hybrid_unittest.cc index 7e6da9e0..26aec7fe 100644 --- a/tests/ut/ge/hybrid/ge_hybrid_unittest.cc +++ b/tests/ut/ge/hybrid/ge_hybrid_unittest.cc @@ -265,19 +265,21 @@ TEST_F(UtestGeHybrid, unfold_subgraphs_success) { NodePtr sub_sub_graph_while_cond_data_node = sub_sub_graph1->AddNode(sub_sub_graph_while_cond_data_op_desc); ComputeGraphPtr sub_sub_graph2 = std::make_shared("while body"); - OpDescPtr sub_sub_graph_while_body_const_op_desc = CreateOpDesc("body_const", CONSTANT); - NodePtr sub_sub_graph_while_body_const_node = sub_sub_graph2->AddNode(sub_sub_graph_while_body_const_op_desc); + /*OpDescPtr sub_sub_graph_while_body_const_op_desc = CreateOpDesc("body_const", CONSTANT); + NodePtr sub_sub_graph_while_body_const_node = sub_sub_graph2->AddNode(sub_sub_graph_while_body_const_op_desc);*/ OpDescPtr sub_sub_graph_while_body_data_op_desc = CreateOpDesc("body_data", DATA); NodePtr sub_sub_graph_while_body_data_node = sub_sub_graph2->AddNode(sub_sub_graph_while_body_data_op_desc); - OpDescPtr sub_sub_graph_while_body_add_op_desc = CreateOpDesc("body_add", ADD); + /*OpDescPtr sub_sub_graph_while_body_add_op_desc = CreateOpDesc("body_add", ADD); NodePtr sub_sub_graph_while_body_add_node = sub_sub_graph2->AddNode(sub_sub_graph_while_body_add_node); sub_sub_graph_while_body_add_node->AddLinkFrom(sub_sub_graph_while_body_data_node); - sub_sub_graph_while_body_add_node->AddLinkFrom(sub_sub_graph_while_body_const_node); + sub_sub_graph_while_body_add_node->AddLinkFrom(sub_sub_graph_while_body_const_node);*/ ComputeGraphPtr sub_graph = std::make_shared("sub_graph"); OpDescPtr sub_graph_while_op_desc = CreateOpDesc("while", WHILE); NodePtr sub_graph_while_node = sub_graph->AddNode(sub_graph_while_op_desc); sub_graph->SetGraphUnknownFlag(true); + sub_graph_while_node->GetOpDesc()->AddSubgraphName("while_cond"); + sub_graph_while_node->GetOpDesc()->AddSubgraphName("while_body"); sub_graph_while_node->GetOpDesc()->SetSubgraphInstanceName(0, "while_cond"); sub_graph_while_node->GetOpDesc()->SetSubgraphInstanceName(1, "while_body");