[Bugfix][MoE] Restore TP-sharded routed-expert capture for DP=1 (#61388)

Signed-off-by: Ronald1995 <ronaldautomobile@163.com>
Signed-off-by: Ao Shen <281812371+aoshen02@users.noreply.github.com>
Signed-off-by: Ao Shen <aoshen@inferact.ai>
Co-authored-by: Ao Shen <281812371+aoshen02@users.noreply.github.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: Ao Shen <aoshen@inferact.ai>
This commit is contained in:
Ronald
2026-10-16 00:21:24 +00:00
committed by GitHub
co-authored by Ao Shen OpenAI Codex Ao Shen
parent ef38e8d006
commit a8be1500ba
4 changed files with 300 additions and 112 deletions
+2 -4
View File
@@ -327,10 +327,8 @@ def set_forward_context(
vllm_config.parallel_config, num_tokens or 0, num_tokens_across_dp
)
# Convenience: if cudagraph is used and num_tokens is given, we can just
# create a batch descriptor here if not given (there's no harm since if it
# doesn't match in the wrapper it'll fall through).
if cudagraph_runtime_mode != CUDAGraphMode.NONE and num_tokens is not None:
# Preserve the batch size before model-level sequence parallelism.
if num_tokens is not None:
batch_descriptor = batch_descriptor or BatchDescriptor(num_tokens=num_tokens)
additional_kwargs = current_platform.set_additional_forward_context(