pub struct KdaRowsStash {
pub ring_snap: CudaSlice<f32>,
pub raws: [CudaSlice<f32>; 3],
pub scan: KdaScanInputs,
pub rows: usize,
}Expand description
The rollback stash of one BATCHED verify-rows KDA call (lane/glm5-verify-batch): the
per-layer t=K+1 twin of the per-row KdaScanInputs steal. Everything here is either
stolen from buffers the call allocated anyway (raws, scan — zero copies) or one
small clone per layer per round (ring_snap, 3*qkv*(kernel-1) floats ~ 96 KiB).
Rollback to keep rows rebuilds both state planes EXACTLY:
- conv ring: restore
ring_snap, then re-issuekda_conv_ring_rollper plane overrawsat T=keep — the roll is pure placement (no arithmetic), so the rebuilt ring is the sequential chain’s ring after row keep-1 byte-for-byte. - ssm state: ONE
kda_scanreplay at T=keep from the caller’s pre-round snapshot over the batchedscaninputs (the kernel walks rows 0..keep of the [t, ..] buffers) — the in-kernel T-loop IS the chained t=1 program (register-resident state, identical per-step order), held by the scan-chain bit-gate.
Fields§
§ring_snap: CudaSlice<f32>The fused conv ring BEFORE this call’s rolls (one clone per layer per round).
raws: [CudaSlice<f32>; 3]RAW (pre-conv) q/k/v projection rows [t, qkv], stolen post-roll (plane order).
scan: KdaScanInputsBatched scan inputs [t, ..], stolen post-scan.
rows: usizeRow count of the call that filled this stash; rollback validates keep against it.
Auto Trait Implementations§
impl Freeze for KdaRowsStash
impl RefUnwindSafe for KdaRowsStash
impl Send for KdaRowsStash
impl Sync for KdaRowsStash
impl Unpin for KdaRowsStash
impl UnsafeUnpin for KdaRowsStash
impl UnwindSafe for KdaRowsStash
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more