GdnFlags

Struct GdnFlags 

Source
pub struct GdnFlags {
    pub h_f16: bool,
    pub h_f16_pool: bool,
    pub fused_norm: bool,
    pub batched_recurrent: bool,
    pub exact_verify: bool,
}

Fields§

§h_f16: bool

--ssm-h-dtype f16: store the GDN decode h-state as FP16.

§h_f16_pool: bool

Stage 3 of the f16 h-state: additionally SIZE the h pools at 2 bytes per element. Must imply h_f16 (a narrow pool holding FP32 would be an OOB write, not a mode). NOT serveable yet and therefore has NO CLI surface — the CLI mapping always publishes false, and ssm_h_fp16_preconditions refuses it besides (defense in depth) — but the sizing plumbing keys off THIS field so the pool, preflight and every byte-copier already agree on the storage width when prefill narrowing lands.

§fused_norm: bool

--gdn-fused-norm: fused GDN output-norm decode kernel.

§batched_recurrent: bool

--ssm-batched-recurrent: one strided recurrent launch per batch.

§exact_verify: bool

--exact-verify: run the sequential-decode-EXACT per-token MTP-verify chain (issue #435 route (a)) instead of the default WY-chunkwise / fused BF16-conv arms. OPT-IN, default OFF; the measured decode-step cost (~+22-36% at the n=8/16/32 verify rungs) is why.

SCOPE: this makes the GDN/SSM verify chain exact. It does NOT deliver end-to-end spec-on == spec-off, because every FFN and attention projection dispatches on ROW COUNT (verify K=4 takes w4a16_gemv_batch4, decode takes w4a16_gemv) and those separate implementations round differently — ~5e-5 of lanes by 1 ULP, on every shape measured (#459). Closing that needs single-row routing for the whole verify forward, which is future work.

★ Attribution warning, learned the hard way: a 2026-08-21 measurement showed gross output degeneration (video-fidelity 0/2, 0/4 at C=2/C=4) that this flag appeared to fix. The real cause was the K=4 verdict rewind bug (#699); this flag only changed dispatch so the bug stopped firing. The 1-ULP divergence this flag actually closes has never been shown to cause more than an occasional flipped token at temperature 0. If flipping this flag changes gross behavior, suspect a dispatch- sensitive scheduler bug first. Details on ServeArgs::exact_verify.

Implementations§

Source§

impl GdnFlags

Source

pub fn verify_exact_active(self) -> bool

Whether the MTP-verify pass must run the sequential-decode-exact conv+GDN chain (issue #435 route (a)). Default FALSE: exact verify is opt-in via --exact-verify, so with default settings spec-on output is NOT bitwise-equal to spec-off (the #435 divergence ships).

Pure so it is testable without touching the process-global flags cell. h_f16 forces non-exact even when requested, because an FP16 h-state is a whole-chain numerics change that is not bit-comparable to the FP32 reference in the first place, and the exact arm’s kernels are FP32 readers (reading the FP16 pool through them would be silent garbage, not an error). CLI validation additionally REJECTS the explicit pair, so this clause is defense in depth, not the interface.

Trait Implementations§

Source§

impl Clone for GdnFlags

Source§

fn clone(&self) -> GdnFlags

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GdnFlags

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for GdnFlags

Source§

fn eq(&self, other: &GdnFlags) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for GdnFlags

Source§

impl Eq for GdnFlags

Source§

impl StructuralPartialEq for GdnFlags

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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