memlnaut-nisps/scripts
monkey-w1n5t0n 8a19e5b52c refactor(ml)!: P2.1 storage-policy split — MLPCore<Storage>, fixed + dynamic models
Algorithms (forward, backprop/SGD, init, move_weights, diagnostics) now live
once in MLPCore<Storage> (nisps/ml/mlp.hpp). Storage models:

- FixedStorage (storage.hpp): template-sized std::array, zero heap. The
  classic MLP<NIn,H1,H2,H3,NOut,...> is an alias preserving kInput/kHidden*/
  kOutput/kNumLayers/weight_count() constexpr — firmware + bindings + modes
  compile unchanged.
- DynamicStorage (dynamic_storage.hpp): runtime dims, ONE arena allocation
  at construction, nothing per-call. #error under NISPS_TARGET_EMBEDDED
  (new macro in core/perf.hpp); sole lint-cpp.sh heap-allowlist entry, plus
  a lint check that fails if the #error guard disappears.

Verification:
- new ctest test_mlp_storage_parity: fixed↔dynamic BIT-identical across
  init/draw/inference/train(FIFO)/move_weights(pin mask)/eval_loss/
  layer_stats/set_weights/infer_batch/reset; invalid+moved-from inert
- golden ML vectors (pre-refactor constants) pass → bit-stable refactor
- native↔WASM parity PASS, max delta unchanged (2.4e-7)
- chokepoint B compile: PAFSynth .text 122324→122692 (+0.30%, ±1% budget);
  RAM +416B (eval scratch)
- fix: firmware-common.sh used bare 'python' (absent here) → ${PYTHON:-python3}

Part of one-core-engine-refactor P2. nisps_ml_create ABI untouched (P2.2 is
an operator stop-point).
2026-07-13 23:47:03 +02:00
..
build-and-flash-firmware.sh Add firmware variant selection to build scripts 2026-04-16 00:37:58 +09:00
build-cpp-tests.sh Stream 11: verification infrastructure (golden vectors + parity + lint + CI + Playwright migration) 2026-04-29 19:50:55 +03:00
build-firmware-arch.sh feat(animations+firmware): /next/animations showcase (videos + interactive demos), in-app Help link, Arch firmware build script 2026-06-28 04:42:27 +02:00
build-firmware.sh Preserve firmware variant capitalization 2026-04-16 00:46:02 +09:00
build-wasm.sh feat(manifold)!: P1 — retire playground/, manifold is the sole browser app 2026-07-13 23:27:56 +02:00
firmware-common.sh refactor(ml)!: P2.1 storage-policy split — MLPCore<Storage>, fixed + dynamic models 2026-07-13 23:47:03 +02:00
flash-firmware.sh Improve UF2 bootloader detection 2026-04-16 00:52:39 +09:00
lint-cpp.sh refactor(ml)!: P2.1 storage-policy split — MLPCore<Storage>, fixed + dynamic models 2026-07-13 23:47:03 +02:00
parity-check.sh chore(build): P0 plumbing — WASM build/parity retarget to manifold/public 2026-07-13 23:14:23 +02:00
run-all-tests.sh feat(manifold)!: P1 — retire playground/, manifold is the sole browser app 2026-07-13 23:27:56 +02:00
setup-firmware-toolchain.sh feat(firmware): wire Explore-and-place glue to hardware buttons + selftest 2026-06-28 04:14:30 +02:00