[BugFix] Fix DCP Assert (AssertionError: DCP not support reorder_batch_threshold > 1 now.) (#28100)

Signed-off-by: Lucas Wilkinson <lwilkins@redhat.com>
This commit is contained in:
Lucas Wilkinson
2025-11-05 14:54:43 +08:00
committed by GitHub
parent 0ff05e3770
commit d43ad5a757
3 changed files with 18 additions and 3 deletions
+10 -1
View File
@@ -264,7 +264,10 @@ class AttentionMetadataBuilder(abc.ABC, Generic[M]):
self.device = device
def _init_reorder_batch_threshold(
self, reorder_batch_threshold: int = 1, supports_spec_as_decode: bool = False
self,
reorder_batch_threshold: int = 1,
supports_spec_as_decode: bool = False,
supports_dcp_with_varlen: bool = False,
) -> None:
self.reorder_batch_threshold = reorder_batch_threshold
if self.reorder_batch_threshold is not None and supports_spec_as_decode:
@@ -281,6 +284,12 @@ class AttentionMetadataBuilder(abc.ABC, Generic[M]):
1 + speculative_config.num_speculative_tokens,
)
if (
self.vllm_config.parallel_config.decode_context_parallel_size > 1
and not supports_dcp_with_varlen
):
self.reorder_batch_threshold = 1
@abstractmethod
def build(
self,