From b99db0e2c212881ace3d94dc220424b7a0dde43e Mon Sep 17 00:00:00 2001 From: Qiao Longfei Date: Thu, 7 Feb 2019 21:39:58 +0800 Subject: [PATCH] cpu reduce mode did not need to broadcast test=develop --- paddle/fluid/framework/details/multi_devices_graph_pass.cc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/paddle/fluid/framework/details/multi_devices_graph_pass.cc b/paddle/fluid/framework/details/multi_devices_graph_pass.cc index 75f922d2cca..30a3549ffe1 100644 --- a/paddle/fluid/framework/details/multi_devices_graph_pass.cc +++ b/paddle/fluid/framework/details/multi_devices_graph_pass.cc @@ -925,9 +925,7 @@ void DistSSAGraphBuilder::InsertCollectiveOp(ir::Graph *result, } void DistSSAGraphBuilder::InsertPostprocessOps(ir::Graph *result) const { - if (need_broadcast_var_ || - (UseGPU() && - strategy_.reduce_ == BuildStrategy::ReduceStrategy::kReduce)) { + if (UseGPU() && strategy_.reduce_ == BuildStrategy::ReduceStrategy::kReduce) { if (strategy_.fuse_broadcast_op_) { CreateFusedBroadcastOp(result, bcast_var_name_set_); } else { -- GitLab