vllm.distributed.device_communicators.cpu_communicator
¶
Classes:
CpuCommunicator
¶
Bases: DeviceCommunicatorBase
Methods:
-
combine–Combine the hidden states and router logits from the appropriate device.
-
dispatch–Dispatch the hidden states and topk weights/ids to the appropriate device.
-
dispatch_router_logits–Dispatch the hidden states and router logits to the appropriate device.
-
gather–NOTE: We assume that the input tensor is on the same device across
_all_group_ranks_share_shm_group_name()
¶
CPUSHM requires all ranks in this group to agree on one SHM group name. This is a lightweight consistency check for VLLM_DIST_IDENT/name inputs.
combine(hidden_states, is_sequence_parallel=False)
¶
Combine the hidden states and router logits from the appropriate device. This is a no-op in the base class.
dispatch(hidden_states, topk_weights, topk_ids, is_sequence_parallel=False, extra_tensors=None)
¶
Dispatch the hidden states and topk weights/ids to the appropriate device. This is a no-op in the base class.
dispatch_router_logits(hidden_states, router_logits, is_sequence_parallel=False, extra_tensors=None)
¶
Dispatch the hidden states and router logits to the appropriate device. This is a no-op in the base class.
gather(input_, dst=0, dim=-1)
¶
NOTE: We assume that the input tensor is on the same device across
all the ranks.
NOTE: dst is the local rank of the destination rank.