Skip to content

vllm.v1.hisparse.backend

Device operations used by the common HiSparse runtime and connector.

Classes:

HiSparseBackend

Methods:

create_ipc_event()

Create an event that can be exported to another process.

gather_resident_rows(source, destination, row_ids)

Copy resident rows into staging without changing their payload format.

prepare_kv_cache_views(kv_cache_config, kv_caches, forward_context)

Adapt device views before runtime binding; retain allocation ownership.

Called once per cache initialization, inside the common rollback scope. Backends must not put per-step metadata or transfers in this hook.

swap_blocks_batch(src, dst, sizes)

Enqueue device-to-host copies on the current stream.

validate_kv_cache_config(kv_cache_config)

Validate device cache formats before allocating or pinning storage.