未验证 提交 227e0c45 编写于 作者: W Wu Yi 提交者: GitHub

fix nccl2 mode startup test=develop (#15132)

上级 7305fc2f
...@@ -67,7 +67,7 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder { ...@@ -67,7 +67,7 @@ class ParallelExecutorPassBuilder : public ir::PassBuilder {
context->endpoints_ = strategy_.trainers_endpoints_; context->endpoints_ = strategy_.trainers_endpoints_;
context->trainer_id_ = strategy_.trainer_id_; context->trainer_id_ = strategy_.trainer_id_;
PADDLE_ENFORCE(strategy_.trainer_id_ >= 0, "trainer_id_ >= 0"); PADDLE_ENFORCE(strategy_.trainer_id_ >= 0, "trainer_id_ >= 0");
if (strategy_.trainer_id_ > 0) { if (strategy_.trainer_id_ > 0 && strategy_.trainers_endpoints_.size() > 0) {
PADDLE_ENFORCE((unsigned)(strategy_.trainer_id_) < PADDLE_ENFORCE((unsigned)(strategy_.trainer_id_) <
strategy_.trainers_endpoints_.size(), strategy_.trainers_endpoints_.size(),
"trainer_id_ < endpoints_ size"); "trainer_id_ < endpoints_ size");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册