pin_fp_mode ran once at start; a library imported mid-run can switch flush-to-zero /
denormals-are-zero back on. fit now checks before each opt.step, re-pins, and names the
rank and step. Verified: final parameter hashes unchanged vs 63780b7 on cuda+cpu and cpu+cpu.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
7 days ago
One arithmetic on every device: mixed CPU+GPU optimizer, replica hash check, FTZ pin, subnormal gate, live f32 audit, probe/fragment fixes (2026-10-14)
Four local commits in one upload (ec432c8, c8db1cf, 47724cd, ae9cfa2): bounded elementwise units and LUT build (407 MB -> 2 MB, 277 MB -> 1 MB at startup); requant16 retrained from floor (-0.4981 LSB bias) to round-half-up, N/N 65,536/65,536, browser requant LUT re-exported; qat.py and every browser quantizer now refuse NaN/Inf instead of silently quantizing the whole layer to 0 (new tests fail on the old code); README September section. python test_verified_units.py 25/25, npm test 12/12 suites green.
verified: bound GEMM memory, certify the multiply LUT, test the shipped paths
LUTBackend.gemm and NeuralBackend.gemm materialized the full (m,n,k) product block before reducing, making peak memory cubic in layer width -- 2.4 GB for one layer's forward at the SpikeWhale panel's maximum settings. Both now block the m axis; the contraction axis k is untouched, so results are bit-identical (512x768x768: 2426.9 MB -> 77.2 MB; neural 64x96x96: 519.2 MB -> 57.5 MB).
The two backends need different block accounting: a LUT product costs 8 bytes, a neural product ~880 (four nibble pairs through a 128-wide net).
build_luts() returned its tables unchecked while the docs described a self-certify gate. The table is the complete finite domain, so certifying it IS the exhaustive verification: LUTBackend now checks all 65536 entries against signed integer multiply at construction and raises on mismatch (0.5 ms).
Exhaustive verification covered the scalar entry points; production runs the batched paths and the LUTs built from them, which are different code. test_verified_units…