Skip to main content

Module selftest

Module selftest 

Source
Expand description

Shipped integer-overflow proofs for the kernels this crate can dispatch.

The canonical Q8 converter emits symmetric signed weights in [-127, 127]; -128 is deliberately excluded. Dynamic unsigned activations can span [0, 255]. Every dot-product route therefore has to prove its i32 accumulator against 255 * 127 * K at this checkpoint’s real reduction lengths, not a bound borrowed from another model.

Two proof families run at every census binding K:

  • U8S8 envelope (255 * 127 * K): the contract ceiling for a future unsigned-activation route (x86 VNNI’s +128 fold), executed on the checked scalar path. It strictly dominates the S8S8 magnitude, so it remains the conservative bound for every row.
  • S8S8 kernel (±127 * 127 * K): executed through the real crate::int8::dot_i32 kernel on every tier this build can dispatch (crate::int8::Int8Tier::available), each result compared against the independent i64 oracle and the scalar route’s i32.

A native tier must appear here, through its real kernel function, before it may be selected. The rows mirror the binding component maxima in docs/truth-pack/EXECUTION_CENSUS.json, plus the seq-16 microdecoder verifier, whose larger M does not alter its per-output reduction length.

Structs§

OverflowProofRow
One permanent, model-specific i32-overflow obligation.
SelftestCheck
One completed proof result.
SelftestReport
A complete selftest result for the dispatched routes in this build.

Enums§

DotContract
Which numeric contract a proof check exercised.
ExecutionScope
The model component whose maximum reduction length a proof row represents.
KernelTier
A route that this build can actually execute and certify.

Constants§

OVERFLOW_PROOF_ROWS
Component maxima generated from the pinned execution census.
S8_MAX_ABS
Largest absolute signed Q8 weight byte under the canonical symmetric recipe.
U8_MAX
Largest unsigned activation byte accepted by the U8S8 contract.

Functions§

run_selftest
Runs the permanent overflow proof against every route this build can dispatch.