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
676545b9
Commit
676545b9
authored
Apr 01, 2026
by
王敏
Committed by
zhangzbb
Apr 01, 2026
Browse files
[Perf]消除indexer build时隐式同步导致的调度空泡
parent
e2fa94ef
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
vllm/v1/attention/backends/mla/indexer.py
vllm/v1/attention/backends/mla/indexer.py
+4
-3
No files found.
vllm/v1/attention/backends/mla/indexer.py
View file @
676545b9
...
...
@@ -378,12 +378,13 @@ class DeepseekV32IndexerMetadataBuilder(AttentionMetadataBuilder):
# [7, 6, 8, 0] -> [7, 7, 7, 6, 8, 8, 8, 8]
expanded_base
=
torch
.
repeat_interleave
(
seq_lens
-
decode_lens
,
decode_lens
seq_lens
-
decode_lens
,
decode_lens
,
output_size
=
actual_expanded
)
# [0, 3, 4, 8] -> [0, 0, 0, 3, 4, 4, 4, 4]
expanded_starts
=
torch
.
repeat_interleave
(
common_attn_metadata
.
query_start_loc
[:
num_decodes
],
decode_lens
common_attn_metadata
.
query_start_loc
[:
num_decodes
],
decode_lens
,
output_size
=
actual_expanded
)
# [0, 1, 2, 0, 0, 1, 2, 3]
...
...
@@ -401,7 +402,7 @@ class DeepseekV32IndexerMetadataBuilder(AttentionMetadataBuilder):
# Give each of the flattened entries the same block table row as the
# original request.
self
.
expanded_block_table_buffer
[:
actual_expanded
]
=
(
torch
.
repeat_interleave
(
block_table
,
decode_lens
,
dim
=
0
)
torch
.
repeat_interleave
(
block_table
,
decode_lens
,
dim
=
0
,
output_size
=
actual_expanded
)
)
if
actual_expanded
<
num_decode_tokens
:
self
.
expanded_block_table_buffer
[
...
...
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