Skip to content

vllm.v1.worker.cpu.pp_utils

Pipeline-parallel sampled-token synchronization for the CPU runner.

Classes:

  • PPHandler –

    Synchronize sampled tokens from the last pipeline rank on CPU.

Functions:

PPHandler

Synchronize sampled tokens from the last pipeline rank on CPU.

Methods:

  • broadcast –

    Broadcast this step's sampled-token data from the last rank.

  • receive –

    Receive this step's sampled-token data on a non-last rank.

broadcast(sampled_token_ids, num_sampled, num_rejected, input_batch)

Broadcast this step's sampled-token data from the last rank.

receive(input_batch)

Receive this step's sampled-token data on a non-last rank.

compute_need_sampled_mask(input_batch)

Return a bool array of shape [input_batch.num_reqs] marking requests with outputs that might be needed in a subsequent (decode) step. Returns None if no sampled outputs are needed in the requests' next step.