[ROCm][Perf] Use native merge_attn_states kernel on gfx942/gfx950 (#60159)

Signed-off-by: mghanimi <mghanimi@amd.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Douglas Lehr <91553416+dllehr-amd@users.noreply.github.com>
This commit is contained in:
Mehdi Ghanimifard
2026-10-08 04:49:49 +00:00
committed by GitHub
co-authored by Cursor Douglas Lehr
parent 775792f2d5
commit 4ac0179f8a
+12 -1
View File
@@ -139,8 +139,19 @@ def merge_attn_states(
return headdim % 4 == 0
return headdim % 8 == 0
# CDNA3 and newer (gfx942, gfx950, gfx1250). gfx90a is CDNA2 and
# stays on the Triton merge.
def supported_platform() -> bool:
if current_platform.is_cuda():
return True
if current_platform.is_rocm():
from vllm.platforms.rocm import get_cdna_version
return get_cdna_version() >= 3
return False
if (
current_platform.is_cuda()
supported_platform()
and supported_dtypes(prefix_output)
and supported_headdim(prefix_output)
):