Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround poll on macos. #9596

Merged
merged 1 commit into from
Sep 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions rabit/src/allreduce_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ AllreduceBase::TryAllreduceTree(void *sendrecvbuf_,
break;
}
// select must return
auto poll_res = watcher.Poll(timeout_sec);
auto poll_res = watcher.Poll(timeout_sec, false); // fail on macos
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does "fail on macox" mean? The old code was failing or the new code?

Copy link
Member Author

@trivialfis trivialfis Sep 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old code was failing but did not check. The new code checks for those errors

std::enable_if_t<std::is_integral_v<E>, xgboost::collective::Result> PollError(E const& revents) {
.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems those errors don't affect the actual output on macos. The underlying reason however, is unclear to me. Maybe I should try to get a mac device somehow.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can start a macos instance on aws.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make more checks for macos once the old rabit code can be replaced.

if (!poll_res.OK()) {
LOG(FATAL) << poll_res.Report();
}
Expand Down Expand Up @@ -814,7 +814,7 @@ AllreduceBase::TryAllgatherRing(void *sendrecvbuf_, size_t total_size,
break;
}

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();
}
Expand Down Expand Up @@ -919,7 +919,7 @@ AllreduceBase::TryReduceScatterRing(void *sendrecvbuf_,
if (finished) {
break;
}
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();
}
Expand Down
Loading