From 6491d5920252cf6f1d82bc392f89072069f37c8a Mon Sep 17 00:00:00 2001 From: Robert Shaw Date: Sun, 20 Jul 2025 20:32:02 +0000 Subject: [PATCH] cleanup Signed-off-by: Robert Shaw --- vllm/v1/engine/utils.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/vllm/v1/engine/utils.py b/vllm/v1/engine/utils.py index 97d5c939a2853..00943046d605a 100644 --- a/vllm/v1/engine/utils.py +++ b/vllm/v1/engine/utils.py @@ -598,16 +598,21 @@ def launch_core_engines( yield engine_actor_manager, coordinator, addresses return - if offline_mode or (external_dp_lb and dp_rank > 0): + if offline_mode: assert local_engine_count == 1 engines_to_handshake = [CoreEngine(index=dp_rank, local=True)] elif dp_rank == 0: + # Rank 0 holds Coordinator, so it handshakes will all Cores, + # in addition to those that it is managing. engines_to_handshake = [ CoreEngine(index=i, local=(i < local_engine_count)) for i in range(dp_size) ] else: - # Just handshake with local engines. + # All other ranks just handshake with those that it is managing. + assert vllm_config.parallel_config.data_parallel_external_lb, ( + "Attempting to launch core_engines from dp_rank > 0, but " + "found internal DPLB, which is incompatible.") engines_to_handshake = [ CoreEngine(index=i, local=True) for i in range(dp_rank, dp_rank + local_engine_count)