Skip to content

vllm.v1.worker.gpu.cp_utils

Functions:

  • cp_local_slot –

    Return rank-local KV slots, or PAD_ID for positions not owned by this rank.

  • prepare_dcp_local_seq_lens –

    Populate caller-owned storage and return its padded view, or None without DCP.

cp_local_slot(positions, block_numbers, block_size, block_stride, cp_rank, CP_SIZE, CP_INTERLEAVE, PAD_ID)

Return rank-local KV slots, or PAD_ID for positions not owned by this rank.

prepare_dcp_local_seq_lens(dcp_local_seq_lens, seq_lens, num_reqs, dcp_size, dcp_rank, cp_interleave, *, num_reqs_padded=None)

Populate caller-owned storage and return its padded view, or None without DCP.