fleet sync build strategy, test=develop (#29732)

revert-31562-mean
WangXi 4 years ago committed by GitHub
parent 638ccaabf4
commit 9cbcc6cadc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -85,6 +85,9 @@ message BuildStrategy {
optional bool enable_inplace = 7 [ default = false ];
optional bool enable_backward_optimizer_op_deps = 8 [ default = true ];
optional bool cache_runtime_context = 9 [ default = false ];
optional bool fuse_bn_add_act_ops = 10 [ default = true ];
optional bool enable_auto_fusion = 11 [ default = false ];
optional bool enable_addto = 12 [ default = false ];
}
message ExecutionStrategy {

@ -100,23 +100,8 @@ class GraphExecutionOptimizer(MetaOptimizerBase):
def _try_to_compile(self, startup_program, main_program, loss):
dist_strategy = self.user_defined_strategy
local_build_strategy = paddle.fluid.BuildStrategy()
local_build_strategy.enable_sequential_execution = \
dist_strategy.build_strategy.enable_sequential_execution
local_build_strategy.fuse_elewise_add_act_ops = \
dist_strategy.build_strategy.fuse_elewise_add_act_ops
local_build_strategy.fuse_bn_act_ops = \
dist_strategy.build_strategy.fuse_bn_act_ops
local_build_strategy.enable_auto_fusion = \
dist_strategy.build_strategy.enable_auto_fusion
local_build_strategy.fuse_relu_depthwise_conv = \
dist_strategy.build_strategy.fuse_relu_depthwise_conv
local_build_strategy.fuse_broadcast_ops = \
dist_strategy.build_strategy.fuse_broadcast_ops
local_build_strategy.fuse_all_optimizer_ops = \
dist_strategy.build_strategy.fuse_all_optimizer_ops
local_build_strategy.enable_inplace = \
dist_strategy.build_strategy.enable_inplace
local_build_strategy = dist_strategy.build_strategy
local_build_strategy.use_hierarchical_allreduce = \
dist_strategy.use_hierarchical_allreduce
local_build_strategy.hierarchical_allreduce_inter_nranks = \

Loading…
Cancel
Save