Repository navigation
[graph_trainer][perf] Extract noAllGather FSDP1 parameter prep in UNSHARD for PP - #5392
Merged
IvanKobzarev merged 1 commit intoOct 14, 2026
Conversation
IvanKobzarev
force-pushed
the
ivan/graph-trainer-pp-fsdp1-noag-unshard-20261014
branch
from
October 14, 2026 14:40
20ef203 to
000a081
Compare
IvanKobzarev
force-pushed
the
ivan/graph-trainer-pp-fsdp1-noag-unshard-20261014
branch
from
October 14, 2026 14:43
000a081 to
72e30f7
Compare
IvanKobzarev
marked this pull request as ready for review
October 14, 2026 14:47
IvanKobzarev
requested review from
SherlockNoMad,
aditvenk,
sanketpurandare and
tianyu-l
as code owners
October 14, 2026 14:47
| output = _unshard_output_from_all_gather(last_all_gather) | ||
| if user.meta.get("autograd_backward", False) or not fsdp_param_fqns(user): | ||
| continue | ||
| # FSDP1 will not have all-gather, but we want to extract cast and quantization |
Contributor
There was a problem hiding this comment.
at first glance, I thought fsdp1 mention the old implementation of FSDP, in contrast of FSDP2 impl.
but you mean the case for FSDP=1, or noFSDP
Contributor
Author
There was a problem hiding this comment.
yeah, sorry, I meant no fsdp, fsdp=1. Completely forgot about old FSDP1 :)
SherlockNoMad
approved these changes
Oct 14, 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.
In case of no-FSDP parameters include some preparation ops, that must be done only once.
E.g. quantization, casts.
We do not want to repeat them in every microbatch and extract them with FSDP all-gather chains into UNSHARD action.
Previously we did not run this extraction for FSDP1 case which resulted in duplication of quantization in every microbatch action.
This PR enables this extraction for PP and no FSDP.