vllm.v1.kv_offload.cpu.platforms.cuda
¶
CUDA implementation of the CPU offload platform services.
ROCm reuses these classes (see rocm.py); everything in this module is the
CUDA API surface that both implement, with NVIDIA defaults.
Classes:
-
CudaRuntime–Platform services for NVIDIA GPUs.
Functions:
-
swap_blocks_batch–Triton implementation of
swap_blocks_batchfor small CPU->device batches.
CudaRuntime
¶
_clear_pending_device_error()
¶
Clear the error a failed copy left pending for the next kernel launch.
_host_register(ptr, num_bytes)
¶
Register a host range as device-accessible pinned memory.
_host_unregister(ptr)
¶
Release a host range previously registered by _host_register.
_relax_stream_capture()
¶
Let this thread call cudaHostRegister while another captures a graph.
A global-mode capture otherwise fails on such a call from any thread.
swap_blocks_batch(src_addrs, dst_addrs, sizes, is_src_access_order_any=False, *, bytes_per_chunk)
¶
Triton implementation of swap_blocks_batch for small CPU->device batches.
Selected only by the CUDA runtime, so the device is CUDA.