提交 3666d7c0 编写于 作者: T typhoonzero

fix num_blocks==2

上级 139ae08f
......@@ -157,8 +157,8 @@ class ListenAndServOp : public framework::OperatorBase {
}));
}
for (int i = 0; i < num_blocks - 2; ++i) fs[i].wait();
// Run global block at final step
if (num_blocks > 2) {
// Run global block at final step, or block1 if there are only 2 blocks
if (num_blocks >= 2) {
try {
executor.Run(*program, &recv_scope, num_blocks - 1,
false /*create_local_scope*/, false /*create_vars*/);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册