diff --git a/vllm/v1/engine/utils.py b/vllm/v1/engine/utils.py index ac3acafbe01d0..8dc9ed2257afb 100644 --- a/vllm/v1/engine/utils.py +++ b/vllm/v1/engine/utils.py @@ -611,8 +611,8 @@ def launch_core_engines( else: # Just handshake with local engines. engines_to_handshake = [ - CoreEngine(index=i, local=True) for i in - range(dp_rank, dp_rank + local_engine_count) + CoreEngine(index=i, local=True) + for i in range(dp_rank, dp_rank + local_engine_count) ] # Whether the started engines will handshake only with co-located @@ -624,8 +624,7 @@ def launch_core_engines( handshake_address = get_engine_client_zmq_addr( handshake_local_only, host, parallel_config.data_parallel_rpc_port) - # if external_dp_lb and dp_rank > 0: - if dp_rank > 0: + if external_dp_lb and dp_rank > 0: assert not handshake_local_only local_handshake_address = get_open_zmq_ipc_path() client_handshake_address = local_handshake_address @@ -640,8 +639,6 @@ def launch_core_engines( # Start local engines. if local_engine_count: - # In server mode, start_index is the dp_rank and - # local_start_index is 0. local_engine_manager = CoreEngineProcManager( EngineCoreProc.run_engine_core, vllm_config=vllm_config, @@ -652,6 +649,7 @@ def launch_core_engines( local_client=True, local_engine_count=local_engine_count, start_index=dp_rank, + # In server, this is 0. local_start_index=local_start_index or 0) else: local_engine_manager = None