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
50b788a1
Unverified
Commit
50b788a1
authored
Oct 23, 2025
by
Zhewen Li
Committed by
GitHub
Oct 23, 2025
Browse files
[CI/Build] Fix AMD CI: test_cpu_gpu.py (#27388)
Signed-off-by:
zhewenli
<
zhewenli@meta.com
>
parent
fc059c70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
4 deletions
+13
-4
tests/v1/kv_offload/test_cpu_gpu.py
tests/v1/kv_offload/test_cpu_gpu.py
+13
-4
No files found.
tests/v1/kv_offload/test_cpu_gpu.py
View file @
50b788a1
...
...
@@ -8,11 +8,20 @@ import torch
from
vllm.platforms
import
current_platform
from
vllm.v1.attention.backends.flash_attn
import
FlashAttentionBackend
from
vllm.v1.attention.backends.flashinfer
import
FlashInferBackend
from
vllm.v1.attention.backends.mla.flashattn_mla
import
FlashAttnMLABackend
from
vllm.v1.kv_offload.mediums
import
CPULoadStoreSpec
,
GPULoadStoreSpec
from
vllm.v1.kv_offload.worker.cpu_gpu
import
CpuGpuOffloadingHandler
BACKENDS_TO_TEST
=
[
FlashAttentionBackend
]
if
not
current_platform
.
is_rocm
():
from
vllm.v1.attention.backends.flashinfer
import
FlashInferBackend
BACKENDS_TO_TEST
.
append
(
FlashInferBackend
)
from
vllm.v1.attention.backends.mla.flashattn_mla
import
FlashAttnMLABackend
BACKENDS_TO_TEST
.
append
(
FlashAttnMLABackend
)
NUM_GPU_BLOCKS
=
[
64
]
NUM_CPU_BLOCKS
=
[
256
]
GPU_BLOCK_SIZES
=
[
16
]
...
...
@@ -55,8 +64,8 @@ def test_transfer(
)
->
None
:
current_platform
.
seed_everything
(
seed
)
# create per-layer GPU KV caches
attn_backends_list
=
[
FlashAttentionBackend
,
FlashInferBackend
,
FlashAttnMLABackend
]
# create per-layer GPU KV caches
based on available attn_backends
attn_backends_list
=
BACKENDS_TO_TEST
gpu_caches
=
{}
attn_backends
=
{}
...
...
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