Expand description
2026-09-25: GPU side of the high-speed-swap block predictor. Loads the
q_lowrank_project, kv_lowrank_project and predictor_score PTX from build.rs
and owns the projection P and the per-token low-rank keys A_g.
Owner: storage, high-speed swap. Invariants:
Pis written once, in the constructor, fromprojection_seed.
project_q computes Q @ P; project_kv_block computes K @ P for every token of
one block; score_blocks gives each block the max, over query heads and tokens,
of the projected dot product. HighSpeedSwap uses the scores only to rank
eviction victims (EvictionPolicy::record_score); attention reads every block.
Structs§
Constants§
Functions§
- read_
k_ lr_ slot - 2026-09-25: Copy the A_g slot of
(layer, block)to the host, as BF16[num_kv_heads, block_size, r], and synchronise the stream.