Skip to content

feat(recompute): coordinate checkpoint-without-output recomputation - #5935

Closed
FDecaYed wants to merge 1 commit into
NVIDIA:mainfrom
FDecaYed:codex/checkpoint-manager
Closed

feat(recompute): coordinate checkpoint-without-output recomputation#5935
FDecaYed wants to merge 1 commit into
NVIDIA:mainfrom
FDecaYed:codex/checkpoint-manager

Conversation

@FDecaYed

@FDecaYed FDecaYed commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What

Extend CheckpointWithoutOutput so it can safely coordinate several sequential checkpointed operations:

  • preserve mixed tensor and non-tensor arguments through recompute;
  • return None gradients for metadata arguments;
  • add a CheckpointManager that discards all managed outputs and registers one ordered recompute hook;
  • preserve CUDA-graph capture behavior;
  • add focused unit coverage for argument restoration, hook ordering, storage reuse, gradients, and edge cases.

This reusable recompute primitive is the root of the HybridModel mHC lane, but contains no mHC, model, or GPTModel code itself.

Provenance

Testing

  • uv run isort --check-only on both changed Python files
  • uv run ruff check on both changed Python files
  • uv run python -m compileall -q on both changed Python files
  • Focused tests are included; local execution requires the project Torch runtime and is left to CI.

Stack follow-up

Support mixed tensor and metadata arguments and coordinate sequential CheckpointWithoutOutput instances behind one recompute hook.

Signed-off-by: Deyu Fu <Deyu.Foo@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

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.

@FDecaYed

Copy link
Copy Markdown
Contributor Author

/ok to test 18e842a

Copy link
Copy Markdown
Contributor Author

Closing this draft because the generic checkpoint-without-output/mHC contract is supplied by external prerequisite #4531. The later P2 PR will be a focused HybridModel/fused-mHC delta after #4531 and P1 merge. Tracking PR: #5795.

@FDecaYed FDecaYed closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant