diff --git a/paddle/fluid/framework/ir/mkldnn/elt_act_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/elt_act_mkldnn_fuse_pass.cc index c9eee31606cc36e54fd20c99c5508a76bed344a8..b28b07924d8884f6a67a6b9ebe7175bba52a6561 100644 --- a/paddle/fluid/framework/ir/mkldnn/elt_act_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/elt_act_mkldnn_fuse_pass.cc @@ -99,10 +99,11 @@ void ElementwiseActivationOneDNNPass::FuseElementwiseAct( gpd(graph, handler); AddStatis(found_elementwise_activation_count); - PrettyLogDetail("--- fused %d %s with %s activation", - found_elementwise_activation_count, - elt_type, - act_type); + if (!Has("disable_logs") || !Get("disable_logs")) + PrettyLogDetail("--- fused %d %s with %s activation", + found_elementwise_activation_count, + elt_type, + act_type); } } // namespace ir