Skip to content

vllm.v1.attention.ops.dash_attention

DASH paged KV kernels and segmented FlashAttention/FlashInfer execution.

Functions:

  • cache_dash_prefill –

    Store rotated keys and integer page state in one auxiliary KV head.

  • flash_dash_attention –

    Attend gathered segments and combine normalized partial outputs.

  • paged_dash_decode –

    One query per request; all sequence-dependent decisions stay on GPU.

  • paged_dash_prefill –

    Extend a prompt using paged history and full-prompt page coordinates.

cache_dash_prefill(k, v, ik, roles, slots, cache, sp, head_cls=None)

Store rotated keys and integer page state in one auxiliary KV head.

flash_dash_attention(q, k, v, used, bias, backend, bs, local)

Attend gathered segments and combine normalized partial outputs.

k/v are contiguous [N(topkbs+local), Hkv, D]; used contains the valid prefix length of each segment, including zero for inactive rows.

paged_dash_decode(q, k, v, iq, ik, roles, cache, block_table, seq_lens, slots, head_cls, sp, layer_idx, max_model_len, prefix_lens=None, backend='FLASH_ATTN', cached_summaries=False, positions=None)

One query per request; all sequence-dependent decisions stay on GPU.

paged_dash_prefill(q, k, v, iq, ik, roles, positions, cache, block_table, length, slots, head_cls, sp, layer_idx, backend, prefix_lens=None)

Extend a prompt using paged history and full-prompt page coordinates.