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
fb4983e1
Unverified
Commit
fb4983e1
authored
Aug 30, 2025
by
Ning Xie
Committed by
GitHub
Aug 30, 2025
Browse files
[Misc] add reorder_batch AttentionMetadataBuilder (#23798)
Signed-off-by:
Andy Xie
<
andy.xning@gmail.com
>
parent
379ea282
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
vllm/v1/attention/backends/utils.py
vllm/v1/attention/backends/utils.py
+17
-0
No files found.
vllm/v1/attention/backends/utils.py
View file @
fb4983e1
...
@@ -212,6 +212,23 @@ class AttentionMetadataBuilder(abc.ABC, Generic[M]):
...
@@ -212,6 +212,23 @@ class AttentionMetadataBuilder(abc.ABC, Generic[M]):
"""
"""
raise
NotImplementedError
raise
NotImplementedError
def
reorder_batch
(
self
,
input_batch
:
"InputBatch"
,
scheduler_output
:
"SchedulerOutput"
)
->
bool
:
"""
Update the order of requests in the batch based on the attention
backend's needs. For example, some attention backends (namely MLA) may
want to separate requests based on if the attention computation will be
compute-bound or memory-bound.
Args:
input_batch: input batch
scheduler_output: scheduler output.
Returns:
True if the batch was modified, False otherwise.
"""
raise
NotImplementedError
def
build_for_cudagraph_capture
(
def
build_for_cudagraph_capture
(
self
,
common_attn_metadata
:
CommonAttentionMetadata
)
->
M
:
self
,
common_attn_metadata
:
CommonAttentionMetadata
)
->
M
:
"""
"""
...
...
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