Skip to content

chore: fast paths for distributed functions, remove obsolete wrapper#96

Merged
HennerM merged 6 commits intomainfrom
chore/refactor-dist-gather
Mar 4, 2026
Merged

chore: fast paths for distributed functions, remove obsolete wrapper#96
HennerM merged 6 commits intomainfrom
chore/refactor-dist-gather

Conversation

@HennerM
Copy link
Copy Markdown
Collaborator

@HennerM HennerM commented Mar 3, 2026

We provide convenience methods for some of the communication collectives, one main reason for that is they work in both distributed as well as non-distributed code. However in the none-distributed path we still were doing some work such as moving the data from cpu to gpu or vice versa. We can always avoid doing this work, reduce and gather ops should be noops if we only have one process.

Another simplification is to remove the custom autograd function for gather. PyTorch added support for gradients in all_gather some time ago: pytorch/pytorch#40762, thus we can just use the normal all_gather functions

@HennerM HennerM force-pushed the chore/refactor-dist-gather branch from aa66166 to f9eb14b Compare March 3, 2026 10:47
Copy link
Copy Markdown
Member

@Ndles Ndles left a comment

Choose a reason for hiding this comment

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

👍

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 4, 2026

Coverage

Tests Skipped Failures Errors Time
1051 12 💤 0 ❌ 0 🔥 30.463s ⏱️

@HennerM HennerM force-pushed the chore/refactor-dist-gather branch from 3c94516 to 6fa4a0d Compare March 4, 2026 13:01
@HennerM HennerM force-pushed the chore/refactor-dist-gather branch from 31fa5b1 to ad6b1f4 Compare March 4, 2026 13:48
@HennerM HennerM merged commit f6b7b5a into main Mar 4, 2026
8 checks passed
@HennerM HennerM deleted the chore/refactor-dist-gather branch March 4, 2026 13:50
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 4, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants