Skip to content

Commit 9f8001d

Browse files
pavanimajetylulmer
authored andcommitted
[Hardware] Update the flash attn tag to support Blackwell (vllm-project#14244)
Signed-off-by: Louis Ulmer <[email protected]>
1 parent 800b8f4 commit 9f8001d

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cmake/external_projects/vllm_flash_attn.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ else()
3838
FetchContent_Declare(
3939
vllm-flash-attn
4040
GIT_REPOSITORY https://github.com/vllm-project/flash-attention.git
41-
GIT_TAG 720c94869cf2e0ff5a706e9c7f1dce0939686ade
41+
GIT_TAG 9bfa9869829d8c593527eb34c5271d0090f7ccc9
4242
GIT_PROGRESS TRUE
4343
# Don't share the vllm-flash-attn build between build types
4444
BINARY_DIR ${CMAKE_BINARY_DIR}/vllm-flash-attn
@@ -64,4 +64,4 @@ install(
6464
DESTINATION vllm_flash_attn
6565
COMPONENT _vllm_fa3_C
6666
FILES_MATCHING PATTERN "*.py"
67-
)
67+
)

vllm/attention/backends/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,14 +595,19 @@ def get_flash_attn_version():
595595
# if hopper default to FA3, otherwise stick to FA2 for now
596596
# TODO(lucas): profile FA3 on ampere to see if it makes sense to
597597
# use FA3 as default for both
598-
if current_platform.get_device_capability()[0] >= 9:
598+
if current_platform.get_device_capability()[0] == 9:
599599
fa_version = 3 if is_fa_version_supported(3) else 2
600600
else:
601601
fa_version = 2
602602

603603
if envs.VLLM_FLASH_ATTN_VERSION is not None:
604604
assert envs.VLLM_FLASH_ATTN_VERSION in [2, 3]
605605
fa_version = envs.VLLM_FLASH_ATTN_VERSION
606+
if (current_platform.get_device_capability()[0] == 10
607+
and envs.VLLM_FLASH_ATTN_VERSION == 3):
608+
logger.warning("Cannot use FA version 3 on Blackwell platform",
609+
"defaulting to FA version 2.")
610+
fa_version = 2
606611

607612
if not is_fa_version_supported(fa_version):
608613
logger.error("Cannot use FA version %d is not supported due to %s",

0 commit comments

Comments
 (0)