vllm.distributed.pp_transport
¶
PP communication backends: the transport of a stage's intermediate tensors to
the next stage (NCCL, or an alternative selected by VLLM_PP_TRANSPORT), and the
last stage's per-step broadcasts to the earlier stages.
Modules:
-
copy_engine–PP transport on CUDA copy engines, synchronized on the GPU (one NVLink
-
rocm_sdma–The flag ops and peer copy of
copy_engine.CopyEngineTransporton ROCm
Classes:
-
NcclBroadcast–PPBroadcastover a device process group. -
PPBroadcast–The last PP rank's per-step broadcast to the other ranks of its PP chain.
-
PPTransport–One rank's side of its PP stage boundaries.
Functions:
-
check_intermediate_tensors–Raise unless
tensorsmatch the receiving stage's persistent intermediate -
create_pp_transport–Collective over the PP group. Returns None (send over NCCL) without PP,
NcclBroadcast
¶
PPBroadcast
¶
Bases: ABC
The last PP rank's per-step broadcast to the other ranks of its PP chain. All ranks call it on the same steps with the same keys, in the same order; the work is queued on the current stream.
Methods:
check_intermediate_tensors(tensors, expected)
¶
Raise unless tensors match the receiving stage's persistent intermediate
tensors in keys, dtypes and per-token shapes, which every PP transport
requires. Otherwise the copy into them would silently drop, cast or
broadcast values.
create_pp_transport(vllm_config, persistent, pp_handler=None)
¶
Collective over the PP group. Returns None (send over NCCL) without PP, under "auto" on ROCm, or under "auto" when copy engines are not usable on some rank; every rank makes the same choice.
Parameters:
-
(vllm_config¶VllmConfig) –The engine config.
-
(persistent¶IntermediateTensors | None) –The model runner's persistent intermediate tensors (non-first ranks), which received tensors are copied into.
-
(pp_handler¶PPHandler | None, default:None) –The model runner's PP handler, whose broadcasts are moved to the transport where it can carry them.