@@ -49,12 +49,6 @@ std::vector<PatternNodePtr> PatternGraph::ClusterOps() {
49
49
VLOG (4 ) << " [Group Cluster] After ReduceTree_Trivial_Fusion: " ;
50
50
PrintGraphInfo ();
51
51
52
- // All -> AnchorPattern
53
- VLOG (4 ) << " [Group Cluster] Start LiftToAnchorPattern" ;
54
- LiftToAnchorPattern ();
55
- VLOG (4 ) << " [Group Cluster] After LiftToAnchorPattern: " ;
56
- PrintGraphInfo ();
57
-
58
52
// AnchorPattern x AnchorPattern Fusion
59
53
VLOG (4 ) << " [Group Cluster] Start AnchorFusion" ;
60
54
AnchorFusion ();
@@ -67,6 +61,12 @@ std::vector<PatternNodePtr> PatternGraph::ClusterOps() {
67
61
VLOG (4 ) << " [Group Cluster] After SplitRecomputePattern: " ;
68
62
PrintGraphInfo ();
69
63
64
+ // Second AnchorFusion after split recompute
65
+ VLOG (4 ) << " [Group Cluster] Start Second AnchorFusion" ;
66
+ AnchorFusion ();
67
+ VLOG (4 ) << " [Group Cluster] After AnchorFusion: " ;
68
+ PrintGraphInfo ();
69
+
70
70
// Horizontal fusion.
71
71
VLOG (4 ) << " [Group Cluster] Start HorizontalFusion" ;
72
72
HorizontalFusion ();
@@ -192,16 +192,14 @@ void PatternGraph::ReduceTree_Trivial_Fusion() {
192
192
MergeReduceTreeAndTrivialOperation>(this );
193
193
}
194
194
195
- void PatternGraph::LiftToAnchorPattern () {
195
+ void PatternGraph::AnchorFusion () {
196
196
GraphTransformer<NodePattern,
197
197
Or<StmtPatternGraphMatcher<TrivialPattern>,
198
198
StmtPatternGraphMatcher<ReduceTreePlusTrivialPattern>,
199
199
StmtPatternGraphMatcher<ReducePattern>,
200
200
StmtPatternGraphMatcher<ReduceTreePattern>>,
201
201
LiftToAnchorPatternOperation>(this );
202
- }
203
202
204
- void PatternGraph::AnchorFusion () {
205
203
GraphTransformer<ReverseTopoNodePairPattern,
206
204
And<CanAnchorFusionMatcher, InputOutputMaximumConstrain>,
207
205
AnchorFusionOperation>(this );
@@ -239,9 +237,6 @@ void PatternGraph::ItersPermutationFusion() {
239
237
void PatternGraph::SplitRecomputePattern () {
240
238
GraphTransformer<NodePattern, RecomputeNodeMatcher, SplitRecomputeOperation>(
241
239
this );
242
- GraphTransformer<NodePattern,
243
- StmtPatternGraphMatcher<TrivialPattern>,
244
- LiftToAnchorPatternOperation>(this );
245
240
}
246
241
247
242
PatternGraph::PatternGraph (const std::vector<PatternContent>& contents,
0 commit comments