Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions python/sglang/srt/layers/attention/deepseek_v4_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -3323,15 +3323,14 @@ def _make_low_ratio_prefill_indexer_inputs(

def _low_ratio_prefill_reads_page_indices(self, forward_batch: ForwardBatch):
# The negation of the sparse-prefill gate in forward(), which reads only
# raw_indices; the query-count clause is dropped, so this errs to True.
# raw_indices; num_qo_tokens=0 drops the query-count clause, so this errs
# to True. Paged attention under active CP needs the page indices.
return (
self.trtllm_attn
or not forward_batch.forward_mode.is_extend_without_speculative()
or get_platform().is_sm120
or self.tail_forward_metadata is not None
or self.forward_metadata.late_layer_tail is not None
or self.token_to_kv_pool.request_window is not None
or not envs.SGLANG_OPT_FLASHMLA_SPARSE_PREFILL.get()
or not self._use_sparse_prefill(forward_batch, num_qo_tokens=0)
)

def _publish_candidate_metadata(self, published: Optional[CandidateMetadata]):
Expand Down
Loading