mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-07-09 11:37:10 +08:00
[Bugfix] Fix broken ViT attention selection for Blackwell device (#30731)
Signed-off-by: Isotr0py <mozf@mail2.sysu.edu.cn> (cherry picked from commit e94384bbadbaf99dea24c4af4de6a8c897f830e7)
This commit is contained in:
parent
ad8c073131
commit
6a88d590bb
@ -11,7 +11,7 @@ import torch
|
|||||||
from transformers import PretrainedConfig
|
from transformers import PretrainedConfig
|
||||||
|
|
||||||
from vllm.attention.backends.registry import AttentionBackendEnum
|
from vllm.attention.backends.registry import AttentionBackendEnum
|
||||||
from vllm.config import VllmConfig, get_current_vllm_config
|
from vllm.config import VllmConfig
|
||||||
from vllm.distributed import (
|
from vllm.distributed import (
|
||||||
get_tensor_model_parallel_rank,
|
get_tensor_model_parallel_rank,
|
||||||
get_tensor_model_parallel_world_size,
|
get_tensor_model_parallel_world_size,
|
||||||
@ -88,16 +88,10 @@ def get_vit_attn_backend(
|
|||||||
"""
|
"""
|
||||||
Get the available attention backend for Vision Transformer.
|
Get the available attention backend for Vision Transformer.
|
||||||
"""
|
"""
|
||||||
attn_backend = attn_backend_override
|
|
||||||
|
|
||||||
selected_backend = get_current_vllm_config().attention_config.backend
|
|
||||||
if attn_backend is None:
|
|
||||||
attn_backend = selected_backend
|
|
||||||
|
|
||||||
return current_platform.get_vit_attn_backend(
|
return current_platform.get_vit_attn_backend(
|
||||||
head_size,
|
head_size,
|
||||||
dtype,
|
dtype,
|
||||||
backend=attn_backend,
|
backend=attn_backend_override,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user