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
201c971e
Unverified
Commit
201c971e
authored
Oct 05, 2025
by
Jialin Ouyang
Committed by
GitHub
Oct 05, 2025
Browse files
[Perf][Easy] Early stop in request_block_hasher (#26112)
Signed-off-by:
Jialin Ouyang
<
Jialin.Ouyang@gmail.com
>
parent
e0986ea0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
vllm/v1/core/kv_cache_utils.py
vllm/v1/core/kv_cache_utils.py
+4
-0
No files found.
vllm/v1/core/kv_cache_utils.py
View file @
201c971e
...
...
@@ -585,6 +585,10 @@ def get_request_block_hasher(
start_token_idx
=
len
(
request
.
block_hashes
)
*
block_size
num_tokens
=
request
.
num_tokens
if
start_token_idx
+
block_size
>
num_tokens
:
# Early stop when there no new full blocks created.
return
[]
curr_mm_idx
=
0
if
start_token_idx
>
0
:
# Set curr_mm_idx = -1 to indicate the last mm input.
...
...
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