[AMD] Fix DSv4 draft extend taking the target compression path during prefill (#37713)

This commit is contained in:
Duyi-Wang
2026-09-03 02:46:49 -07:00
committed by GitHub
parent 27b7a2dc3b
commit 429ac2d82c
@@ -481,9 +481,9 @@ class DeepseekV4HipRadixBackend(
self.mtp_enabled = self.topk > 0
self.speculative_num_steps = speculative_num_steps
self.speculative_num_draft_tokens: int = get_spec().speculative_num_draft_tokens
self.is_draft_worker = getattr(model_runner, "is_draft_worker", False)
self.is_dspark_draft = (
getattr(model_runner, "is_draft_worker", False)
and model_runner.spec_algorithm.is_dspark()
self.is_draft_worker and model_runner.spec_algorithm.is_dspark()
)
self.target_verify_num_draft_tokens = self.speculative_num_draft_tokens
if self.is_dspark_draft:
@@ -1149,7 +1149,9 @@ class DeepseekV4HipRadixBackend(
and extend_seq_lens is not None
and extend_seq_lens_cpu is not None
)
is_draft = forward_batch.forward_mode.is_draft_extend_v2()
is_draft = (
forward_batch.forward_mode.is_draft_extend_v2() or self.is_draft_worker
)
metadata = self.init_forward_metadata_prefill(
max_seq_len=max_seq_len,
req_pool_indices=req_pool_indices,