Skip to content

Commit

Permalink
Use world group to broadcast metadata on ROCm
Browse files Browse the repository at this point in the history
Partially reverts [Core][Distributed] use cpu group to broadcast
metadata in cpu (vllm-project/vllm#4444)
  • Loading branch information
mawong-amd committed Jun 4, 2024
1 parent ba6b2d3 commit 4ec4c7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vllm/distributed/communication_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
get_tensor_model_parallel_world_size,
get_tp_ca_communicator,
get_tp_pynccl_communicator)
from vllm.utils import is_hip


@dataclass
Expand Down Expand Up @@ -251,7 +252,10 @@ def broadcast_tensor_dict(
return tensor_dict

group = group or torch.distributed.group.WORLD
metadata_group = metadata_group or get_cpu_world_group()
if is_hip():
metadata_group = metadata_group or torch.distributed.group.WORLD
else:
metadata_group = metadata_group or get_cpu_world_group()
ranks = torch.distributed.get_process_group_ranks(group)
assert src in ranks, f"Invalid src rank ({src})"

Expand Down

0 comments on commit 4ec4c7c

Please sign in to comment.