nx_mcu_q4_gate.nx
buildroot/runtime/nx_mcu_q4_gate.nx
about
nx_mcu_q4_gate.nx -- pins the int4 x int8 MCU kernel to EXACT integer answers.
Every expectation below is hand-computable, so this gate asserts EQUALITY, not closeness. That matters:
the two classic ways to get this kernel wrong -- swapping the low/high nibble order, and reading int8
activations as unsigned -- both still produce plausible, well-scaled numbers. A tolerance-based check
would wave them through. So each control is chosen so that the WRONG implementation yields a DIFFERENT
NUMBER, and the gate names that number:
T2 a swapped packer would emit 0x0F where we require 0xF0.
T5b an unsigned read of byte 255 yields 255, not -1.
T7b an unsigned-activation dot yields -2011, not 37 -- and the gate asserts it is NOT -2011.
T12 is the composition property real inference depends on: summing per-group dots must equal the whole
row dot, or every grouped matvec silently drifts from the reference.
license_tier: ORIGINAL No hw writes (Rule 26). expect_exit: 0
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_gate_verdict.nxnx_mcu_q4.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 18 | func main() -> i64 |