A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 16, 19:30 UTC
[Misc] Revive to use loopback address for driver IP (#7091)
Signed-off-by: Rui Qiao <ruisearch42@gmail.com>
Rui Qiao committed
Aug 2, 2024 at 15:50 UTC
22e718ff1a51930231d87c89d6c43676af59860b
1 file changed
+10
vllm/executor/ray_gpu_executor.py
+10
@@ -216,6 +216,16 @@ class RayGPUExecutor(DistributedGPUExecutor):
216
self._run_workers("update_environment_variables",
217
all_args=all_args_to_update_environment_variables)
218
219
+ if len(node_gpus) == 1:
220
+ # in single node case, we don't need to get the IP address.
221
+ # the loopback address is sufficient
222
+ # NOTE: a node may have several IP addresses, one for each
223
+ # network interface. `get_ip()` might return any of them,
224
+ # while they might not work for communication inside the node
225
+ # if the network setup is complicated. Using the loopback address
226
+ # solves this issue, as it always works for communication inside
227
+ # the node.
228
+ driver_ip = "127.0.0.1"
229
distributed_init_method = get_distributed_init_method(
230
driver_ip, get_open_port())
231