Skip to content

return work from manager allreduce #247

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 3 commits into from
Aug 1, 2025
Merged

Conversation

tushar00jain
Copy link
Contributor

@tushar00jain tushar00jain commented Jul 26, 2025

Summary:
use http transport instead of pg transport -- pg transport fails to resolve address when running locally
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 26, 2025
@tushar00jain tushar00jain changed the title wait for futures while syncing fragments return work from manager allreduce Jul 26, 2025
@tushar00jain tushar00jain force-pushed the pr247 branch 3 times, most recently from 48daf18 to e6715b0 Compare July 26, 2025 02:48
@tushar00jain tushar00jain force-pushed the pr247 branch 4 times, most recently from 843854d to 1bfb3d8 Compare July 26, 2025 19:11
@tushar00jain tushar00jain requested a review from d4l3k July 28, 2025 22:13
Copy link
Member

@d4l3k d4l3k left a comment

Choose a reason for hiding this comment

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

LGTM

fut = fut.then(callback)
return fut
fut.add_done_callback(callback)
return work
Copy link
Member

Choose a reason for hiding this comment

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

should this be using _WorkWrapper ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's returned by manager. the manager calls this method inside allreduce

@tushar00jain tushar00jain force-pushed the pr247 branch 10 times, most recently from 411ae90 to fd371a7 Compare July 31, 2025 02:47
Summary:
- call future.wait in callbacks to make sure the continuation executes after the future has completed
- set the stream correctly to execute callback scheduled by bucketized allreduce
Summary:
returns the work object so we can be more flexible with the usage
@tushar00jain tushar00jain merged commit 500ee32 into pytorch:main Aug 1, 2025
16 checks passed
@tushar00jain tushar00jain deleted the pr247 branch August 1, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants