pub struct MidchunkCapture<'a> {
pub cap_local: usize,
pub h_dsts: &'a [DevicePtr],
pub conv_dsts: &'a [DevicePtr],
pub h_bytes: usize,
pub conv_bytes: usize,
pub ssm_layer_counter: &'a AtomicUsize,
pub cap_local_early: Option<usize>,
pub h_dsts_early: &'a [DevicePtr],
pub conv_dsts_early: &'a [DevicePtr],
pub replay_tail: bool,
}Expand description
2026-09-25: Per-pass descriptor for mid-chunk SSM tail capture: the reserved snapshot slot’s per-SSM-layer destinations and the split point in pass-local token coordinates.
Each SSM layer’s prefill takes one ordinal from ssm_layer_counter, in model order, and
uses it to index h_dsts/conv_dsts.
Fields§
§cap_local: usize2026-09-25: Capture the state after this many tokens of the pass
(tb - proc_start).
h_dsts: &'a [DevicePtr]2026-09-25: Per-SSM-layer h_state destination in the reserved slot.
conv_dsts: &'a [DevicePtr]2026-09-25: Per-SSM-layer conv_state destination in the reserved slot.
h_bytes: usize2026-09-25: Bytes per layer of h_state.
conv_bytes: usize2026-09-25: Bytes per layer of conv_state.
ssm_layer_counter: &'a AtomicUsize2026-09-25: Per-pass SSM-layer ordinal counter, starting at 0.
cap_local_early: Option<usize>2026-09-25: Split point of a second capture one KV block earlier, at
tb - block_size; Some only when the pass covers that point and a second snapshot
slot was reserved.
h_dsts_early: &'a [DevicePtr]2026-09-25: Per-SSM-layer h_state destination in the tb - block_size slot.
conv_dsts_early: &'a [DevicePtr]2026-09-25: Per-SSM-layer conv_state destination in the tb - block_size slot.
replay_tail: bool2026-10-01: The rows from cap_local on must get the bits a prefill pass starting
at cap_local would give them, the pass a later request runs when it restores the
captured state (a tail-split capture, prefill_plan::tail_split_point): the GDN
recurrence after the split takes the exact-replay arm, and attention runs those rows
as their own paged call. False for the metrale_scale tail capture.