Skip to content

Commit 5883eef

Browse files
authored
[CINN} Limit merge non related group with large program (#72550)
1 parent 9db129f commit 5883eef

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

paddle/fluid/pir/transforms/sub_graph_detector.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -779,8 +779,10 @@ void SubgraphDetector::SubgraphFusion() {
779779
}
780780
}
781781

782-
VLOG(4) << "Merge non-related subgraphs";
783782
auto subgraph_list = GetSubgraphList();
783+
VLOG(4) << "Merge non-related subgraphs (size=" << subgraph_list.size()
784+
<< ")";
785+
if (subgraph_list.size() > 2048) return;
784786
for (size_t i = 0; i < subgraph_list.size(); ++i) {
785787
auto lhs = subgraph_list[i];
786788
if (!lhs->substitute) continue;

0 commit comments

Comments
 (0)