Skip to main content

SpecRoundGpu

Struct SpecRoundGpu 

Source
pub struct SpecRoundGpu {
    pub start_pos: usize,
    pub drafts: Vec<u32>,
    pub accepts: usize,
    pub verified: usize,
    pub t_batch: usize,
    pub t_cap: usize,
    pub confidence: Vec<f32>,
    pub emitted: usize,
    pub round_us: u64,
}
Expand description

One verify round’s bookkeeping (the device twin of spec_oracle::SpecRound).

Fields§

§start_pos: usize§drafts: Vec<u32>§accepts: usize§verified: usize§t_batch: usize

batch depth actually forwarded this round (T = 1 + verifiable drafts)

§t_cap: usize

STRUCTURAL depth ceiling for this round: min(k_drafts + 1, MEMRA_DSV4_SPEC_DEPTH, vstate.tmax) – i.e. t_batch before the n_new budget is applied. t_batch < t_cap is exactly “the budget truncated this round”, which is what carry_pending keys on.

§confidence: Vec<f32>

The drafter’s fp32 per-slot confidence for this round’s proposal (pre-sigmoid logits; the head is supervised on c* = 1 - TV, i.e. conditional acceptance probability). Banked per round so the DSpark Algorithm-1 scheduler can be scored offline against measured round costs – never consumed by the round itself.

§emitted: usize

tokens this round contributed to the output stream (head + accepted drafts)

§round_us: u64

wall time of the whole round — proposal, batched verify, commit/rollback, drafter ring advance — with the drafter stream synchronized at the round boundary so no work leaks into the next round’s measurement. The A/B instrument.

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.

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.