[Feature] Add --cpu-distributed-timeout-seconds CLI Option for CPU Process Group Timeout (#42968)
Signed-off-by: fangyuchu <fangyuchu@qq.com> Signed-off-by: zWaNg3 <389750525@qq.com> Co-authored-by: zWaNg3 <389750525@qq.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
zWaNg3
mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent
0f66623b0d
commit
e26e1f0928
@@ -335,6 +335,10 @@ class GroupCoordinator:
|
||||
self_device_group = None
|
||||
self_cpu_group = None
|
||||
|
||||
from vllm.distributed.utils import get_cpu_distributed_timeout_or_none
|
||||
|
||||
timeout = get_cpu_distributed_timeout_or_none()
|
||||
|
||||
for ranks in group_ranks:
|
||||
device_group = torch.distributed.new_group(
|
||||
ranks, backend=torch_distributed_backend
|
||||
@@ -342,7 +346,9 @@ class GroupCoordinator:
|
||||
# a group with `gloo` backend, to allow direct coordination between
|
||||
# processes through the CPU.
|
||||
with suppress_stdout():
|
||||
cpu_group = torch.distributed.new_group(ranks, backend="gloo")
|
||||
cpu_group = torch.distributed.new_group(
|
||||
ranks, backend="gloo", timeout=timeout
|
||||
)
|
||||
if self.rank in ranks:
|
||||
self.ranks = ranks
|
||||
self.world_size = len(ranks)
|
||||
|
||||
Reference in New Issue
Block a user