Repository navigation
tflm oracle: independent int8 TANH reference outputs (Stage B) - #442
Merged
Merged
Conversation
Adds a harness that runs TFLite Micro's real Register_TANH() through KernelRunner over all 256 int8 input codes for seven input calibrations (TANH output contract: scale 1/128, zero point 0), and the resulting fixture with provenance: TFLM 8f6596d (kernel tree identical), sha256 of tanh.cc, integer_ops/tanh.h, common.h, fixedpoint.h and the harness, compiler and flags, third-party commits. Two runs and a -Werror rebuild are byte-identical; TFLM's own tanh tests pass on the same build. The fixture also records that TFLM's int8 TANH prepare accepts a non-conforming output declaration (scale 0.1, zp 5) and produces the same bytes. No native code is added; the port is a separate stage. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ArVbbq3DsToBM7r79zGeEf
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Reference outputs for TFLite Micro's int8 TANH kernel, for a future native port to be tested against. No Rust code changes, and nothing in the crate reads these files yet.
tools/tflm_oracle/tanh_int8_oracle.cc: a harness that runs the realtflite::Register_TANH()(prepare intanh.cc, eval ininteger_ops/tanh.h) throughtflite::micro::KernelRunner:tests/data/tflm/tanh_int8_8f6596d.json: the outputs, with their provenance:8f6596d, kernel tree identical to the checkout);tanh.cc,integer_ops/tanh.h,common.h,fixedpoint.hand the harness;tools/tflm_oracle/README.md: how to rebuild TFLM and the harness and reproduce the fixture.Evidence
-Werrorrebuild produce byte-identical output.The native port is a separate stage.
Generated by Claude Code
Summary by CodeRabbit