[https://nvbugs/6276981][fix] Force the q-split + allgather code path whenever q_split_eligible=True (drop…#15474
Open
tensorrt-cicd wants to merge 1 commit into
Open
Conversation
Contributor
|
Caution Review failedAn error occurred during the review process. Please try again later. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
290fdfd to
9b45f57
Compare
…n eligible When the indexer chunked-prefill is gated by q_split_eligible (TP > 1, no attention DP) but apply_q_split is False (chunk smaller than q_split_threshold), every TP rank computes the full chunk's topk indices independently via fp8_mqa_logits / fp8_fp4_mqa_logits. Those DeepGEMM kernels are not bit-exact across launches, so per-rank topk indices diverge for the same tokens. The downstream MLA attention then attends to different KV positions on different ranks, corrupting KV-cache writes. Short generations (MMLU's 2-token answers) hide it; long ones (GSM8K's 256 tokens) compound it into garbage and 0% accuracy. Force the q-split + allgather path whenever eligible: small chunks pay a microscopic allgather instead of redundant per-rank logits compute, and the per-token canonical owner from the slice + allgather erases any rank-local nondeterminism before downstream layers read the indices. q_split_threshold < 0 still fully disables eligibility. Signed-off-by: tensorrt-cicd <90828364+tensorrt-cicd@users.noreply.github.com>
9b45f57 to
69844b1
Compare
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.
Summary
Test plan
Links
Summary by CodeRabbit
Release Notes
Performance
Tests