[Fix] Speculative decoding crashes with DP-Attention (#33892)

This commit is contained in:
Eric Zhang
2026-08-10 00:56:36 +08:00
committed by GitHub
parent 2ab96d0fe0
commit 168eba3257
@@ -852,6 +852,9 @@ class MultiLayerEagleDraftWorker(EagleDraftWorkerBase):
forward_batch.token_to_kv_pool = self.draft_runner_list[ forward_batch.token_to_kv_pool = self.draft_runner_list[
step step
].token_to_kv_pool ].token_to_kv_pool
if not forward_batch.forward_mode.is_idle():
# An idle round (DP attention: this rank has no requests) has nothing
# to plan pre-pad. Avoid raising when seq_lens is empty here.
self.draft_runner_list[step].attn_backend.init_forward_metadata( self.draft_runner_list[step].attn_backend.init_forward_metadata(
forward_batch forward_batch
) )