Build a simple event loop for collective. (#9593)

This commit is contained in:
Jiaming Yuan
2023-09-20 02:09:07 +08:00
committed by GitHub
parent 259d80c0cf
commit 38ac52dd87
7 changed files with 402 additions and 47 deletions

View File

@@ -721,12 +721,11 @@ AllreduceBase::TryBroadcast(void *sendrecvbuf_, size_t total_size, int root) {
}
finished = false;
}
watcher.WatchException(links[i].sock);
}
// finish running
if (finished) break;
// select
auto poll_res = watcher.Poll(timeout_sec);
auto poll_res = watcher.Poll(timeout_sec, false); // fail on macos
if (!poll_res.OK()) {
LOG(FATAL) << poll_res.Report();
}