[Test][SM70] Validate QSA allocation repair on the NVFP4 decode lane - #525
Merged
yangzhuxinyzx merged 14 commits intoSep 6, 2026
Merged
Conversation
Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Keep aligned low-rank rows packed, preserve unaligned output support and the existing protocol. Full-HC scalar/vector owner-DSO gate: 1.971644 -> 1.899800 ms, bitwise on all ranks with auxiliary sum2. Public standalone oracle queued; full-model target remains pending. Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Keep physical deduplication and masks while ordering grouped and XQA plans by logical ownership. Add allocation-invariance regressions and document the causal investigation, upstream alternatives, and measured cost. Co-authored-by: OpenAI Codex <noreply@openai.com> Signed-off-by: Leonccaa <166551845+Leonccaa@users.noreply.github.com> (cherry picked from commit 5fa8a60) Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Reuse the original PR494 implementation on the frozen PR507 lane. Add actual 400-token-page geometry and old/fixed/reversal controls for captured model inputs. Record the completed same-engine token-fork intervention separately from pending native-state quality acceptance. Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Keep checkpoint-native SSM state, add the resulting 784-token page geometry, and record successful repeated-logit, natural-EOS, dispersed-retrieval and detached endpoint checks. Measured pure decode is 97.90513 tokens/s; do not confuse the historical FP16 control total request time with pure decode. Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Contributor
Author
Preserve the tested QSA/HC/router production source and page400/page784 regressions. Retain the already merged PR494 implementation and the independent AWQ/PP changes from current main. This merge does not claim a new endpoint measurement. Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
Use accelerator control APIs in standalone probes, apply required C++ and Markdown formatting, and expand a commit SHA misidentified as a typo. Record main synchronization and 27 passing CPU dispatch tests. Preserve the prior measured-model quality and performance scope. Assisted-by: OpenAI Codex Signed-off-by: yangzhuxinyzx <153831768+yangzhuxinyzx@users.noreply.github.com>
yangzhuxinyzx
changed the base branch from
codex/v100-qwen38-qsa-router-exact-20260905-105924
to
main
September 6, 2026 08:57
yangzhuxinyzx
marked this pull request as ready for review
September 6, 2026 09:03
This was referenced Sep 6, 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.
Purpose and dependencies
NVFP4 quality integration and regression, now targeting
maindirectly at the user's merge request. Originally stacked on #507; its tested #506/#507 commits remain ancestors and will enter main with this merge. Synchronized public main:4366d9d5fe80eeaf79575b51ec36a6a032673df0(merge2168a13bc9); original numerical baseline base remains755baae1d075ee04fa9096b23fc0225b23589a86.This is not a competing fix for #494. It reuses Leonccaa's original commit
5fa8a605dab12cc9ee15459d9ac6b88d95c7be3awith original author and cherry-pick provenance preserved. #494 is now already merged into main; its planner repair is no longer a new implementation diff here. This integration supplies the tested NVFP4 decode optimizations from #506/#507, previously missing real NVFP4 quality evidence, actual400/784-token-page regressions, and causal replay tooling.Root cause / test results
Contract and acceptance limits
Qwen3.8 native NVFP4 experts/TurboMind W4A16; TP4/PP1 V100-SXM2-32GB; FP16 activation/KV, no MTP or prefix cache; max262144, chunk8192, V2 dual FULL_AND_PIECEWISE, hybrid mmap/pinned-UVA PLE. Torch2.10.0+cu128, NVCC12.0.140, driver580.173.02. At the actual model-tested head, production source differed from the frozen speed lane only by reused #494. The subsequent main synchronization preserves tested QSA/HC/router and Flash-V100 computation, while retaining main's independent AWQ/PP/load-allocator changes. It is not a fresh endpoint measurement of updated main.
The causal control deliberately retains the old launcher's explicit FP16 SSM override, though the checkpoint specifies FP32. The second run restores auto→nativeFP32 state and passes the bounded checks above. Native-state attention pages are784tokens (400in the F16control), both covered by logical-plan regression. It is not safe to declare every numerical/kernel gate complete from allocation stability and these bounded task checks. Known GDN/W13 rounding-reference gaps remain separately tracked. No broad dataset quality certificate is claimed.
The observer-detached FP16 control lacked request statistics: its6.35s total request time includes prefill and must not be labeled pure decode or used to assert98.965tok/s is preserved. Native-state tests enable separated metrics and supply the97.90513result above. Both model loads and the follow-up tiny operator test exited normally; no resident GPU service or backgroundqueue remains from this task.
See
docs/design/sm70_qwen38_nvfp4_quality_repair.mdfor source/binary hashes, measured controls and limitations. Large tensors, weights, local paths and build outputs are not committed. Local artifact families:operator/real_replay.json,operator/pytest{,_page784}.xml,model_f16/{result,analysis}.json,model_native_f32/{result,analysis}.json,state_contract_comparison.json, and exact retained quality-input manifests.Merge-time validation
-27CPU HC/QSA/router dispatch tests pass on synchronized main; no GPU/model startup.
-The old CI failure was diagnosed from job101447098235: clang-format, Markdown spacing, a short commit-SHA typo false positive, and deprecated device/synchronization/cache APIs in three standalone verification scripts. These are fixed without changing production arithmetic or disabling checks.
-All targeted pre-commit hooks pass; wait for the updated GitHub check before merging. No admin/protection bypass or direct main push.
Review
AI assistance: OpenAI Codex. Original #494 author attribution is preserved; new commits are DCO signed. The user explicitly requested merge on2026-09-06 after the passing bounded quality results and remaining GDN/W13 limitations were reported. This records merge authorization, not a claim that the user independently reran the tests or that every numerical audit is complete. Do not promote the old speed record as a universal no-token-reversal certificate.