Skip to content

vllm.v1.worker.gpu.buffer_utils

Classes:

FusedStagedWriter

Applies the staged writes of several StagedWriteTensors at once.

Methods:

  • apply –

    Apply and clear the staged writes of tensors with one kernel.

apply(tensors, output_ptrs, output_strides)

Apply and clear the staged writes of tensors with one kernel.

NonUvaBuffer

Explicit-copy fallback for platforms without UVA.

StagedWriteTensor

Methods:

  • stage_write –

    Stage writing x to row index from column start.

stage_write(index, start, x)

Stage writing x to row index from column start.

A 1-D numpy array or an array.array is kept by reference and copied only by apply_write, so it must not be modified until then. Its values are cast to this tensor's dtype, and out-of-range values wrap silently.

UvaBufferPool

Preallocate each slot at size, growing its first dimension as needed.

Callers must retire a slot's GPU readers before reuse, including growth.