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

Fix warning info of build_strategy (#19805)

* fix warning info
test=develop

* fix bug of all_reduce_deps_pass
test=develop
上级 a0e9b7b9
......@@ -110,7 +110,8 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder {
"mode.";
strategy_.fuse_all_optimizer_ops_ = false;
LOG_IF(WARNING, strategy_.fuse_all_reduce_ops_ == true)
<< "fuse_all_optimizer_ops only work in Reducer mode.";
<< "fuse_all_optimizer_ops only works under AllReduce "
"mode.";
strategy_.fuse_all_reduce_ops_ = false;
}
if (strategy_.reduce_ == BuildStrategy::ReduceStrategy::kAllReduce) {
......@@ -132,7 +133,8 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder {
}
if (strategy_.fuse_all_reduce_ops_ == true) {
LOG_IF(WARNING, strategy_.async_mode_)
<< "fuse_all_optimizer_ops only work in Reducer mode.";
<< "Currently, fuse_all_reduce_ops doesn't work under "
"async mode.";
strategy_.fuse_all_reduce_ops_ = !strategy_.async_mode_;
}
}
......
......@@ -131,7 +131,7 @@ class AllReduceDepsPass : public ir::Pass {
auto right_in_vars =
details::DynamicCast<details::VarHandle>(right->Inputs());
PADDLE_ENFORCE_GT(left_in_vars.size(), 0);
PADDLE_ENFORCE_EQ(left_in_vars.size(), right_in_vars.size());
PADDLE_ENFORCE_GT(right_in_vars.size(), 0);
return left_in_vars[0]->Name() > right_in_vars[0]->Name();
});
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册