[Attention]: Use KVCacheSpec for AttentionMetadataBuilder type hints (#50148)
Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user