pub trait LayerWriteOnAccept {
// Provided methods
fn gdn_woa_stash_seq_floats(&self) -> Option<usize> { ... }
fn gdn_woa_bind(&self, _flag: DevicePtr, _stash: DevicePtr, _seqs: usize) { ... }
fn gdn_carry_seq_floats(&self) -> Option<usize> { ... }
fn gdn_carry_bind(&self, _binding: GdnCarryBinding) { ... }
fn gdn_verify_run_batched(
&self,
_states: &[&mut (dyn LayerState + 'static)],
_kk: usize,
_gdn_wyn: bool,
_wy_tables: DevicePtr,
) -> Result<Option<bool>> { ... }
fn gdn_fold_accepted(
&self,
_gpu: &dyn GpuBackend,
_h_table: DevicePtr,
_na_tab: DevicePtr,
_k_rows: usize,
_n: usize,
_stream: u64,
) -> Result<bool> { ... }
}Expand description
2026-09-26: A supertrait of TransformerLayer; see the module header.
Provided Methods§
Sourcefn gdn_woa_stash_seq_floats(&self) -> Option<usize>
fn gdn_woa_stash_seq_floats(&self) -> Option<usize>
2026-09-25: Per-sequence write-on-accept stash size in f32 elements when this layer
can run write-on-accept, None otherwise (the default). The model sizes the stash
from the largest answer and binds each GDN layer with Self::gdn_woa_bind.
Sourcefn gdn_woa_bind(&self, _flag: DevicePtr, _stash: DevicePtr, _seqs: usize)
fn gdn_woa_bind(&self, _flag: DevicePtr, _stash: DevicePtr, _seqs: usize)
2026-09-25: Bind this layer’s write-on-accept flag word and stash slab (seqs
sequences of Self::gdn_woa_stash_seq_floats f32 each). The model calls it
once, on the first write-on-accept request and before its graph decision, and
never moves the buffers afterwards (gdn_woa.rs).
Sourcefn gdn_carry_seq_floats(&self) -> Option<usize>
fn gdn_carry_seq_floats(&self) -> Option<usize>
2026-09-26: Per-slot carried-state stash size in f32 elements when this layer can
run the carried-state verify, None otherwise (the default).
Sourcefn gdn_carry_bind(&self, _binding: GdnCarryBinding)
fn gdn_carry_bind(&self, _binding: GdnCarryBinding)
2026-09-26: Bind this layer’s carried-state buffers. Called once, before any capture; the buffers never move afterwards.
Sourcefn gdn_verify_run_batched(
&self,
_states: &[&mut (dyn LayerState + 'static)],
_kk: usize,
_gdn_wyn: bool,
_wy_tables: DevicePtr,
) -> Result<Option<bool>>
fn gdn_verify_run_batched( &self, _states: &[&mut (dyn LayerState + 'static)], _kk: usize, _gdn_wyn: bool, _wy_tables: DevicePtr, ) -> Result<Option<bool>>
2026-09-30: Whether a batched verify runs one run of states (adjacent sequences of
width kk, under the WY tables at wy_tables) through the batched conv and the
table-form WY, as this layer’s own batched verify decides it; None for a layer
without a batched GDN verify (the default). The circuit executor picks each run’s arm
with it.
Sourcefn gdn_fold_accepted(
&self,
_gpu: &dyn GpuBackend,
_h_table: DevicePtr,
_na_tab: DevicePtr,
_k_rows: usize,
_n: usize,
_stream: u64,
) -> Result<bool>
fn gdn_fold_accepted( &self, _gpu: &dyn GpuBackend, _h_table: DevicePtr, _na_tab: DevicePtr, _k_rows: usize, _n: usize, _stream: u64, ) -> Result<bool>
2026-09-25: Apply the accepted rows of the last batched verify to this layer’s h
states. h_table is the layer’s WY pointer-table slice, na_tab a device u32[n]
of accepted row counts in batch order. Ok(false) when the layer did nothing, as
the default does.