Refine MFSDP v2 configuration validation - #6333
Open
wujingyue wants to merge 2 commits into
Open
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
wujingyue
force-pushed
the
agent/mfsdp-v2-ignore-partial-distopt
branch
2 times, most recently
from
August 6, 2026 23:55
a713f67 to
107da0b
Compare
wujingyue
commented
Aug 6, 2026
| raise ValueError("MFSDP v2 does not currently support communication overlap modes.") | ||
| if config.gradient_accumulation_fusion: | ||
| raise ValueError("MFSDP v2 does not currently support gradient accumulation fusion.") | ||
| if config.calculate_per_token_loss: |
Contributor
Author
There was a problem hiding this comment.
MFSDP v2 unconditionally overlaps reduce-scatter and parameter all-gathers, and always uses double buffering. We intentionally accept and ignore the legacy overlap_grad_reduce, overlap_param_gather, and fsdp_double_buffer flags for compatibility: their defaults are False, so rejecting those values would require every existing v2 caller to override them just to preserve current behavior. The tradeoff is that setting them to False does not disable v2 overlap or double buffering.
wujingyue
force-pushed
the
agent/mfsdp-v2-ignore-partial-distopt
branch
from
August 7, 2026 00:49
107da0b to
c60c1de
Compare
wujingyue
commented
Aug 7, 2026
Contributor
Author
|
/ok to test c60c1de |
wujingyue
force-pushed
the
agent/mfsdp-v2-ignore-partial-distopt
branch
from
August 7, 2026 03:41
c60c1de to
6b81672
Compare
Contributor
Author
|
/ok to test 6b81672 |
wujingyue
force-pushed
the
agent/mfsdp-v2-ignore-partial-distopt
branch
from
August 10, 2026 18:47
00754c1 to
c9cd3f1
Compare
Signed-off-by: Jingyue Wu <jingyuew@nvidia.com>
wujingyue
force-pushed
the
agent/mfsdp-v2-ignore-partial-distopt
branch
from
August 11, 2026 03:44
c9cd3f1 to
c635c4d
Compare
Signed-off-by: Jingyue Wu <jingyuew@nvidia.com>
wujingyue
force-pushed
the
agent/mfsdp-v2-ignore-partial-distopt
branch
from
August 11, 2026 03:52
c635c4d to
e5eb20c
Compare
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
fully_shard_context(use_symmetric_memory=ddp_config.nccl_ub). Reject only the incompatible combination of NCCL user buffers with disabled symmetric registration.fsdp_all_gather_in_start_param_sync=Trueas a v2 no-op. MFSDP v2 gathers parameters from forward pre-hooks, sostart_param_sync()does not issue an all-gather.Validation
isort --check-onlyandruff checkon the changed adapter and test filespython -m torch.distributed.run --nproc-per-node 2 -m pytest -q tests/unit_tests/distributed/mfsdp_v2/test_mcore_adapter.py(3 passed)git diff --check