Skip to content

vllm.model_executor.layers.mamba.kda_checkpoint

Classes:

Functions:

FlashInferKDAPrefillKernel

Bases: VllmJitKernel['FlashInferKDAPrefillKernel.CompileKey']

Pre-compile FlashInfer CuTe DSL KDA prefill variants at startup.

FlashKDAPrefillCheckpointExporter dataclass

Bases: MambaPrefillCheckpointExporter

Store KDA (FlashKDA, FlashInfer, or Triton) checkpoint states.

get_triton_kda_checkpoint_buffer(checkpoint, spec, num_seqs)

The checkpoint_state and checkpoint_offsets to pass the Triton chunk kernel, or Nones when the batch has no checkpoint.

reserve_triton_kda_checkpoint_buffer(vllm_config, num_heads, head_dim, dtype)

Reserve the [max_num_seqs, H, V, K] workspace buffer the Triton chunk kernel stores checkpoint states into; profiling skips attention, so the layer reserves it before the KV cache is sized.