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],
}
Expand description

Per-pass descriptor for mid-chunk SSM tail capture. Points at the reserved Marconi snapshot slot’s per-SSM-layer destination buffers (already offset to the slot) plus the split point in local (chunk) token coordinates.

ssm_layer_counter is a fresh per-pass counter: each SSM layer’s prefill increments it once, in model order, so the value indexes h_dsts/conv_dsts (which are in the same SSM-layer order as the snapshot pool).

Fields§

§cap_local: usize

Split point in local token coordinates: capture state AFTER this many tokens (== tb - proc_start).

§h_dsts: &'a [DevicePtr]

Per-SSM-layer h_state snapshot destination (offset to the reserved slot).

§conv_dsts: &'a [DevicePtr]

Per-SSM-layer conv_state snapshot destination (offset to the reserved slot).

§h_bytes: usize

Bytes per layer of h_state.

§conv_bytes: usize

Bytes per layer of conv_state.

§ssm_layer_counter: &'a AtomicUsize

Fresh per-pass SSM-layer ordinal counter (model order == pool order).

§cap_local_early: Option<usize>

Optional SECOND capture one KV block earlier, at tb - block_size (local split point cap_local - block_size). Some only when the pass also covers that point. On ~5/19 warm turns the next turn’s block-floored matched_tokens lands exactly tb - block_size (generation-suffix / retokenize divergence), one block short of the tail; registering this earlier restore point makes those turns zero-replay too.

§h_dsts_early: &'a [DevicePtr]

Per-SSM-layer h_state dst for the tb - block_size slot (offset applied).

§conv_dsts_early: &'a [DevicePtr]

Per-SSM-layer conv_state dst for the tb - block_size slot.

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, 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