Skip to content

vllm.distributed.pp_transport

Alternatives to NCCL for sending a PP stage's intermediate tensors to the next stage, selected by VLLM_PP_TRANSPORT.

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.CopyEngineTransport on ROCm

Classes:

  • PPTransport –

    One rank's side of its PP stage boundaries.

Functions:

PPTransport

Bases: ABC

One rank's side of its PP stage boundaries.

Methods:

  • recv –

    Receive this step's inputs from the previous stage.

  • send –

    Send this step's outputs to the next stage. The caller may

recv(pp_group) abstractmethod

Receive this step's inputs from the previous stage.

send(tensors, pp_group) abstractmethod

Send this step's outputs to the next stage. The caller may overwrite tensors once this returns.

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)

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.