Skip to content

Commit de253d6

Browse files
authored
[Hardware][AMD] Enable FlexAttention backend on ROCm (#26439)
Signed-off-by: Matthew Wong <Matthew.Wong2@amd.com>
1 parent 8bd696f commit de253d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

vllm/platforms/rocm.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,9 @@ def get_attn_backend_cls(
276276
)
277277

278278
if envs.VLLM_USE_V1:
279+
if selected_backend == _Backend.FLEX_ATTENTION:
280+
logger.info("Using FlexAttention backend on V1 engine.")
281+
return "vllm.v1.attention.backends.flex_attention.FlexAttentionBackend"
279282
if (
280283
envs.VLLM_ROCM_USE_AITER and envs.VLLM_ROCM_USE_AITER_MHA and on_gfx9()
281284
) or selected_backend == _Backend.ROCM_AITER_FA:

0 commit comments

Comments
 (0)