mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[GH-ISSUE #237] [Bug] k_grouped_fp8_gemm_nt_contiguous crashes with n = 768 on H100 #133
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#133
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?
Originally created by @xinqiu on GitHub (Dec 2, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/237
First of all, thank you for the amazing work on DeepGEMM — it's been extremely helpful.
While integrating DeepGEMM into a backward pass implementation, I encountered a reproducible crash when running the k-grouped FP8 GEMM with N = 768.
❗ Error
Running DeepGEMM with the following shape causes a CUDA illegal instruction error:
🔁 Reproduction
The issue reproduces consistently by adding the following shape into
enumerate_k_grouped_contiguous:This triggers the following call path:
k_grouped_fp8_gemm_nt_contiguousNotably, the same configuration works correctly when N = 1536, so the issue appears to be specific to
N = 768.🧩 Expected Behavior
The kernel should run successfully for
(groups=128, M=2048, N=768, K=4096)without causing an illegal instruction.🧪 Environment (if helpful)
🙏 Additional Notes
If you need further logs or want me to test a patch, I’m happy to help.
Thanks again for the excellent work on DeepGEMM!
@LyricZhao commented on GitHub (Dec 5, 2025):
cc @zheanxu, please take care of it when you are free.
@zheanxu commented on GitHub (Dec 5, 2025):
Thank you for reporting this issue.
After investigation, we found that this bug occurs when
mandnare relatively small. In the SM90 K Grouped GEMM implementation, the tensor map forgroup[i+1]is prefetched while processinggroup[i].However, when the number of blocks in
group[i]is small (specifically, whenceil_div(m, block_m) * ceil_div(n, block_n)is less thanthe number of SMs), the next group to be processed is not necessarilygroup[i+1]. In this scenario, using the incorrect tensor map leads to an illegal instruction error.We will fix this shortly. Thanks again!
@xinqiu commented on GitHub (Dec 5, 2025):
#238 I made a few simple modifications to get it working properly first