Skip to content

feature: slim megabyte-scale dense output maps to a canary and digest before committing the summary - #19

Merged
asteinh merged 1 commit into
developfrom
feature/summary-slim-largeoutputs
Aug 17, 2026
Merged

feature: slim megabyte-scale dense output maps to a canary and digest before committing the summary#19
asteinh merged 1 commit into
developfrom
feature/summary-slim-largeoutputs

Conversation

@asteinh

@asteinh asteinh commented Aug 17, 2026

Copy link
Copy Markdown
Member

Summary

The ESP32-S3 benchmark firmware dumps a model's entire output tensor. For classifiers that
is O(10) values, but a dense spatial output (the 256x256x8 U-Net segmentation map = 524288
int8) would bloat the tracked summary.json by megabytes. This adds a post-validation
slimming step so such a cell can be committed compactly.

Change

  • tflm-esp32s3/scripts/slim_summary.py: replaces any output_values vector longer than
    4096 elements with a 12-int canary slice plus an output_digest (len, sha256).
    Classifier cells are left unchanged.
  • Wired into run_all.sh collect_and_validate AFTER validate_accuracy.py (which still
    checks the full device vector against the model reference) and before the summary is
    published, so the numerical parity gate is unaffected.
  • Tests tests/test_slim_summary.py: large output trimmed to canary + digest, small output
    unchanged, failure cell unchanged, output-contract preserved, summary roundtrip.

Notes

Full-resolution parity stays reproducible off-summary via host_parity_unet.py. A
U-Net-free summary regenerates byte-identically (classifier cells are untouched). Smoke: a
7.68 MB candidate slims to 666 bytes.

@asteinh
asteinh merged commit e1c1f7f into develop Aug 17, 2026
2 checks passed
@asteinh
asteinh deleted the feature/summary-slim-largeoutputs branch August 17, 2026 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant