MidchunkCapture

Struct MidchunkCapture 

Source
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: usize

2026-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: usize

2026-09-25: Bytes per layer of h_state.

§conv_bytes: usize

2026-09-25: Bytes per layer of conv_state.

§ssm_layer_counter: &'a AtomicUsize

2026-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: bool

2026-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.

Auto Trait Implementations§

§

impl<'a> Freeze for MidchunkCapture<'a>

§

impl<'a> RefUnwindSafe for MidchunkCapture<'a>

§

impl<'a> Send for MidchunkCapture<'a>

§

impl<'a> Sync for MidchunkCapture<'a>

§

impl<'a> Unpin for MidchunkCapture<'a>

§

impl<'a> UnwindSafe for MidchunkCapture<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,