vllm.v1.attention.backends.mla.triton_mla ¶
Classes:
TritonMLAMetadataBuilder ¶
Bases: MLACommonMetadataBuilder[MLACommonMetadata]
Methods:
-
get_cudagraph_support–Report UNIFORM_BATCH where a non-causal multi-token block is served.
Source code in vllm/v1/attention/backends/mla/triton_mla.py
_reserve_attn_logits_workspace() ¶
Pre-size the shared workspace for the decode split-KV attn logits.
Reserving at the worst case (max_model_len -> max num_kv_splits, max_num_seqs decode tokens) before warmup/cudagraph capture means the per-call get_simultaneous in forward_mqa never has to grow the buffer at runtime (which would raise once the workspace is locked).
Source code in vllm/v1/attention/backends/mla/triton_mla.py
get_cudagraph_support(vllm_config, kv_cache_spec) classmethod ¶
Report UNIFORM_BATCH where a non-causal multi-token block is served.
_cudagraph_support is a class constant, so serving the DSpark draft's (1 + num_spec) block through the decode path reports UNIFORM_SINGLE_TOKEN_DECODE and, because the engine takes the minimum over all attention groups, downgrades the whole engine off full cudagraphs. forward_mqa flattens that block with repeat_interleave on a Python int and performs no device->host sync, so it does satisfy the UNIFORM_BATCH contract.
non_causal_multi_token_decode is a KV-cache-group property, not a per-layer one: MLAAttentionSpec.merge ORs it over every layer in the group, so a group holding both a draft and its target reports it for both. That is the same predicate __init__ below already uses to raise reorder_batch_threshold, so the two stay consistent, but it does mean this lifts a causal target sharing the draft's KV cache group as well.