A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
Remove unneeded ROCm platform import when using CUDA (#22765)
Signed-off-by: mgoin <mgoin64@gmail.com>
Michael Goin committed
Aug 13, 2025 at 00:26 UTC
4082338a25851e1f923ad5601616f2717536c6fd
2 files changed
+2
-2
vllm/attention/backends/rocm_flash_attn.py
+1
-1
@@ -22,7 +22,6 @@ from vllm.logger import init_logger
22
from vllm.model_executor.layers.quantization.utils.quant_utils import (
23
GroupShape)
24
from vllm.platforms import current_platform
25
-from vllm.platforms.rocm import use_rocm_custom_paged_attention
25
26
if TYPE_CHECKING:
27
from vllm.worker.model_runner import ModelInputForGPUWithSamplingMetadata
@@ -886,6 +885,7 @@ class ROCmFlashAttentionImpl(AttentionImpl):
885
num_seqs, num_heads, head_size = decode_query.shape
886
block_size = value_cache.shape[3]
887
gqa_ratio = num_heads // self.num_kv_heads
888
+ from vllm.platforms.rocm import use_rocm_custom_paged_attention
889
use_custom = use_rocm_custom_paged_attention(
890
decode_query.dtype, head_size, block_size, gqa_ratio,
891
decode_meta.max_decode_seq_len, self.sliding_window,
vllm/attention/ops/chunked_prefill_paged_decode.py
+1
-1
@@ -11,7 +11,6 @@ import torch
11
12
from vllm import _custom_ops as ops
13
from vllm.platforms import current_platform
14
-from vllm.platforms.rocm import use_rocm_custom_paged_attention
14
from vllm.triton_utils import tl, triton
15
16
from .prefix_prefill import context_attention_fwd
@@ -296,6 +295,7 @@ def chunked_prefill_paged_decode(
295
num_queries_per_kv_padded = max(triton.next_power_of_2(num_queries_per_kv),
296
16)
297
298
+ from vllm.platforms.rocm import use_rocm_custom_paged_attention
299
use_custom = use_rocm_custom_paged_attention(
300
query.dtype,
301
head_size,