From e7da0940f985032a8c29be8d22535e5fa03c9fe0 Mon Sep 17 00:00:00 2001 From: chengduo <30176695+chengduoZH@users.noreply.github.com> Date: Fri, 2 Aug 2019 10:12:35 +0800 Subject: [PATCH] Disable fuse optimization option (#18924) * Disable fuse optimization test=develop --- paddle/fluid/framework/details/build_strategy.cc | 8 +++++++- paddle/fluid/framework/details/build_strategy.h | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/framework/details/build_strategy.cc b/paddle/fluid/framework/details/build_strategy.cc index 464226b4a82..68e8e631041 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 929cb51b845..b67a313df6c 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` -- GitLab