未验证 提交 e7da0940 编写于 作者: C chengduo 提交者: GitHub

Disable fuse optimization option (#18924)

* Disable fuse optimization
test=develop
上级 c2c876f7
...@@ -77,7 +77,7 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder { ...@@ -77,7 +77,7 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder {
// Specifies the restrictions between different pass. // Specifies the restrictions between different pass.
if (strategy_.enable_parallel_graph_) { if (strategy_.enable_parallel_graph_) {
VLOG_IF(3, strategy_.fuse_all_optimizer_ops_) 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."; "parallel_graph.";
strategy_.fuse_all_optimizer_ops_ = false; strategy_.fuse_all_optimizer_ops_ = false;
} }
...@@ -96,6 +96,12 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder { ...@@ -96,6 +96,12 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder {
<< "fuse_all_optimizer_ops only work in Reducer mode."; << "fuse_all_optimizer_ops only work in Reducer mode.";
strategy_.fuse_all_reduce_ops_ = false; 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() { void AppendMultiGraphOptPasses() {
......
...@@ -89,7 +89,7 @@ struct BuildStrategy { ...@@ -89,7 +89,7 @@ struct BuildStrategy {
bool fuse_elewise_add_act_ops_{false}; bool fuse_elewise_add_act_ops_{false};
// Fuse_all_optimizer_ops and fuse_all_reduce_ops require that gradients // Fuse_all_optimizer_ops and fuse_all_reduce_ops require that gradients
// should not be sparse types // should not be sparse types
bool fuse_all_optimizer_ops_{true}; bool fuse_all_optimizer_ops_{false};
bool fuse_all_reduce_ops_{false}; bool fuse_all_reduce_ops_{false};
// fuse_relu_depthwise_conv can fuse the `relu -> // fuse_relu_depthwise_conv can fuse the `relu ->
// depthwise_conv` // depthwise_conv`
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册