Skip to content

Allow topk_ids=None when do_expand=True routes via expert_tokens_meta - #45193

Draft
elvircrn wants to merge 1 commit into
vllm-project:mainfrom
elvircrn:topk-ids-optional-do-expand
Draft

elvircrn wants to merge 1 commit into
vllm-project:mainfrom
elvircrn:topk-ids-optional-do-expand

Conversation

@elvircrn

Copy link
Copy Markdown
Contributor

With do_expand=True, DeepEP v2 returns tokens contiguous per expert and expert_tokens_meta provides routing via GPU cumsum. topk_ids are not needed.

  • Make moe_problem_size accept topk_ids=None, default topk=1
  • Stop synthesizing topk_ids in DeepEP v2 _receiver when recv_topk_idx is None
  • Skip weight_and_reduce in _finalize when topk_ids is None

@elvircrn
elvircrn force-pushed the topk-ids-optional-do-expand branch 6 times, most recently from 0195a68 to 66c31f0 Compare June 10, 2026 21:53
@elvircrn
elvircrn force-pushed the topk-ids-optional-do-expand branch from 66c31f0 to 9caa69c Compare June 11, 2026 08:41
elvircrn added a commit to elvircrn/vllm that referenced this pull request Jun 11, 2026
…=True

Adds do_expand as independent constructor param. When do_expand=True +
use_cudagraph=True, routes via expert_tokens_meta without topk_ids.
Keeps use_nvfp4_dispatch support.
elvircrn added a commit to elvircrn/vllm that referenced this pull request Jun 11, 2026
elvircrn added a commit to elvircrn/vllm that referenced this pull request Jun 11, 2026
- deepep_v2: build topk_ids from expert counts for do_expand+cudagraph
  instead of returning None (which _prepare treats as "keep original")
- flashinfer_cutedsl_moe: use topk_ids.size(1) as effective top_k so
  expanded layout (top_k=1 per row) works with FlashInfer CuteDSL
- fused_moe_modular_method: remove shared_experts/inplace args removed
  in PR vllm-project#45193
@mergify

mergify Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

This pull request has merge conflicts that must be resolved before it can be
merged. Please rebase the PR, @elvircrn.

https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase label Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant