vllm.distributed.device_communicators.all2all
¶
Classes:
-
AgRsAll2AllManager–An implementation of all2all communication based on
-
DeepEPAll2AllManagerBase–All2All communication based on DeepEP High-Throughput kernels.
-
DeepEPHTAll2AllManager–All2All communication based on DeepEP High-Throughput kernels.
-
DeepEPLLAll2AllManager–All2All communication based on DeepEP Low-Latency kernels.
-
DeepEPV2All2AllManager–All2All communication based on DeepEP v2 ElasticBuffer (unified API).
-
FlashInferNVLinkOneSidedManager–MoE EP communication using FlashInfer's NVLink one-sided wrapper.
-
FlashInferNVLinkTwoSidedManager–All2All communication based on flashinfer all2allv/two-sided NVLink kernels.
-
MoonEPAll2AllManager–All2All communication based on MoonEP
-
NixlEPAll2AllManager–All2All communication based on NIXL EP kernels.
-
PassThroughAll2AllManager–Placeholder for
all2all_backend="passthrough".
AgRsAll2AllManager
¶
Bases: All2AllManagerBase
An implementation of all2all communication based on all-gather (dispatch) and reduce-scatter (combine).
Methods:
-
combine–Reduce-scatter hidden_states across all dp ranks.
-
dispatch–Gather hidden_states and router_logits from all dp ranks.
-
dispatch_router_logits–Gather hidden_states and router_logits from all dp ranks.
combine(hidden_states, is_sequence_parallel=False)
¶
Reduce-scatter hidden_states across all dp ranks.
dispatch(hidden_states, topk_weights, topk_ids, is_sequence_parallel=False, extra_tensors=None)
¶
Gather hidden_states and router_logits from all dp ranks.
dispatch_router_logits(hidden_states, router_logits, is_sequence_parallel=False, extra_tensors=None)
¶
Gather hidden_states and router_logits from all dp ranks.
DeepEPAll2AllManagerBase
¶
DeepEPHTAll2AllManager
¶
DeepEPLLAll2AllManager
¶
Bases: DeepEPAll2AllManagerBase
All2All communication based on DeepEP Low-Latency kernels.
Methods:
-
get_handle–The kwargs for DeepEPLLAll2AllManager is dictated by
_make_all2all_kwargs(max_num_tokens_per_dp_rank, token_hidden_size, num_ep_ranks, num_global_experts, num_local_experts)
¶
Build the kwargs for the DeepEP low-latency buffer.
Parameters:
-
(max_num_tokens_per_dp_rank¶int) –The maximum number of tokens a DP rank can dispatch. All the ranks must hold the same value.
-
(token_hidden_size¶int) –The hidden dimension of each token.
-
(num_ep_ranks¶int) –The number of EP group ranks.
-
(num_global_experts¶int) –Number of experts in the model.
-
(num_local_experts¶int) –Number of experts in an EP rank.
get_handle(kwargs)
¶
The kwargs for DeepEPLLAll2AllManager is dictated by _make_all2all_kwargs.
DeepEPV2All2AllManager
¶
Bases: All2AllManagerBase
All2All communication based on DeepEP v2 ElasticBuffer (unified API). Uses NCCL Gin backend with analytical SM calculation.
FlashInferNVLinkOneSidedManager
¶
Bases: All2AllManagerBase
MoE EP communication using FlashInfer's NVLink one-sided wrapper.
Methods:
-
initialize–Share the largest token, dispatch-row and combine-row capacities.
initialize(max_num_tokens, top_k, num_experts, hidden_size, dispatch_format=None, extra_payload_bytes_per_token=0)
¶
Share the largest token, dispatch-row and combine-row capacities.
FlashInferNVLinkTwoSidedManager
¶
Bases: All2AllManagerBase
All2All communication based on flashinfer all2allv/two-sided NVLink kernels.
Methods:
-
get_communication–Return the communication for these sizes, creating it on first use.
get_communication(max_num_tokens, top_k, num_experts, hidden_size)
¶
Return the communication for these sizes, creating it on first use.
Creation is collective over the EP group. FlashInfer keeps one workspace per process and shares it across communications.
MoonEPAll2AllManager
¶
Bases: All2AllManagerBase
All2All communication based on MoonEP (https://github.com/MoonshotAI/MoonEP).
MoonEP keeps token loads perfectly balanced across EP ranks by planning a small number of dynamically redundant experts online and prefetching their weights before expert compute. Every rank receives exactly S x K token slots regardless of router skew, so all communication and compute shapes are static.
Requires NVLink symmetric-memory / multicast capable topologies (single node NVSwitch, e.g. H100/H200/B200/GB300 class).
NixlEPAll2AllManager
¶
Bases: All2AllManagerBase
All2All communication based on NIXL EP kernels. This backend supports elastic EP with dynamic rank connection/disconnection.
Methods:
-
commit_ep_size–Commit the staged EP size to the active communication set.
commit_ep_size()
¶
Commit the staged EP size to the active communication set.
PassThroughAll2AllManager
¶
Bases: All2AllManagerBase
Placeholder for all2all_backend="passthrough".
The MoE backend dispatches and combines itself, so there is no all2all to manage.
_mori_epv2_arena_bytes(cfg)
¶
Upper bound of a MORI EPv2 gather-mode op's symmetric arena.
Mirrors the intranode regions of MORI's hip_backend: per received row disp_out, out_tok, out_scales, out_idx + out_wts (topk * 4 each) and recv_to_src_token (4); per rank recv_num (8 since MORI 1.2.4) and cross_device_barrier (8); and tok_off (4). MORI allocates the arena inside the window itself, so an underestimate fails there rather than overlapping.
_require_single_node_without_mnnvl()
¶
Fail clearly if one-sided all2all would span hosts without MNNVL.
GB200/GB300/VR200 connect hosts over MNNVL. On other hardware (HGX B200 and B300) the NVLink domain ends at the node, so every rank must share one host.