From a41419fe43d32d4602cc03bd81b48fa96c45bc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E9=AA=8F?= Date: Thu, 19 Sep 2024 11:23:16 +0000 Subject: [PATCH] =?UTF-8?q?!5515=20clean=20code=20for=20ut/st=20(2024/09/1?= =?UTF-8?q?9)=20Merge=20pull=20request=20!5515=20from=20=E5=82=85=E9=AA=8F?= =?UTF-8?q?/br=5Fclean=5Fcode=5Ffor=5Fut=5F0919?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../testcase/graph_fusion_turbo_unittest.cc | 56 ------------------- .../register_graph_fusion_v2_utest.cc | 2 +- 2 files changed, 1 insertion(+), 57 deletions(-) diff --git a/tests/ut/register/testcase/graph_fusion_turbo_unittest.cc b/tests/ut/register/testcase/graph_fusion_turbo_unittest.cc index d80dcac395..7d8f515b3e 100644 --- a/tests/ut/register/testcase/graph_fusion_turbo_unittest.cc +++ b/tests/ut/register/testcase/graph_fusion_turbo_unittest.cc @@ -783,62 +783,6 @@ TEST_F(UTestFusionTurbo, test_case_04_4) { EXPECT_EQ(node->GetOutDataAnchor(0)->GetPeerInDataAnchors().size(), 1); } -/* Initialize case */ -TEST_F(UTestFusionTurbo, test_case_04_5) { - ge::NodePtr relu; - - Relations src_list0(0, {relu, 0}); - - Relations src_list0_peer(0, {relu, 0, PEER}); - - Relations src_list1({0, {relu, 0}}); - Relations src_list1_peer({0, {relu, 0, PEER}}); - - Relations src_list2 = {{0, {relu, 0}}, - {1, {relu, 0}}}; - Relations src_list2_peer = {{0, {relu, 0, PEER}}, - {1, {relu, 0, PEER}}}; - - Relations src_list2_hybrid = {{0, {relu, 0, CURRENT}}, - {1, {relu, 0, PEER}}}; - - Relations src_list3 = {{0, {{relu, 0}, {}}}, - {1, {{relu, 0}, {relu, 1}}}}; - - Relations src_list3_hybrid = {{0, {{relu, 0, PEER}, {}}}, - {1, {{relu, 0, PEER}, {relu, 1, CURRENT}}}}; - - Relations src_list4(src_list1.GetRelations()); - - Relations src_list5((std::map())); - - Relations src_list6(src_list1); - - Relations src_list7(std::move(src_list1)); - NodeIndices test = {{relu, 0}}; - src_list7.UpdatePeerIndex(0, {{relu, 0}}); - src_list7.UpdatePeerIndex(0, test); - src_list7.UpdatePeerIndex(src_list6.GetRelations()); - - src_list7.Add(1, {{relu, 0}}); - src_list7.Add(0, {{relu, 1}}); - - - NodeIndex node_index1 = {relu, 0}; - Relations src_list10(0, node_index1); - - ge::NodePtr relu2; - NodeIndex node_index2 = {relu2, 0}; - - NodeIndices node_indices; - node_indices.emplace_back(node_index1); - node_indices.emplace_back(node_index2); - Relations relation1(1, node_indices); - relation1 = src_list7; - relation1 = {{0, {{relu, 0, PEER}, {}}}, - {1, {{relu, 0, PEER}, {relu, 1, CURRENT}}}}; -} - TEST_F(UTestFusionTurbo, test_case_05) { auto graph = CreateGraphSingleInAndOut(); FusionTurbo acc(graph); diff --git a/tests/ut/register/testcase/register_graph_fusion_v2_utest.cc b/tests/ut/register/testcase/register_graph_fusion_v2_utest.cc index 9a3853882e..0b0568ed1b 100644 --- a/tests/ut/register/testcase/register_graph_fusion_v2_utest.cc +++ b/tests/ut/register/testcase/register_graph_fusion_v2_utest.cc @@ -254,7 +254,7 @@ TEST_F(UTestGraphFusionPassReg, test_compile_level_case_01) { enable_flag = true; ret = ge::PassOptionUtils::CheckIsPassEnabled(pass_name_test, enable_flag); EXPECT_EQ(ret, ge::GRAPH_SUCCESS); - EXPECT_EQ(enable_flag, true); + EXPECT_TRUE(enable_flag == true); pass_desc = FusionPassRegistry::GetInstance().GetPassDesc(BUILT_IN_GRAPH_PASS); EXPECT_EQ(pass_desc.size(), 2); -- Gitee