Fix kv_cache_dtype handling for out-of-tree HPU plugin (#21302)
Signed-off-by: Konrad Zawora <kzawora@habana.ai> Signed-off-by: Chendi.Xue <chendi.xue@intel.com> Co-authored-by: Chendi.Xue <chendi.xue@intel.com>
This commit is contained in:
co-authored by
Chendi.Xue
parent
6e5b5ca580
commit
c17231e827
@@ -586,6 +586,19 @@ class NonNvmlCudaPlatform(CudaPlatformBase):
|
||||
" not found. Assuming no NVLink available.")
|
||||
return False
|
||||
|
||||
@classmethod
|
||||
def is_kv_cache_dtype_supported(cls, kv_cache_dtype: str) -> bool:
|
||||
fp8_attention = kv_cache_dtype.startswith("fp8")
|
||||
will_use_fa = (not envs.is_set("VLLM_ATTENTION_BACKEND")
|
||||
) or envs.VLLM_ATTENTION_BACKEND == "FLASH_ATTN_VLLM_V1"
|
||||
supported = False
|
||||
if cls.is_device_capability(100):
|
||||
supported = True
|
||||
elif fp8_attention and will_use_fa:
|
||||
from vllm.attention.utils.fa_utils import flash_attn_supports_fp8
|
||||
supported = flash_attn_supports_fp8()
|
||||
return supported
|
||||
|
||||
|
||||
# Autodetect either NVML-enabled or non-NVML platform
|
||||
# based on whether NVML is available.
|
||||
|
||||
Reference in New Issue
Block a user