[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 -3
View File
@@ -25,7 +25,7 @@ if TYPE_CHECKING:
from vllm.model_executor.layers.quantization.utils.quant_utils import QuantKey
from vllm.platforms.interface import DeviceCapability
from vllm.v1.attention.backends.utils import KVCacheLayoutType
from vllm.v1.kv_cache_interface import AttentionSpec, KVQuantMode
from vllm.v1.kv_cache_interface import KVCacheSpec, KVQuantMode
from vllm.v1.kv_cache_interface import get_kv_quant_mode
@@ -635,7 +635,7 @@ class AttentionMetadataBuilder(ABC, Generic[M]):
@abstractmethod
def __init__(
self,
kv_cache_spec: "AttentionSpec",
kv_cache_spec: "KVCacheSpec",
layer_names: list[str],
vllm_config: "VllmConfig",
device: torch.device,
@@ -649,7 +649,7 @@ class AttentionMetadataBuilder(ABC, Generic[M]):
def get_cudagraph_support(
cls: type["AttentionMetadataBuilder"],
vllm_config: "VllmConfig",
kv_cache_spec: "AttentionSpec",
kv_cache_spec: "KVCacheSpec",
) -> AttentionCGSupport:
"""Get the cudagraph support level of this builder class."""
return cls._cudagraph_support