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
70fb77b4
Unverified
Commit
70fb77b4
authored
Dec 02, 2025
by
Boyuan Feng
Committed by
GitHub
Dec 02, 2025
Browse files
[BugFix] add max-num-batched-token to scheduler hash (#29829)
Signed-off-by:
Boyuan Feng
<
boyuan@meta.com
>
parent
48d15a32
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
vllm/config/scheduler.py
vllm/config/scheduler.py
+12
-2
vllm/config/vllm.py
vllm/config/vllm.py
+0
-4
No files found.
vllm/config/scheduler.py
View file @
70fb77b4
...
...
@@ -175,9 +175,19 @@ class SchedulerConfig:
excluding anything before input ids/embeddings and after
the final hidden states.
"""
# no factors to consider.
# this config will not affect the computation graph.
factors
:
list
[
Any
]
=
[]
# max_num_batched_tokens need to be included in the hash due
# to two reasons:
# 1. LoRA creates static buffers based on max_num_batched_tokens.
# The tensor sizes and strides get captured in the torch.compile
# graph explicitly.
# 2. Inductor decides whether using 32-bit or 64-bit indexing integer
# based on the data sizes. `max_num_batched_tokens` has an
# impact on that. For more details, please check
# https://github.com/vllm-project/vllm/issues/29585
factors
.
append
(
self
.
max_num_batched_tokens
)
hash_str
=
safe_hash
(
str
(
factors
).
encode
(),
usedforsecurity
=
False
).
hexdigest
()
return
hash_str
...
...
vllm/config/vllm.py
View file @
70fb77b4
...
...
@@ -265,10 +265,6 @@ class VllmConfig:
vllm_factors
.
append
(
"None"
)
if
self
.
lora_config
:
vllm_factors
.
append
(
self
.
lora_config
.
compute_hash
())
# LoRA creates static buffers based on max_num_batched_tokens.
# The tensor sizes and strides get captured in the torch.compile
# graph explicitly.
vllm_factors
.
append
(
str
(
self
.
scheduler_config
.
max_num_batched_tokens
))
else
:
vllm_factors
.
append
(
"None"
)
if
self
.
speculative_config
:
...
...
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