pub fn gdn_carry_wy(
gpu: &dyn GpuBackend,
kernel: KernelHandle,
h_table: DevicePtr,
query: DevicePtr,
key: DevicePtr,
value: DevicePtr,
gate: DevicePtr,
beta: DevicePtr,
output: DevicePtr,
carry_base: DevicePtr,
slot_tab: DevicePtr,
pend: DevicePtr,
seq_floats: u32,
batch_size: u32,
num_k_heads: u32,
num_v_heads: u32,
qk_stride: u32,
v_stride: u32,
gb_stride: u32,
k_dim: u32,
engaged_flag: DevicePtr,
stream: u64,
) -> Result<()>Expand description
2026-09-26: Carried-state verify (gdn_carry_wy{2,3,4} or its _lazy form, chosen
by the caller’s kernel). It applies each sequence’s pending rows
(pend[slot_tab[b]]) to its copy of H and writes H back (the lazy form only when
this verify’s rows might not fit behind them in the stash,
pending + K > GDN_CARRY_CAP), writes the output, and stashes the rows it verified
at carry_base + slot * seq_floats. Engaged word b becomes 2 after a write-back,
else 1.