graph_trainer: unify chunked grad collective normalization - #3953
Draft
sanketpurandare wants to merge 4 commits into
Draft
graph_trainer: unify chunked grad collective normalization#3953sanketpurandare wants to merge 4 commits into
sanketpurandare wants to merge 4 commits into
Conversation
[ghstack-poisoned]
This was referenced Jul 21, 2026
…tive normalization" ## Summary Normalize duplicate chunk-local parameter-gradient collective chains after either eager or graph chunking. Compatible chunk gradients are accumulated before a single all-reduce or reduce-scatter, and any wait, view, or dtype-cast suffix is replayed once on the normalized result. ## Why Dense FSDP and EP schedulers should see the same gradient buckets regardless of how the two chunks were produced. A shared post-chunking pass keeps that contract in one place and avoids producer-specific scheduling behavior. ## Test Plan - Trace real SimpleFSDP eager and graph chunk paths in replicate and fully-sharded modes. - Verify eager duplicate collectives normalize and graph collectives remain canonical. - Exercise suffix replay through a naturally produced mixed-precision cast. [ghstack-poisoned]
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stack from ghstack (oldest at bottom):
Summary
Normalize duplicate chunk-local parameter-gradient collective chains after
either eager or graph chunking. Compatible chunk gradients are accumulated
before a single all-reduce or reduce-scatter, and any wait, view, or dtype-cast
suffix is replayed once on the normalized result.
Why
Dense FSDP and EP schedulers should see the same gradient buckets regardless
of how the two chunks were produced. A shared post-chunking pass keeps that
contract in one place and avoids producer-specific scheduling behavior.
Test Plan
fully-sharded modes.
canonical.