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 15, 18:30 UTC
[BugFix] Fix torch distributed stateless PG backend init (#14870)
Signed-off-by: Nick Hill <nhill@redhat.com>
Nick Hill committed
Mar 15, 2025 at 20:26 UTC
b82662d9523d9aa1386d8d1de410426781a1fa3b
2 files changed
+8
-3
examples/offline_inference/data_parallel.py
+5
@@ -76,5 +76,10 @@ if __name__ == "__main__":
76
GPUs_per_dp_rank))
77
proc.start()
78
procs.append(proc)
79
+ exit_code = 0
80
for proc in procs:
81
proc.join()
82
+ if proc.exitcode:
83
+ exit_code = proc.exitcode
84
+
85
+ exit(exit_code)
vllm/distributed/utils.py
+3
-3
@@ -299,13 +299,10 @@ def stateless_init_torch_distributed_process_group(
299
# different systems (e.g. RPC) in case the store is multi-tenant.
300
prefix_store = PrefixStore(init_method, store)
301
302
- pg_options = ProcessGroup.Options(backend=backend, timeout=timeout)
303
-
302
pg: ProcessGroup = ProcessGroup(
303
prefix_store,
304
group_rank,
305
group_size,
308
- pg_options,
306
)
307
308
if backend == "gloo":
@@ -327,7 +324,10 @@ def stateless_init_torch_distributed_process_group(
324
backend_options)
325
backend_type = ProcessGroup.BackendType.NCCL
326
device = torch.device("cuda")
327
+ else:
328
+ raise RuntimeError(f"Unsupported torch distributed backend: {backend}")
329
330
+ pg._set_default_backend(backend_type)
331
backend_class._set_sequence_number_for_group()
332
333
pg._register_backend(device, backend_type, backend_class)