[Dev] Scope FSDP symmetric UBR to dense inner gathers - #6318
Draft
lhb8125 wants to merge 3 commits into
Draft
Conversation
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.
Summary
fsdp_ubr_registration_scope=dense_innermode that registers only the dense inner-FSDP parameter-AllGather communicatorallregistration scope as the defaultThe scoped mode targets HSDP workloads where dense inner AG dominates overlap pressure while expert outer-DP communication is small. Rank-offset HSDP ReduceScatter outputs are intentionally excluded because the current symmetric-window path requires identical pool-relative offsets across ranks.
This PR deliberately does not include
fsdp_ubr_arena_segment_bytes: 5.8 GB, 4 GiB, and 2 GiB registration attempts all failed on the same unintended SPCX GIN path, while restoring the intended built-in GDAKI path made the unsegmented design work. Arena segmentation is therefore not a demonstrated Megatron requirement.Stack
This Draft PR is stacked on #6317, which is stacked on #6316. It should be reviewed as the single
perf(fsdp): scope symmetric UBR to dense inner gatherscommit after the prerequisite PRs merge and the branch is rebased ontodev.Test plan
CHECK_ONLY=true BASE_REF=dev ... tools/autoformat.sh: Black, isort, pylint, and ruff passncclSymkDevKernel_AllGather_RailRing_LsaSTMC, reduced the matching ordinary-ring grid from 16 to 8, and reduced aggregate dense AG kernel time by 31.36%The local toolkit lint environment does not contain PyTorch, so pytest and mypy imports are deferred to CI/container validation.
🤖 Generated with Codex