diff --git a/paddle/fluid/framework/distributed_strategy.proto b/paddle/fluid/framework/distributed_strategy.proto old mode 100755 new mode 100644 index 914e27d6f1f5e689c7c97b96d1875f6ba676eb00..aa2867debe3cc55634cd84db3be292fef7a70074 --- a/paddle/fluid/framework/distributed_strategy.proto +++ b/paddle/fluid/framework/distributed_strategy.proto @@ -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 { diff --git a/python/paddle/distributed/fleet/meta_optimizers/graph_execution_optimizer.py b/python/paddle/distributed/fleet/meta_optimizers/graph_execution_optimizer.py index 21a024c7d4b90b642e9072fba36732e8a01be24f..7ee184cfc5eb774a6508e645d069ca3df811162c 100644 --- a/python/paddle/distributed/fleet/meta_optimizers/graph_execution_optimizer.py +++ b/python/paddle/distributed/fleet/meta_optimizers/graph_execution_optimizer.py @@ -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 = \