diff --git a/paddle/fluid/framework/ir/fc_gru_fuse_pass.cc b/paddle/fluid/framework/ir/fc_gru_fuse_pass.cc index e1958702501543fb8e93d627a11aede320dcd6e6..72bdd53cba7edcb7fe5e917b0105401f963aa6cd 100644 --- a/paddle/fluid/framework/ir/fc_gru_fuse_pass.cc +++ b/paddle/fluid/framework/ir/fc_gru_fuse_pass.cc @@ -350,7 +350,8 @@ void FCGRUFusePass::ApplyImpl(ir::Graph* graph) const { graph, name_scope_, param_scope(), true /*with_fc_bias*/); AddStatis(fusion_count); - if ((!Has("disable_logs") || !Get("disable_logs")) && fusion_count > 0) + if ((!Has("disable_logs") || !Get("disable_logs")) && + (fusion_count > 0)) string::PrettyLogDetail("--- fused %d pairs of fc gru patterns", fusion_count); } diff --git a/paddle/fluid/framework/ir/layer_norm_fuse_pass.cc b/paddle/fluid/framework/ir/layer_norm_fuse_pass.cc index 5df2306935eadb8425a1881232dc92a017cfd235..260fcda37804fc28805d134ccb27604060eade6a 100644 --- a/paddle/fluid/framework/ir/layer_norm_fuse_pass.cc +++ b/paddle/fluid/framework/ir/layer_norm_fuse_pass.cc @@ -423,7 +423,7 @@ void LayerNormFusePass::ApplyImpl(Graph* graph) const { gpd(graph, handler); AddStatis(found_layer_norm_count); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_layer_norm_count > 0) + (found_layer_norm_count > 0)) PrettyLogDetail("--- Fused %d subgraphs into layer_norm op.", found_layer_norm_count); } diff --git a/paddle/fluid/framework/ir/mkldnn/batch_norm_act_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/batch_norm_act_fuse_pass.cc index 02a394cafdbddb50d4f80229ffa9b0b919b1572e..daaef03f11010f3aadf9002900801781e2f342a6 100644 --- a/paddle/fluid/framework/ir/mkldnn/batch_norm_act_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/batch_norm_act_fuse_pass.cc @@ -144,7 +144,7 @@ void FuseBatchNormActOneDNNPass::FuseBatchNormAct( gpd(graph, handler); AddStatis(found_bn_act_count); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_bn_act_count > 0) + (found_bn_act_count > 0)) PrettyLogDetail("--- fused %d batch norm with relu activation", found_bn_act_count); } diff --git a/paddle/fluid/framework/ir/mkldnn/conv_elementwise_add_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/conv_elementwise_add_mkldnn_fuse_pass.cc index 6a3a24648dbf147ae98ca5c51e65228b0ecdd8bf..dcaba821066e9b942823665123f9f49dbda7dfd1 100644 --- a/paddle/fluid/framework/ir/mkldnn/conv_elementwise_add_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/conv_elementwise_add_mkldnn_fuse_pass.cc @@ -141,7 +141,7 @@ GraphWithStats ResidualConnectionMKLDNNFusePass::FuseConv( gpd(graph_with_stats.first, handler); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_conv_count > 0) { + (found_conv_count > 0)) { std::stringstream msg_ss; std::string fusionMode = as_x ? "x" : "y"; msg_ss << "--- Fused " << found_conv_count << " conv (as " << fusionMode @@ -230,7 +230,7 @@ GraphWithStats ResidualConnectionMKLDNNFusePass::FuseProjectionConv( gpd(graph_with_stats.first, handler); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_projection_conv_count > 0) { + (found_projection_conv_count > 0)) { std::stringstream msg_ss; msg_ss << "--- Fused " << found_projection_conv_count << " projection conv (as y) + elementwise_add patterns"; 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 ab481b2b9499e7b7e3d325873ac9463cdb83b017..55ff71ba2eb56949eb95a65080f1181a6085e0bb 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,8 +99,8 @@ void ElementwiseActivationOneDNNPass::FuseElementwiseAct( gpd(graph, handler); AddStatis(found_elementwise_activation_count); - if ((!Has("disable_logs") || - !Get("disable_logs") && found_elementwise_activation_count > 0)) + if ((!Has("disable_logs") || !Get("disable_logs")) && + (found_elementwise_activation_count > 0)) PrettyLogDetail("--- fused %d %s with %s activation", found_elementwise_activation_count, elt_type, diff --git a/paddle/fluid/framework/ir/mkldnn/fc_elementwise_add_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/fc_elementwise_add_mkldnn_fuse_pass.cc index 52e3e9b5d79de4b27e8bdedefa0848bad8d0be65..7b0951b9c7ddc06efff466297b11a39e91e8ed1b 100644 --- a/paddle/fluid/framework/ir/mkldnn/fc_elementwise_add_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/fc_elementwise_add_mkldnn_fuse_pass.cc @@ -133,7 +133,7 @@ GraphWithStats FCResidualConnectionMKLDNNFusePass::FuseFC( gpd(graph_with_stats.first, handler); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_fc_count > 0) { + (found_fc_count > 0)) { std::stringstream msg_ss; std::string fusionMode = fc_as_x ? "x" : "y"; msg_ss << "--- Fused " << found_fc_count << " fc (as " << fusionMode diff --git a/paddle/fluid/framework/ir/mkldnn/matmul_activation_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/matmul_activation_mkldnn_fuse_pass.cc index 3609466cb4fac4caebbac7aaea20dbd8a04692b8..3f1478e3fe5fd00c02057eb9fccad40cb0c1b137 100644 --- a/paddle/fluid/framework/ir/mkldnn/matmul_activation_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/matmul_activation_mkldnn_fuse_pass.cc @@ -88,7 +88,7 @@ void MatmulActivationMkldnnFusePass::FuseMatmulAct( gpd(graph, handler); AddStatis(found_matmul_activation_count); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_matmul_activation_count > 0) { + (found_matmul_activation_count > 0)) { PrettyLogDetail("--- fused %d %s with %s activation", found_matmul_activation_count, matmul_type, diff --git a/paddle/fluid/framework/ir/mkldnn/matmul_elementwise_add_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/matmul_elementwise_add_mkldnn_fuse_pass.cc index a2a67c3aafa9c7cb304c0aecfcf796951dc22a65..795ecce2ee81506cfe4ff193f0817bd09d27ce20 100644 --- a/paddle/fluid/framework/ir/mkldnn/matmul_elementwise_add_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/matmul_elementwise_add_mkldnn_fuse_pass.cc @@ -83,7 +83,7 @@ void MatmulElementwiseAddMKLDNNFusePass::FuseMatmulElementwiseAdd( gpd(graph, handler); AddStatis(found_matmul_elementwise_add_count); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_matmul_elementwise_add_count > 0) { + (found_matmul_elementwise_add_count > 0)) { PrettyLogDetail("--- fused %d %s (as %s) with elementwise_add", found_matmul_elementwise_add_count, matmul_type, diff --git a/paddle/fluid/framework/ir/mkldnn/scale_matmul_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/scale_matmul_fuse_pass.cc index e464d8d8db3b9e5fb5fcccf5da4e7116c1140474..bcc44a53fe50eccd52b3bf0aed841e1c5a39ac18 100644 --- a/paddle/fluid/framework/ir/mkldnn/scale_matmul_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/scale_matmul_fuse_pass.cc @@ -136,7 +136,7 @@ void ScaleMatmulFusePass::ApplyImpl(ir::Graph* graph) const { gpd(graph, handler); AddStatis(found_scale_matmul_fuse_count); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_scale_matmul_fuse_count > 0) + (found_scale_matmul_fuse_count > 0)) PrettyLogDetail("--- fused %d scale with matmul", found_scale_matmul_fuse_count); } diff --git a/paddle/fluid/framework/ir/mkldnn/softplus_activation_mkldnn_fuse_pass.cc b/paddle/fluid/framework/ir/mkldnn/softplus_activation_mkldnn_fuse_pass.cc index 90a886aece5176296604b8a03340082ff94576bd..fb3cc64e54b9187e1ba07fbf9810881170555e5c 100644 --- a/paddle/fluid/framework/ir/mkldnn/softplus_activation_mkldnn_fuse_pass.cc +++ b/paddle/fluid/framework/ir/mkldnn/softplus_activation_mkldnn_fuse_pass.cc @@ -95,7 +95,7 @@ void SoftplusActivationOneDNNPass::FuseSoftplusActivation( gpd(graph, handler); AddStatis(found_softplus_activation_count); if ((!Has("disable_logs") || !Get("disable_logs")) && - found_softplus_activation_count > 0) + (found_softplus_activation_count > 0)) PrettyLogDetail("--- fused %d softplus with %s activation", found_softplus_activation_count, act_type);