diff --git a/paddle/fluid/framework/details/build_strategy.cc b/paddle/fluid/framework/details/build_strategy.cc index 464226b4a8284be6d43bb8f87a9e556777513a76..68e8e631041a5445fb1ec5f0e1d233be639180cf 100644 --- a/paddle/fluid/framework/details/build_strategy.cc +++ b/paddle/fluid/framework/details/build_strategy.cc @@ -77,7 +77,7 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder { // Specifies the restrictions between different pass. if (strategy_.enable_parallel_graph_) { VLOG_IF(3, strategy_.fuse_all_optimizer_ops_) - << "Currently, fuse_all_optimizer_ops doesn't works under " + << "Currently, fuse_all_optimizer_ops doesn't work under " "parallel_graph."; strategy_.fuse_all_optimizer_ops_ = false; } @@ -96,6 +96,12 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder { << "fuse_all_optimizer_ops only work in Reducer mode."; strategy_.fuse_all_reduce_ops_ = false; } + if (strategy_.async_mode_) { + VLOG_IF(3, strategy_.fuse_all_optimizer_ops_) + << "Currently, fuse_all_optimizer_ops doesn't work under " + "async mode."; + strategy_.fuse_all_optimizer_ops_ = false; + } } void AppendMultiGraphOptPasses() { diff --git a/paddle/fluid/framework/details/build_strategy.h b/paddle/fluid/framework/details/build_strategy.h index 929cb51b8454b0220c5dbe6a7b82af6af06c1d53..b67a313df6c91d294314062b4049dc1d00f1ae8e 100644 --- a/paddle/fluid/framework/details/build_strategy.h +++ b/paddle/fluid/framework/details/build_strategy.h @@ -89,7 +89,7 @@ struct BuildStrategy { bool fuse_elewise_add_act_ops_{false}; // Fuse_all_optimizer_ops and fuse_all_reduce_ops require that gradients // should not be sparse types - bool fuse_all_optimizer_ops_{true}; + bool fuse_all_optimizer_ops_{false}; bool fuse_all_reduce_ops_{false}; // fuse_relu_depthwise_conv can fuse the `relu -> // depthwise_conv`