Repository navigation
Conversation
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Merge current main and preserve runtime context-parallel group restoration. Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Author
|
I merged current main and reran the attention and MLA clipping paths plus TE replay on H100. Runtime-CP group restoration and logit-buffer reuse are covered in the updated replay path. The remaining file-level determinism gate maps |
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
Author
|
@asolergi-nv, |
Signed-off-by: ZenAlexa <zimingwang945@gmail.com>
Signed-off-by: ZenAlexa <zimingwang945@gmail.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.
Why
CUDA Graph replay executes captured device operations without repeating Python assignments. Replacing
current_max_attn_logitsafter each forward therefore fails to maintain a cross-microbatch accumulator across graph replays and optimizer steps. Clipping and log-only consumers need a stable accumulator that they can reset without replacing the captured storage.Fixes #7475. This change addresses the reproduced accumulation failure; the separate freed-buffer hypothesis in the issue has not been established.
What changed
Float16Moduleusing the existingmark_keep_in_fp32contract.torch.maximum(..., out=...), retaining the same storage through capture, replay, consumption, and reset.Runtime context-parallel group selection and restoration retain the current main implementation. The accumulator is runtime state and is omitted from checkpoints.
Verification
The September 25 H100 80GB run incorporated main at
8c487209a2ae6eeb276c8244a6495a28950321afand used PyTorch2.8.0a0+5228986c39.nv25.06, Transformer Engine2.19.0, and cuDNN9.26:SelfAttention, eager versus graph forward/backwardScoped Black, isort, and Ruff checks passed for that revision. The current head
8114206dacb5ac81a253d419111606c8171c0bc9merges main at159b443c3e1a23ff68321973b936fef810bb3c61. Current-source checks covered the buffer dtype-preservation path, capture cleanup, standard-attention and MLA clipping, optimizer logging, and runtime CP-group restoration;git diff --checkpassed.The focused GPU entry point is:
uv run python -m torch.distributed.run --standalone --nproc-per-node 1 \ -m pytest -q \ tests/unit_tests/transformer/test_attention.py::TestClipQK \ tests/unit_tests/transformer/test_multi_latent_attention.py \ tests/unit_tests/determinism/kernels/test_te_wrappers.py::TestTEWrappers::test_te_dot_product_attention_replays \ -k 'clip_qk or dot_product_attention_replays'The current merged head has no new GPU execution; the historical measurements cover single-rank execution, and multi-rank execution, full MLA graph training, and the complete TE capture pipeline require validation. The file-level determinism gate's mapping to unrelated compiled-activation and packed-runtime-CP kernels needs a maintainer decision on its coverage requirement.
current mainline validation
merged
c4334de9into7b887f87on 2026-10-13.the merge commit is signed, and the eight changed python files passed black 26.3.0 and isort 5.13.2. current source review followed the statistic buffer through precision conversion, accumulation, optimizer reset and graph-capture cleanup. cuda graph replay and transformer-engine execution were not rerun for this merge. earlier gpu results remain tied to their recorded revisions.
Project CI: Please run current-head multi-rank graph training and the complete Transformer Engine capture/replay checks on the project runners, including MLA, and confirm the applicable determinism selection. The CPU checks and historical single-rank GPU results above retain their stated coverage.