From 81823370962df89d6ecf8fd73f5a27d31ad2d3de Mon Sep 17 00:00:00 2001 From: Pei Yang Date: Tue, 22 Sep 2020 10:03:58 +0800 Subject: [PATCH] clear pass logs (#27434) --- paddle/fluid/framework/ir/repeated_fc_relu_fuse_pass.cc | 3 ++- paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/framework/ir/repeated_fc_relu_fuse_pass.cc b/paddle/fluid/framework/ir/repeated_fc_relu_fuse_pass.cc index 23f794c11c..9f6032ffa5 100644 --- a/paddle/fluid/framework/ir/repeated_fc_relu_fuse_pass.cc +++ b/paddle/fluid/framework/ir/repeated_fc_relu_fuse_pass.cc @@ -176,7 +176,8 @@ void BuildRepeatedFCReluPattern(PDPattern* pattern, return false; } if (x->IsVar() && x->Var() && x->Var()->GetShape().size() > 2) { - LOG(WARNING) << "repeated fc relu only supports input dims = 2"; + VLOG(3) << "repeated fc relu only supports input dims = 2, so it " + "is not applied."; return false; } int fc_idx = FindFCIdx(x); diff --git a/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc b/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc index 74ba0093a1..8bdf394092 100644 --- a/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc +++ b/paddle/fluid/framework/ir/shuffle_channel_detect_pass.cc @@ -35,8 +35,6 @@ void ShuffleChannelDetectPass::ApplyImpl(ir::Graph* graph) const { const std::string pattern_name = "shufflechannel_pattern"; FusePassBase::Init(pattern_name, graph); - LOG(WARNING) << "There is fluid.layers.shuffle_channel API already, you can " - "use it instead of (reshape + transpose +reshape)"; GraphPatternDetector gpd; auto* x = gpd.mutable_pattern() ->NewNode("x") @@ -85,6 +83,9 @@ void ShuffleChannelDetectPass::ApplyImpl(ir::Graph* graph) const { // Delete the unneeded nodes. GraphSafeRemoveNodes(graph, {reshape1_op, reshape1_out, transpose_op, transpose_out, reshape2_op}); + LOG_FIRST_N(WARNING, 1) + << "There is fluid.layers.shuffle_channel API already, maybe you can " + "use it instead of (reshape + transpose + reshape)"; }; gpd(graph, handler); -- GitLab