[Attention]: Use KVCacheSpec for AttentionMetadataBuilder type hints (#50148)

Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
This commit is contained in:
Martin Hickey
2026-07-31 11:20:18 +00:00
committed by GitHub
parent 92643d68f5
commit b2fb83e7ff
14 changed files with 34 additions and 33 deletions
+3 -1
View File
@@ -76,6 +76,7 @@ from vllm.v1.attention.ops.dcp_alltoall import dcp_a2a_lse_reduce
from vllm.v1.attention.ops.merge_attn_states import merge_attn_states
from vllm.v1.kv_cache_interface import (
AttentionSpec,
KVCacheSpec,
KVQuantMode,
UniformTypeKVCacheSpecs,
)
@@ -617,6 +618,7 @@ class FlashInferMetadata:
class FlashInferMetadataBuilder(AttentionMetadataBuilder[FlashInferMetadata]):
kv_cache_spec: AttentionSpec
reorder_batch_threshold: int = 1
def __init__(
@@ -893,7 +895,7 @@ class FlashInferMetadataBuilder(AttentionMetadataBuilder[FlashInferMetadata]):
def get_cudagraph_support(
cls: type["FlashInferMetadataBuilder"],
vllm_config: VllmConfig,
kv_cache_spec: AttentionSpec,
kv_cache_spec: KVCacheSpec,
) -> AttentionCGSupport:
"""Get the cudagraph support level for FlashInfer attention.