pub fn qsa_prefill_attn(
gpu: &dyn GpuBackend,
kernel: KernelHandle,
q: DevicePtr,
k_cache: DevicePtr,
v_cache: DevicePtr,
block_table: DevicePtr,
lists: DevicePtr,
attn_out: DevicePtr,
rows: u32,
first_pos: u32,
topk: u32,
ratio: u32,
block_size: u32,
nq: u32,
nkv: u32,
hd: u32,
inv_sqrt_d: f32,
stream: u64,
) -> Result<()>Expand description
2026-09-25: Per (row, q head), attention over exactly the selected blocks in
lists plus the incomplete tail, read from the paged cache; the result
overwrites that row’s context in attn_out.