mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[PR #399] fix: SM90 paged mqa prefix_sum out of range (CUDBG_EXCEPTION_WARP_OUT_OF_RANGE_ADDRESS) #418
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepGEMM#418
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepGEMM/pull/399
Author: @cjackal
Created: 8/5/2026
Status: 🔄 Open
Base:
main← Head:sm90-paged-mqa-logits-warp-out-of-range📝 Commits (1)
75d9d49fixprefix_sumout of index error📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
deep_gemm/include/deep_gemm/scheduler/sm90_paged_mqa_logits.cuh(+1 -1)📄 Description
Description
In
sm90_paged_mqa_logits.cuh, we computenum_segsusing diff ofprefix_sum, but current diff calculation logic is unsafe asq_idxcan bebatch_sizeafter the binary search which is out of bound ofprefix_sumifbatch_sizeis aligned. In this case, we should instead refer to the already computed segment sum (the would-beprefix_sum[batch_size]).The overall math is trivial, so no further comments added in this ternary.
We have hit this error in production, the following is the CUDA coredump -
sm90_paged_mqa_logits_metadata<kAlignedBatchSize=96, SPLIT_KV=256, kNumSMs=132, kIsVarlen=false>hits the problematic line with 16 sequences with next_n=6:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.