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
b706d898
Unverified
Commit
b706d898
authored
Mar 11, 2025
by
Cody Yu
Committed by
GitHub
Mar 11, 2025
Browse files
[Bugfix][V1][PP] Only warmup sampler at last PP rank (#14643)
Signed-off-by:
Cody Yu
<
hao.yu.cody@gmail.com
>
parent
863d315c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
14 deletions
+17
-14
vllm/v1/worker/gpu_worker.py
vllm/v1/worker/gpu_worker.py
+17
-14
No files found.
vllm/v1/worker/gpu_worker.py
View file @
b706d898
...
@@ -14,6 +14,7 @@ from vllm.device_allocator.cumem import CuMemAllocator
...
@@ -14,6 +14,7 @@ from vllm.device_allocator.cumem import CuMemAllocator
from
vllm.distributed
import
(
ensure_model_parallel_initialized
,
from
vllm.distributed
import
(
ensure_model_parallel_initialized
,
init_distributed_environment
,
init_distributed_environment
,
set_custom_all_reduce
)
set_custom_all_reduce
)
from
vllm.distributed.parallel_state
import
get_pp_group
from
vllm.logger
import
init_logger
from
vllm.logger
import
init_logger
from
vllm.lora.request
import
LoRARequest
from
vllm.lora.request
import
LoRARequest
from
vllm.model_executor
import
set_random_seed
from
vllm.model_executor
import
set_random_seed
...
@@ -219,8 +220,10 @@ class Worker(WorkerBase):
...
@@ -219,8 +220,10 @@ class Worker(WorkerBase):
# fragmentation issue.
# fragmentation issue.
# NOTE: This is called after `capture_model` on purpose to prevent
# NOTE: This is called after `capture_model` on purpose to prevent
# memory buffers from being cleared by `torch.cuda.empty_cache`.
# memory buffers from being cleared by `torch.cuda.empty_cache`.
if
get_pp_group
().
is_last_rank
:
try
:
try
:
max_num_reqs
=
min
(
self
.
scheduler_config
.
max_num_seqs
,
max_num_reqs
=
min
(
self
.
scheduler_config
.
max_num_seqs
,
self
.
scheduler_config
.
max_num_batched_tokens
)
self
.
scheduler_config
.
max_num_batched_tokens
)
self
.
model_runner
.
_dummy_sampler_run
(
self
.
model_runner
.
_dummy_sampler_run
(
hidden_states
=
self
.
model_runner
.
_dummy_run
(
hidden_states
=
self
.
model_runner
.
_dummy_run
(
...
...
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