Skip to content

vllm.v1.kv_offload.cpu.engines.torch

Torch copy mechanism for the CPU offload worker.

The engine is one class configured by the platform's TorchEngineConfig, so CUDA/ROCm/XPU do not need engine subclasses. Platform-specific copy functions, including CUDA's Triton fast path, live in platforms/.

Classes:

TorchCopyEngine

Bases: CopyEngine

Torch implementation of CopyEngine.

TorchCopyStream

Bases: CopyStream

A torch stream plus the start/end events of one transfer.

TorchEngineConfig dataclass

Platform parameters for the torch copy mechanism.