vllm.model_executor.offloader.uva
¶
UVA-based CPU offloading using Unified Virtual Addressing.
Classes:
-
UVAOffloader–Offloader using Unified Virtual Addressing (UVA) for zero-copy access.
UVAOffloader
¶
Bases: BaseOffloader
Offloader using Unified Virtual Addressing (UVA) for zero-copy access.
This offloader moves parameters to pinned CPU memory and creates CUDA views using UVA. The GPU can then directly access the CPU memory without explicit transfers, at the cost of PCIe bandwidth (slower than GPU memory).
When UVA is disabled via env var, falls back to a functional_call-based approach that moves parameters on-demand.
Parameters:
-
(cpu_offload_max_bytes¶int) –Maximum bytes to offload to CPU.
-
(cpu_offload_params¶set[str] | None, default:None) –Set of parameter name segments to selectively offload. If empty, all parameters are eligible up to the byte limit.
Methods:
-
targets–Whether
cpu_offload_paramsselects the parameterparam_name. -
wrap_modules–Wrap modules with UVA offloading.