diff --git a/paddle/fluid/framework/ir/fuse_pass_base.cc b/paddle/fluid/framework/ir/fuse_pass_base.cc index 9dfc8bf6037a74b714046c51e059abd50247d5c3..4f89750daee16f8d07c92ebd257309eab147ed31 100644 --- a/paddle/fluid/framework/ir/fuse_pass_base.cc +++ b/paddle/fluid/framework/ir/fuse_pass_base.cc @@ -53,6 +53,8 @@ void FusePassBase::AddStatis(int count_of_fused) const { auto& info = graph_->Get>(kFuseStatisAttr); info[repr_] = count_of_fused; + if (count_of_fused > 0) + LOG(INFO) << "--- detected " << count_of_fused << " subgraphs"; } FuseOptions FusePassBase::FindFuseOption(const Node& node1, diff --git a/paddle/fluid/framework/ir/graph_pattern_detector.cc b/paddle/fluid/framework/ir/graph_pattern_detector.cc index 7717bcfc3e96249bd99b80525728718ee18300b5..9d06a4de9548de2f5149b16e9e007051069b5adc 100644 --- a/paddle/fluid/framework/ir/graph_pattern_detector.cc +++ b/paddle/fluid/framework/ir/graph_pattern_detector.cc @@ -88,7 +88,7 @@ void GraphPatternDetector::operator()(Graph *graph, ValidateByNodeRole(&subgraphs); if (subgraphs.empty()) return; - LOG(INFO) << "--- detected " << subgraphs.size() << " subgraphs"; + int id = 0; for (auto &g : subgraphs) { VLOG(3) << "optimizing #" << id++ << " subgraph";