Skip to content

gloo: use unbound buffers for barrier, broadcast #435

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

Merged
merged 1 commit into from
May 3, 2025

Conversation

d4l3k
Copy link
Member

@d4l3k d4l3k commented May 2, 2025

Summary:
This makes barrier and broadcast operations in Gloo use UnboundBuffer instead of Buffer. UnboundBuffer is the newer preferred buffer implementation and also makes the algorithms much easier to express/understand and efficient since we don't need to allocate more memory.

Tracking issue for Buffer removal: #432

Differential Revision: D74096980

Summary:
This makes barrier and broadcast operations in Gloo use UnboundBuffer instead of Buffer. UnboundBuffer is the newer preferred buffer implementation and also makes the algorithms much easier to express/understand and efficient since we don't need to allocate more memory.

Tracking issue for Buffer removal: #432

Differential Revision: D74096980
@facebook-github-bot
Copy link

This pull request was exported from Phabricator. Differential Revision: D74096980

Copy link

@fduwjj fduwjj left a comment

Choose a reason for hiding this comment

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

LGTM, this is way easier to understand, I just read the unbound buffer and it way easier to understand than the original. And it is super laborious to do a lot of set up code when using buffer previously.

@@ -70,14 +44,21 @@ class BroadcastOneToAll : public Algorithm {
return;
}

auto clearToSendBuffer = context_->createUnboundBuffer(nullptr, 0);
Copy link

Choose a reason for hiding this comment

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

N00b question why this is even needed? Is it because we need to wait for the receiver to be ready?

@facebook-github-bot facebook-github-bot merged commit 4ecd9ce into main May 3, 2025
7 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants