From cb0429f2536aad65ab3aee3acca04455f49c5102 Mon Sep 17 00:00:00 2001 From: Byron Hsu Date: Mon, 27 Apr 2026 16:40:05 -0700 Subject: [PATCH] [Disagg] Finalize routed_experts_output in process_batch_result_disagg_prefill (#23885) Co-authored-by: Byron Hsu Co-authored-by: Claude Opus 4.7 (1M context) --- python/sglang/srt/disaggregation/prefill.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/sglang/srt/disaggregation/prefill.py b/python/sglang/srt/disaggregation/prefill.py index d9016d0f9..7ab978a79 100644 --- a/python/sglang/srt/disaggregation/prefill.py +++ b/python/sglang/srt/disaggregation/prefill.py @@ -490,6 +490,9 @@ class SchedulerDisaggregationPrefillMixin: if copy_done is not None: copy_done.synchronize() + if result.routed_experts_output is not None: + result.routed_experts_output.finalize() + result.routed_experts_output = None logprob_pt = 0 # Transfer kv for prefill completed requests and add it into disagg_prefill_inflight_queue