vllm.v1.hisparse.binding ¶
Worker-side wiring of HiSparse caches to attention layers.
Functions:
-
allocate_hisparse_kv_caches–Allocate the host pool separately from the shared device backing.
-
bind_hisparse_kv_caches–Bind existing cache storage and block tables; return the bound handles.
-
init_hisparse_kv_cache–Allocate and bind HiSparse caches within the caller's allocation context.
-
resolve_hisparse_block_size–Resolve a common kernel block size in-place for HiSparse MLA specs.
allocate_hisparse_kv_caches(kv_cache_config, device, layout, kernel_block_sizes, host_pool) ¶
Allocate the host pool separately from the shared device backing.
Source code in vllm/v1/hisparse/binding.py
bind_hisparse_kv_caches(*, forward_context, kv_cache_config, kv_caches, block_tables, host_pool) ¶
Bind existing cache storage and block tables; return the bound handles.
Source code in vllm/v1/hisparse/binding.py
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 | |
init_hisparse_kv_cache(kv_cache_config, device, kernel_block_sizes, vllm_config, forward_context, block_tables) ¶
Allocate and bind HiSparse caches within the caller's allocation context.
Source code in vllm/v1/hisparse/binding.py
resolve_hisparse_block_size(vllm_config, kv_cache_spec, attn_layers) ¶
Resolve a common kernel block size in-place for HiSparse MLA specs.