Skip to content

vllm.model_executor.kernels.attention.dsa.candidate_blocks

Functions:

apply_candidate_mask(logits, row_ks, row_ke, candidate_blocks, block_size, row_repeat=1)

Mask packed logits outside causal bounds and request-local candidates.

select_candidate_blocks(logits, row_ks, row_ke, topk_blocks, block_size, out, row_repeat=1, score_dtype=None)

Select local block IDs by maximum score, pinning each row's newest block.

Row bounds are in packed column space; absent starts mean zero. Decode rows share bounds in groups of row_repeat. Output is -1 padded.