Skip to content

Commit

Permalink
Fix typos (PaddlePaddle#1454)
Browse files Browse the repository at this point in the history
  • Loading branch information
co63oc authored and jiahy0825 committed May 25, 2023
1 parent a1fb764 commit 9ba250d
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions cinn/hlir/pass/check_fusion_accuracy_pass_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ TEST(CheckFusionAccuracyPass, ElementWise_Fusion) {
auto graph = std::make_shared<Graph>(program, target);
hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D"});
}
Expand All @@ -114,13 +114,13 @@ TEST(CheckFusionAccuracyPass, ElementWise_Fusion_1) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D"});
}
Expand Down Expand Up @@ -150,13 +150,13 @@ TEST(CheckFusionAccuracyPass, ElementWise_Fusion_2) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D", "E", "F"});
}
Expand Down Expand Up @@ -186,13 +186,13 @@ TEST(CheckFusionAccuracyPass, ElementWise_Fusion_3) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D", "E", "F"});
}
Expand Down Expand Up @@ -222,13 +222,13 @@ TEST(CheckFusionAccuracyPass, ElementWise_Fusion_4) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D", "E", "F"});
}
Expand All @@ -251,13 +251,13 @@ TEST(CheckFusionAccuracyPass, ElementWise_Fusion_5) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B"});
}
Expand All @@ -283,13 +283,13 @@ TEST(CheckFusionAccuracyPass, Broadcast_Test_0) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D"});
}
Expand All @@ -315,13 +315,13 @@ TEST(CheckFusionAccuracyPass, Broadcast_Test_2) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D"});
}
Expand Down Expand Up @@ -349,13 +349,13 @@ TEST(CheckFusionAccuracyPass, Broadcast_Test_4) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D", "E"});
}
Expand Down Expand Up @@ -383,13 +383,13 @@ TEST(CheckFusionAccuracyPass, Broadcast_Test_5) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D", "E"});
}
Expand All @@ -414,13 +414,13 @@ TEST(CheckFusionAccuracyPass, Reduce_Test_0) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B"});
}
Expand All @@ -444,13 +444,13 @@ TEST(CheckFusionAccuracyPass, Reduce_Test_1) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B"});
}
Expand All @@ -477,13 +477,13 @@ TEST(CheckFusionAccuracyPass, Reduce_Test_2) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C"});
}
Expand All @@ -510,13 +510,13 @@ TEST(CheckFusionAccuracyPass, Reduce_Test_3) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D"});
}
Expand Down Expand Up @@ -544,13 +544,13 @@ TEST(CheckFusionAccuracyPass, Reduce_Test_4) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B", "C", "D"});
}
Expand All @@ -575,13 +575,13 @@ TEST(CheckFusionAccuracyPass, Reduce_Test_5) {

hlir::framework::ApplyPasses(graph.get(), {"OpFusionPass", "FusionMergePass"});

int group_size_affter = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());
int group_size_after = graph->fusion_groups.size() + CountAfterPassNodeSize(graph.get());

VLOG(1) << "Before CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});
hlir::framework::ApplyPasses(graph.get(), {"CheckFusionAccuracyPass", "TransToCustomCallPass"});
VLOG(1) << "After CheckFusionAccuracyPass:\n" << graph->DebugGroupedGraph(std::unordered_set<std::string>{});

CHECK_EQ(graph->fusion_groups.size(), group_size_affter);
CHECK_EQ(graph->fusion_groups.size(), group_size_after);

RunTest(target, graph, {"A", "B"});
}
Expand Down

0 comments on commit 9ba250d

Please sign in to comment.