Repository navigation
Conversation
Signed-off-by: Yan Xu <yxu1@nvidia.com> (cherry picked from commit 915d73c) Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Use the training compressed-first order for deterministic no-grad forwards, preserving the existing default-mode order. Add dispatch coverage and real learned-indexer forward parity tests for zero and positive sparse KL loss. Adapted from Bo Li (@bobboli)'s Megatron-LM PR NVIDIA#7169. The existing stable Top-K helper also originates in that PR. Deterministic sparse-attention and indexer backward in this series builds on Haochen Yuan (@HaochenYuan)'s PR NVIDIA#7441, with our batch-indexing and clipped-KL corrections in NVIDIA#7706. Co-authored-by: Bo Li <22713281+bobboli@users.noreply.github.com> Signed-off-by: Yan Xu <yxu1@nvidia.com> (cherry picked from commit 3989b77) Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Use 128 TopK slots in the learned-indexer forward-parity fixture. The positive sparse-loss path requires a multiple of the cuDNN attention score-recompute kernel's 128-key tile. The 32 compressed keys are padded by the existing stable selector; production behavior is unchanged. Signed-off-by: Yan Xu <yxu1@nvidia.com> (cherry picked from commit cc6e840) Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Signed-off-by: Yan Xu <yxu1@nvidia.com> (cherry picked from commit a64d341) Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Use compressed-first indices in deterministic packed forwards regardless of grad mode, compacting no-grad indices as in training. Enforce sink-only padding at both attention wrapper boundaries without mutating caller data. Add real CP1/2/4 forward parity and focused wrapper regressions. Extends Bo Li (@bobboli)'s key-ordering approach from PR NVIDIA#7169 to main's packed CP implementation; that PR explicitly left CP ordering for follow-up. The wrapper padding guard is adapted from the same PR. Existing deterministic backward builds on Haochen Yuan (@HaochenYuan)'s PR NVIDIA#7441 and the batch/KL corrections in NVIDIA#7706; this commit adds the packed forward contract. Co-authored-by: Bo Li <22713281+bobboli@users.noreply.github.com> Signed-off-by: Yan Xu <yxu1@nvidia.com> (cherry picked from commit 8e2d0fe) Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Signed-off-by: Deyu Fu <deyuf@nvidia.com>
|
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. |
Contributor
Author
|
/ok to test 4ee3ca5 |
Keep BF16 intermediate rounding consistent between compiled inference and AOTAutograd forwards when deterministic_mode is enabled. Preserve the default compiled path and the existing packed end-to-end bitwise assertions. Add registered grad-mode parity and gradient replay coverage for BF16/FP32 and contiguous/transposed inputs. Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Contributor
Author
|
/ok to test 38463cb |
Contributor
|
/ok to test 5c348b0 |
Preserve the compiled low-precision path and the default query norm while avoiding grad-mode compiler differences for FP32. Keep strict parity checks and add a regression for the FP32 dispatch boundary. Signed-off-by: Deyu Fu <deyuf@nvidia.com>
Contributor
Author
|
/ok to test 4185405 |
This branch was previously 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.
Purpose and relationship to the existing ports
Draft main-based companion for #7441, completing its packed THD/static-CP attention/indexer determinism coverage. The automated Mirror Dev to Main run for #7441 did not create a mirror: the source PR has no
mirror-to-mainlabel. The previous packed integration #7921 is closed without merging.This is intentionally not a second monolithic copy of every #7441 change:
The branch starts from main
3bb482c487cd447a2b40a3bf076ab14cad514e13and temporarily carries the three shared #7708 commits. Please land/reconcile #7708 first, then rebase this draft to keep the remaining packed-only diff. Its current scope includes the shared prerequisite so the branch is buildable against main; it does not target a botpull-request/*branch.Changes
cp_utilsuse and the packed port'spacked_sparse_attentionuse.Scratch allocation follows #7708's per-call cuDNN allocation strategy. This does not copy #7441's shared device-global workspace cache or resolve the outstanding review on that dev implementation.
Attribution
Original deterministic DSv4 work: Haochen Yuan (@HaochenYuan), #7441. Stable Top-K/forward-ordering approach: Bo Li (@bobboli), #7169. Main shared and packed adaptations, batch-local indexing and clipped-KL corrections: Yan Xu (@Connor-XY), #7708 / #7706 / #7921. Cherry-picked commits retain original authors, co-author trailers, source SHAs and sign-offs, with signed Deyu Fu adaptation commits.
Validation on this branch
BASE_REF=main CHECK_ONLY=true bash tools/autoformat.sh: mandatory Black/isort/pylint/ruff checks passed for all nine changed files.git diff --checkand local signature/sign-off verification passed.Validation boundary: Osaka has no GPU. These isolated CPU probes bypass GPU package/conftest initialization and stub kernel/collective work; they do not certify CUDA, CP1/2/4, graph replay, or the rebased branch's end-to-end numerics. Optional mypy still reports missing training dependencies/existing typing issues and is not certified clean. The earlier GB300 results documented in #7708/#7921 are provenance, not a claim that this new head passed GPU tests.
Keep this PR draft pending exact-head GPU CI (including the real packed CP and SM100 cases), reconciliation with #7708, and the required reviews. No performance claim and no whole-recipe determinism certification are made.