mirror of
https://github.com/deepseek-ai/DeepGEMM.git
synced 2026-11-05 00:47:26 +00:00
[GH-ISSUE #235] [Question] Contiguous Grouped Gemm for CUDA Graph #135
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#135
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 @yuhyao on GitHub (Nov 28, 2025).
Original GitHub issue: https://github.com/deepseek-ai/DeepGEMM/issues/235
Hi DeepSeek team,
I noticed that DeepEP provides an optional
num_worst_tokensargument for CUDA Graph usage. Based on that, I assume contiguous Grouped GEMM is also intended to support CUDA Graph. However, it seems there is no input parameter to supply a valid m for the actual workload. While we can setm_indicesto -1 for padded tokens, performance degrades significantly becauseis_computation_validonly skips the compute blocks, whereas the TMA loads are still issued for those padded regions.Did I misunderstand something here, or is there a plan to address this limitation?
Thanks!
@LyricZhao commented on GitHub (Dec 5, 2025):
num_worst_tokensis supported by the community (maybe with their own GEMM kernels). In DeepSeek, we never usenum_worst_tokens(prefill without CUDA graph).We are releasing EPv2 soon, normal/low-latency layout will be merged into a single contiguous layout then. DeepGEMM will also provide the masked/non-masked API.
@yuhyao commented on GitHub (Dec 8, 2025):
Thanks for the reply. It’s exciting to hear that DeepEP v2 is coming soon!
Please allow me to double-check my understanding: the low-latency mode in DeepEP v2 will also use contiguous layout, so that the input and output buffers for grouped GEMM consumes less memory compared to the current low-latency layout when number of experts per rank is larger than
num_experts_per_tok?