[Attention] Refactor CUDA attention backend selection logic (#24794)
Signed-off-by: Matthew Bonanni <mbonanni@redhat.com> Signed-off-by: Matthew Bonanni <mbonanni001@gmail.com> Co-authored-by: Luka Govedič <ProExpertProg@users.noreply.github.com>
This commit is contained in:
co-authored by
Luka Govedič
parent
2e78150d24
commit
b30dfa03c5
+3
-3
@@ -626,14 +626,14 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
||||
# - "FLASH_ATTN_MLA": use FlashAttention for MLA
|
||||
# - "FLASHINFER_MLA": use FlashInfer for MLA
|
||||
# - "CUTLASS_MLA": use CUTLASS for MLA
|
||||
# All possible options loaded dynamically from _Backend enum
|
||||
# All possible options loaded dynamically from AttentionBackendEnum
|
||||
"VLLM_ATTENTION_BACKEND": env_with_choices(
|
||||
"VLLM_ATTENTION_BACKEND",
|
||||
None,
|
||||
lambda: list(
|
||||
__import__(
|
||||
"vllm.attention.backends.registry", fromlist=["_Backend"]
|
||||
)._Backend.__members__.keys()
|
||||
"vllm.attention.backends.registry", fromlist=["AttentionBackendEnum"]
|
||||
).AttentionBackendEnum.__members__.keys()
|
||||
),
|
||||
),
|
||||
# If set, vllm will use flashinfer sampler
|
||||
|
||||
Reference in New Issue
Block a user