DflashProposerState

Struct DflashProposerState 

Source
pub struct DflashProposerState {
Show 15 fields pub block_table: Vec<u32>, pub seq_len: usize, pub last_num_drafted: usize, pub prefill_done: bool, pub ctx_hidden_acc: DevicePtr, pub ctx_len: usize, pub last_num_accepted: usize, pub skip_next_decode_append: bool, pub max_ctx_len: usize, pub ctx_slot_bytes: usize, pub block_table_dev: Option<DevicePtr>, pub ctx_count_drafter: usize, pub max_ctx_count_drafter: usize, pub ctx_committed: usize, pub ctx_positions: Vec<i32>,
}
Expand description

2026-09-25: Per-sequence DFlash drafter state. One block table serves every drafter layer: the paged cache has a pool per layer, addressed by the same slots.

Fields§

§block_table: Vec<u32>

2026-09-25: Host copy of the drafter block table.

§seq_len: usize§last_num_drafted: usize

2026-09-25: Drafts the last propose returned; after_verify and free_state reset it to 0.

§prefill_done: bool§ctx_hidden_acc: DevicePtr

2026-09-25: max_ctx_len rows of ctx_slot_bytes: captured target hiddens, one row per ctx position, the first ctx_len valid. Model-engine appends rows and slides the window when it is full; propose_drafts appends while there is room.

§ctx_len: usize

2026-09-25: Valid rows in ctx_hidden_acc, at most max_ctx_len.

§last_num_accepted: usize§skip_next_decode_append: bool

2026-09-25: Model-engine has already appended the latest capture; the next propose_drafts skips its own append and clears the flag.

§max_ctx_len: usize

2026-09-25: Rows ctx_hidden_acc holds (the window of alloc_state_windowed).

§ctx_slot_bytes: usize

2026-09-25: Bytes per ctx_hidden_acc row: target_layer_ids.len() * target_hidden_size * 2.

§block_table_dev: Option<DevicePtr>

2026-09-25: Device copy of block_table, made once when the first propose allocates the table; None before that and after free_state.

§ctx_count_drafter: usize

2026-09-25: Ctx rows of the paged cache the γ block attends to; propose_drafts sets it to ctx_len.

§max_ctx_count_drafter: usize

2026-09-25: Slots the allocated block table covers (block_table.len() * BLOCK_SIZE).

§ctx_committed: usize

2026-09-25: Ctx rows [0, ctx_committed) whose K/V is already in the paged cache; the next precompute starts here. Model-engine’s window slides reset it to 0.

§ctx_positions: Vec<i32>

2026-09-25: One RoPE position per ctx row (len() == ctx_len), stamped when the row is appended and kept when the window slides. Model-engine’s update_dflash_ctx_len_after_prefill seeds prefill row i with i.

Trait Implementations§

Source§

impl ProposerState for DflashProposerState

Source§

fn as_any(&self) -> &dyn Any

Source§

fn as_any_mut(&mut self) -> &mut dyn Any

Auto Trait Implementations§

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,