Skip to content

Commit

Permalink
Make sure that all workers are notified about end of execution loop (#…
Browse files Browse the repository at this point in the history
…730)

Currently we will have a hang at the end of script when using TP>1 and
multistep scheduling. This is caused by lack of notification from driver
worker about ending the execution loop.
This is a workaround for this issue, by making sure that all workers are
notified at the end of `llm_engine` loop.
Other possible workaround could be modification of this check:
https://github.com/HabanaAI/vllm-fork/blob/habana_main/vllm/engine/llm_engine.py#L1379
with `or not self.has_unfinished_requests()`.
  • Loading branch information
kdamaszk authored Jan 24, 2025
1 parent 1a87bc5 commit 40745f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vllm/entrypoints/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,10 @@ def _run_engine(

if use_tqdm:
pbar.close()

# Make sure that all workers are finished.
self.llm_engine.stop_remote_worker_execution_loop()

# Sort the outputs by request ID.
# This is necessary because some requests may be finished earlier than
# its previous requests.
Expand Down

0 comments on commit 40745f0

Please sign in to comment.