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
92058666
Commit
92058666
authored
Dec 01, 2025
by
jujl1
Browse files
feat: pp 增加输出每个micro batch调度的请求数功能,VLLM_PP_DEBUG打开,默认关闭
parent
4c92e64a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
0 deletions
+11
-0
vllm/envs.py
vllm/envs.py
+5
-0
vllm/v1/engine/core.py
vllm/v1/engine/core.py
+6
-0
No files found.
vllm/envs.py
View file @
92058666
...
...
@@ -189,6 +189,7 @@ if TYPE_CHECKING:
VLLM_USE_FUSE_SILU_AND_MUL
:
bool
=
False
VLLM_USE_OPT_RESHAPE_AND_CACHE
:
bool
=
False
VLLM_USE_TOPK_RENORM
:
bool
=
False
VLLM_PP_DEBUG
:
bool
=
False
def
get_default_cache_root
():
return
os
.
getenv
(
...
...
@@ -1237,6 +1238,10 @@ environment_variables: dict[str, Callable[[], Any]] = {
lambda
:
(
os
.
environ
.
get
(
"VLLM_USE_TOPK_RENORM"
,
"True"
).
lower
()
in
(
"true"
,
"1"
)),
"VLLM_PP_DEBUG"
:
lambda
:
(
os
.
environ
.
get
(
"VLLM_PP_DEBUG"
,
"False"
).
lower
()
in
(
"true"
,
"1"
)),
}
...
...
vllm/v1/engine/core.py
View file @
92058666
...
...
@@ -275,6 +275,12 @@ class EngineCore:
pass
scheduler_output
=
self
.
scheduler
.
schedule
()
if
scheduler_output
.
total_num_scheduled_tokens
>
0
:
if
envs
.
VLLM_PP_DEBUG
:
import
sys
,
os
num_run_reqs
=
len
(
scheduler_output
.
scheduled_new_reqs
)
+
scheduler_output
.
scheduled_cached_reqs
.
num_reqs
sys
.
stderr
.
write
(
f
"[pid-
{
os
.
getpid
()
}
]running requests in micro batch is:
{
num_run_reqs
}
, "
f
"total_num_scheduled_tokens is
{
scheduler_output
.
total_num_scheduled_tokens
}
\n
"
)
sys
.
stderr
.
flush
()
future
=
self
.
model_executor
.
execute_model
(
scheduler_output
)
self
.
batch_queue
.
put_nowait
(
(
future
,
scheduler_output
))
# type: ignore
...
...
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