Unverified Commit 44607e07 authored by Yuan Tang's avatar Yuan Tang Committed by GitHub
Browse files

Check if selected backend is None in get_attn_backend_cls() (#12975)


Signed-off-by: default avatarYuan Tang <terrytangyuan@gmail.com>
parent 67c4637c
...@@ -35,7 +35,7 @@ class CpuPlatform(Platform): ...@@ -35,7 +35,7 @@ class CpuPlatform(Platform):
dtype: torch.dtype, kv_cache_dtype: Optional[str], dtype: torch.dtype, kv_cache_dtype: Optional[str],
block_size: int, use_v1: bool, block_size: int, use_v1: bool,
use_mla: bool) -> str: use_mla: bool) -> str:
if selected_backend != _Backend.TORCH_SDPA: if selected_backend and selected_backend != _Backend.TORCH_SDPA:
logger.info("Cannot use %s backend on CPU.", selected_backend) logger.info("Cannot use %s backend on CPU.", selected_backend)
logger.info("Using Torch SDPA backend.") logger.info("Using Torch SDPA backend.")
return "vllm.attention.backends.torch_sdpa.TorchSDPABackend" return "vllm.attention.backends.torch_sdpa.TorchSDPABackend"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment