[https://nvbugs/6276981][fix] Force the q-split + allgather code path whenever q_split_eligible=True (drop… - #15474
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughThe sparse attention indexer now applies q-splitting to all eligible prefill chunks. It also gathers per-rank top-k indices for the same eligibility condition. The negative threshold remains a disabling condition. ChangesQ-split logic update
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
9b45f57 to
69844b1
Compare
|
NVBug 6276981 is closed as Bug - Fix unknown. The linked bug appears resolved elsewhere or for a reason that does not prove this PR is redundant. This PR should be judged on its own merits; repair-bot is not auto-closing it. |
…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>
69844b1 to
b3ee62f
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
Test plan
Links
Dev Engineer Review
Indexer.sparse_attn_indexerso eligible prefill chunks always use q-splitting and allgather.chunk_num_token >= q_split_thresholdcondition.q_split_threshold < 0as the disable condition.topk_indices_bufferand avoids rank-dependent DeepGEMM results.QA Engineer Review
No test changes.