Skip to content

Commit 04a5561

Browse files
authored
[Misc] Fix misleading ROCm warning (#19486)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
1 parent 89b0f84 commit 04a5561

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

vllm/attention/ops/triton_flash_attention.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@
2525
import torch
2626

2727
from vllm.platforms import current_platform
28-
from vllm.platforms.rocm import on_gfx1x
2928
from vllm.triton_utils import tl, triton
3029

30+
# Avoid misleading ROCm warning.
31+
if current_platform.is_rocm():
32+
from vllm.platforms.rocm import on_gfx1x
33+
else:
34+
on_gfx1x = lambda *args, **kwargs: False
35+
3136
torch_dtype: tl.constexpr = torch.float16
3237

3338

0 commit comments

Comments
 (0)