vllm.distributed.elastic_ep.peer_weight_transfer ¶
Dense (non-expert) weight P2P between active and waking ranks.
Used by flash_epscale L2 wake to refill dense weights on a rank that just remapped its CuMem memory (vaddrs preserved, contents = garbage). Mirrors the filter used by elastic_ep's batch_transfer_weights so the two paths cover the same parameter set.
Functions:
-
get_max_dp_group–Return the always-preserved max DP communicator.
-
transfer_dense_to_waking_ranks–Refill dense weights on waking ranks from one active rank in the DP group.
get_max_dp_group() ¶
Return the always-preserved max DP communicator.
parallel_state._DP_MAX is set on the first NCCL split and kept alive even when _DP is shrunk via _sync_dp_group_to_active_ep_size. Read it directly to do P2P across all original DP ranks without mutating any DP global state. Falls back to _DP if no split ever happened.
Source code in vllm/distributed/elastic_ep/peer_weight_transfer.py
transfer_dense_to_waking_ranks(model, expert_weights, dp_group, waking_dp_ranks) ¶
Refill dense weights on waking ranks from one active rank in the DP group.
Must be called on every rank of dp_group in lockstep — active non-sender ranks return early after posting nothing. NCCL pairs the isend/irecv ops by (sender, receiver, op_index).