Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
4082338a
Unverified
Commit
4082338a
authored
Aug 13, 2025
by
Michael Goin
Committed by
GitHub
Aug 12, 2025
Browse files
Remove unneeded ROCm platform import when using CUDA (#22765)
Signed-off-by:
mgoin
<
mgoin64@gmail.com
>
parent
c6b92879
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
vllm/attention/backends/rocm_flash_attn.py
vllm/attention/backends/rocm_flash_attn.py
+1
-1
vllm/attention/ops/chunked_prefill_paged_decode.py
vllm/attention/ops/chunked_prefill_paged_decode.py
+1
-1
No files found.
vllm/attention/backends/rocm_flash_attn.py
View file @
4082338a
...
@@ -22,7 +22,6 @@ from vllm.logger import init_logger
...
@@ -22,7 +22,6 @@ from vllm.logger import init_logger
from
vllm.model_executor.layers.quantization.utils.quant_utils
import
(
from
vllm.model_executor.layers.quantization.utils.quant_utils
import
(
GroupShape
)
GroupShape
)
from
vllm.platforms
import
current_platform
from
vllm.platforms
import
current_platform
from
vllm.platforms.rocm
import
use_rocm_custom_paged_attention
if
TYPE_CHECKING
:
if
TYPE_CHECKING
:
from
vllm.worker.model_runner
import
ModelInputForGPUWithSamplingMetadata
from
vllm.worker.model_runner
import
ModelInputForGPUWithSamplingMetadata
...
@@ -886,6 +885,7 @@ class ROCmFlashAttentionImpl(AttentionImpl):
...
@@ -886,6 +885,7 @@ class ROCmFlashAttentionImpl(AttentionImpl):
num_seqs
,
num_heads
,
head_size
=
decode_query
.
shape
num_seqs
,
num_heads
,
head_size
=
decode_query
.
shape
block_size
=
value_cache
.
shape
[
3
]
block_size
=
value_cache
.
shape
[
3
]
gqa_ratio
=
num_heads
//
self
.
num_kv_heads
gqa_ratio
=
num_heads
//
self
.
num_kv_heads
from
vllm.platforms.rocm
import
use_rocm_custom_paged_attention
use_custom
=
use_rocm_custom_paged_attention
(
use_custom
=
use_rocm_custom_paged_attention
(
decode_query
.
dtype
,
head_size
,
block_size
,
gqa_ratio
,
decode_query
.
dtype
,
head_size
,
block_size
,
gqa_ratio
,
decode_meta
.
max_decode_seq_len
,
self
.
sliding_window
,
decode_meta
.
max_decode_seq_len
,
self
.
sliding_window
,
...
...
vllm/attention/ops/chunked_prefill_paged_decode.py
View file @
4082338a
...
@@ -11,7 +11,6 @@ import torch
...
@@ -11,7 +11,6 @@ import torch
from
vllm
import
_custom_ops
as
ops
from
vllm
import
_custom_ops
as
ops
from
vllm.platforms
import
current_platform
from
vllm.platforms
import
current_platform
from
vllm.platforms.rocm
import
use_rocm_custom_paged_attention
from
vllm.triton_utils
import
tl
,
triton
from
vllm.triton_utils
import
tl
,
triton
from
.prefix_prefill
import
context_attention_fwd
from
.prefix_prefill
import
context_attention_fwd
...
@@ -296,6 +295,7 @@ def chunked_prefill_paged_decode(
...
@@ -296,6 +295,7 @@ def chunked_prefill_paged_decode(
num_queries_per_kv_padded
=
max
(
triton
.
next_power_of_2
(
num_queries_per_kv
),
num_queries_per_kv_padded
=
max
(
triton
.
next_power_of_2
(
num_queries_per_kv
),
16
)
16
)
from
vllm.platforms.rocm
import
use_rocm_custom_paged_attention
use_custom
=
use_rocm_custom_paged_attention
(
use_custom
=
use_rocm_custom_paged_attention
(
query
.
dtype
,
query
.
dtype
,
head_size
,
head_size
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment