From 04a55612dd6f7423a7138f6e5a4b837b63f37d65 Mon Sep 17 00:00:00 2001 From: Jee Jee Li Date: Thu, 12 Jun 2025 00:12:10 +0800 Subject: [PATCH] [Misc] Fix misleading ROCm warning (#19486) Signed-off-by: Jee Jee Li --- vllm/attention/ops/triton_flash_attention.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/vllm/attention/ops/triton_flash_attention.py b/vllm/attention/ops/triton_flash_attention.py index a26e713b1c624..49070e4c7ae6a 100644 --- a/vllm/attention/ops/triton_flash_attention.py +++ b/vllm/attention/ops/triton_flash_attention.py @@ -25,9 +25,14 @@ Not currently supported: import torch from vllm.platforms import current_platform -from vllm.platforms.rocm import on_gfx1x from vllm.triton_utils import tl, triton +# Avoid misleading ROCm warning. +if current_platform.is_rocm(): + from vllm.platforms.rocm import on_gfx1x +else: + on_gfx1x = lambda *args, **kwargs: False + torch_dtype: tl.constexpr = torch.float16