nx_matmul_traced.nx
buildroot/runtime/nx_matmul_traced.nx
about
nx_matmul_traced.nx -- BP-3: real ML primitive (matmul) with full
bit-provenance per output cell.
Cardinal: feedback-no-skips-bit-provenance-silicon-to-death.
Proves the user-asked pattern: every output bit of a real ML
primitive is traceable to the input bits that contributed to it.
A * B = C (2x2 i64 matrices)
For each output cell C[i,j]:
- allocate a new bit ID
- emit3 the bit with up to 3 source contributions
(since 2x2 needs sum of 2 products = up to 2 source layers;
emit3 leaves slot for the layer-tag and primitive-tag)
- the eventual consumer (display / dot / next layer) calls
nx_bprov_join to close the chain
expect_exit: 0
dependencies 1 imports · 0 importers
imports: nx_bit_provenance.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
| 22 | const TAG_MAGIC_4096: i64 = 4096 |
| 23 | const TAG_MAGIC_11111: i64 = 11111 |
| 24 | const TAG_MAGIC_22222: i64 = 22222 |
| 25 | const TAG_MAGIC_33333: i64 = 33333 |
| 28 | const TAG_MATMUL: i64 = 0xC0DEB1A5 |
functions
| 33 | func nx_matmul_2x2_traced(pa: *i64, pb: *i64, pc: *i64, |
| 80 | func main() -> i64 |