Skip to content

vllm.v1.kv_offload.cpu.platforms.factory

Factory selecting the platform runtime for the CPU offload worker.

Classes:

Functions:

DeviceRuntimeFactory

Registry mapping vLLM platforms to their CPU offload runtime.

Registrations hold an import path rather than a class, so selecting a runtime never imports a platform module (or touches a device) until it is used.

UnsupportedRuntime

Bases: DeviceRuntime

Placeholder for platforms without a CPU offload implementation.

get_device_runtime()

Return the runtime registered for the current platform.

Intentionally uncached: platform imports stay lazy, so this is safe to call from the scheduler process, and tests can patch current_platform.