Repository navigation
Conversation
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
Signed-off-by: Jack Chang <jianbinc@nvidia.com>
This branch has not been deployed
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.
What does this PR do?
Add iteration-scoped MFSDP v2 demand recording and cursor-based replay for VPP chunk revisits and mixed forward/backward execution in combined 1F1B. The iteration scope owns recorded cursor resets; static F/B cursors reset in root hooks outside a scope. No explicit prefetch calls are added to the compute plan. This remains a work-in-progress: GPU replay has a synchronization stall described below.
Depends on #8207. The branch includes its unmerged commit; review the incremental implementation.
(weakref(owner), phase)occurrences in anExecutionOrder, including repeated materialized owners. Prefetch gathers never enter the recording.ExecutionOrder.advance(),next_item(offset), andreset()for execution progress.IterationOrderowns a separate monotonic prefetch position and the recording/cache lifecycle. The execution cursor validates each observed demand; the prefetch cursor advances monotonically, independently of buffer materialization. Missing, extra, or changed demand invalidates the cached order; failed recordings are discarded.ExecutionOrderremoves_unique_indexand the item argument toadvance(), with an explicitreset()instead of automatic wrapping. The caller validates each returned occurrence.ExecutionOrderstores generic payloads directly; static F/B callers supply weak module references, and iteration callers supply weak module/phase pairs.next_item(offset)looks ahead from the last consumed occurrence without advancing execution. Repeated calls to the same module retain distinct successors. Static prefetch size accounting, budgets, and all-gather calls remain inFsdpModule;ExecutionOrderhas no dependency on that class. Outside a scope, only the first root in each static F/B order resets that cursor; later roots continue it. This preserves unscoped execution of independent roots sharing a context. Comments explain why resetting every root would restart the cursor mid-pass. Recomputation skips the forward reset, and validation leaves backward progress untouched.ExecutionOrderinstances containing paired weak module references and phase metadata. Execution progress is delegated to that order; strict replay validation and the separate prefetch position remain inIterationOrder. No static-order wrapper/cache is introduced.Validation
Not ready for review: 8-H100 combined VPP replay stalls in the eager reference on the second iteration. With default batched P2P, the stack stops in device-wide synchronization; disabling that synchronization moves the stall to MoE token dispatch stream synchronization. Separate cursors do not resolve speculative collective ordering across communication boundaries.
Historical validation on
6ae867597(before removingtest_pipeline_schedulers.py): 44 focused tests on 8 H100 GPUs: static cursor/prefetch, iteration/checkpoint, context, SGD across sharding strategies and accumulation counts, mixed-precision Adam, optimizer synchronization, sibling-root NVTX, checkpoint roundtrips and packed chunks, and combined 1F1B numerical tests (delayed wgrad on/off). Both checkpoint variants cover ordinary and recorded execution. Reset spies verify five forward resets and three backward resets for unscoped training/validation, and zero root-hook resets inside iteration scopes. The original unscoped shared-root fixtures are restored, including three consecutive forward passes in the shared-context test. Static cases assert prefetch-before-demand, including on the first step. The two VPP tests were excluded from that passing selection. The scheduler test file, including its two combined 1F1B cases, has since been removed from this PR.Profiler limitation: the two selected existing overlap/budget tests fail in the unchanged profiler helper because this container's
FunctionEventlackslinked_correlation_id. No overlap timing result is claimed. Repository-wide CI remains unvalidated.Eight source-level order/recorder checks pass, including paired weak-reference payloads, repeated occurrences, budget handling, and prefetch progressing independently of execution. Four GPU checkpoint cases are excluded from this local harness and covered by the GPU selection above. Ruff, isort, formatting, and whitespace checks pass. Local formatting used Black 24.4.2; repository-wide formatting/CI remains pending.
Limits
Requires a stable compatible schedule across DP peers. A local divergence exception is not a distributed recovery protocol. Iteration recording is disabled for CUDA graph schedules; graph recording/replay lifecycle support and throughput/peak-memory validation are deferred.