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
68d72319
Unverified
Commit
68d72319
authored
Nov 19, 2025
by
Ryan Rock
Committed by
GitHub
Nov 19, 2025
Browse files
[CI/Build] Fix test_prefix_prefill for AMD (#28905)
Signed-off-by:
Ryan Rock
<
ryan.rock@amd.com
>
parent
2fd893b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
tests/kernels/attention/test_prefix_prefill.py
tests/kernels/attention/test_prefix_prefill.py
+6
-6
No files found.
tests/kernels/attention/test_prefix_prefill.py
View file @
68d72319
...
...
@@ -174,11 +174,11 @@ def test_contexted_kv_attention(
block_table
=
values
[:
BS
*
max_block_per_request
].
view
(
BS
,
max_block_per_request
)
b_seq_len
=
torch
.
tensor
(
seq_lens
,
dtype
=
torch
.
int32
)
b_ctx_len
=
torch
.
tensor
(
ctx_lens
,
dtype
=
torch
.
int32
)
b_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
query_lens
,
d
type
=
torch
.
int32
)
,
dim
=
0
)
b_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
query_lens
)
,
d
im
=
0
).
to
(
torch
.
int32
)
max_input_len
=
MAX_SEQ_LEN
# copy kv to cache
b_seq_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
seq_lens
[:
-
1
],
dtype
=
torch
.
int32
),
dim
=
0
b_seq_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
seq_lens
[:
-
1
]),
dim
=
0
).
to
(
torch
.
int32
)
for
i
in
range
(
BS
):
for
j
in
range
(
query_lens
[
i
]):
...
...
@@ -417,11 +417,11 @@ def test_contexted_kv_attention_alibi(
block_table
=
values
[:
BS
*
max_block_per_request
].
view
(
BS
,
max_block_per_request
)
b_seq_len
=
torch
.
tensor
(
seq_lens
,
dtype
=
torch
.
int32
)
b_ctx_len
=
torch
.
tensor
(
ctx_lens
,
dtype
=
torch
.
int32
)
b_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
query_lens
,
d
type
=
torch
.
int32
)
,
dim
=
0
)
b_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
query_lens
)
,
d
im
=
0
).
to
(
torch
.
int32
)
max_input_len
=
MAX_SEQ_LEN
# copy kv to cache
b_seq_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
seq_lens
[:
-
1
],
dtype
=
torch
.
int32
),
dim
=
0
b_seq_start_loc
=
torch
.
cumsum
(
torch
.
tensor
([
0
]
+
seq_lens
[:
-
1
]),
dim
=
0
).
to
(
torch
.
int32
)
for
i
in
range
(
BS
):
for
j
in
range
(
query_lens
[
i
]):
...
...
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