mirror of
https://github.com/deepseek-ai/DeepEP.git
synced 2026-11-05 00:47:32 +00:00
[GH-ISSUE #505] [Question] Question on using num_worst_tokens #326
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/DeepEP#326
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/DeepEP/issues/505
Hi DeepSeek team,
I noticed that
num_worst_tokensis included in the arguments of dispatch, which makes sense for CUDA Graph support. However, it seems that the values written tomoe_recv_counterandmoe_recv_expert_counterare no longer directly accessible. From the code, it looks like these counters can be recomputed fromrecv_topk_idx, since padded entries are set to-1.The prefill trace also doesn’t show any H2D memcpy after the dispatch kernel, so I assume you are recomputing those counters inside another kernel?
Would it be possible to write these counters into CUDA tensors directly? For example, open-source projects like SGLang simply copy
num_recv_tokens_per_expert_listto device memory. Having these values available on CUDA would make it easier to switch to CPU-async mode and may also help avoid redundant memory accesses.Thanks!
@LyricZhao commented on GitHub (Dec 5, 2025):
We don't have CUDA graph in prefill, and we use
num_recv_tokens_per_expert_listjust for backward. For contiguous GEMM's input, we have aget_fused_mappingkernel to do the compute fromtopk_idx.We are releasing V2 soon, by then, the dispatched results will automatically expand tokens into experts and return a layout for the GEMM as well.
@yuhyao commented on GitHub (Dec 8, 2025):
Thanks for the reply, and thanks for the exciting news about DeepEP v2!
May I ask about the estimated release timeline? Is it expected in a few weeks, or more likely a few months?