VLM: change default mm-attention backend from triton_attn to fa4 (on blackwell) (#21595)
This commit is contained in:
@@ -888,7 +888,9 @@ class VisionAttention(nn.Module):
|
||||
Priority: server args override > constructor arg > platform default.
|
||||
|
||||
Platform defaults:
|
||||
- CUDA: "triton_attn"
|
||||
- CUDA (Hopper SM90): "fa3"
|
||||
- CUDA (Blackwell SM100): "fa4"
|
||||
- CUDA (other): "triton_attn"
|
||||
- Non-CUDA: "sdpa"
|
||||
"""
|
||||
override_backend = get_global_server_args().mm_attention_backend
|
||||
@@ -900,6 +902,8 @@ class VisionAttention(nn.Module):
|
||||
major, minor = get_device_capability()
|
||||
if major == 9:
|
||||
backend = "fa3"
|
||||
elif major == 10:
|
||||
backend = "fa4"
|
||||
else:
|
||||
backend = "triton_attn"
|
||||
elif _is_hip:
|
||||
|
||||
Reference in New Issue
Block a user