Repository navigation
Conversation
Tolerances are currently compile definitions, so running programs with different tolerances needs a reconfigure per tolerance group. Let the generated model header carry them instead: pte_to_header.py emits model_atol and model_rtol from a tolerance file, the ESP-IDF component build adds the file as a header dependency and skips the compile definitions when it is given, and the runner reads the header constants when no definition is given. The define path is unchanged for builds without a tolerance file, including the smoke firmware and the operator-library tests. The ESP-NN loop configures the firmware once and stages each program and its tolerances at fixed paths. Authored with AI assistance using Muse Code powered by muse-latest.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/26098
Note: Links to docs will display an error until the docs builds have been completed. ⏳ No Failures, 56 PendingAs of commit 6db0541 with merge base b2e7366 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
Author
|
Closing: this prototype was rejected in review as too convoluted for the saving over tolerance grouping. The grouping approach in #26097 is the way forward instead. |
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.
Summary
Tolerances for BundleIO verification are currently compile definitions, so the ESP-NN emulator loop reconfigures the firmware for every tolerance group. This prototype removes them as build parameters for the loop:
pte_to_header.pyemitsmodel_atolandmodel_rtolconstants in the generated model header from a tolerance file, the ESP-IDF component build treats that file as a header dependency and skips theET_ATOL/ET_RTOLcompile definitions when it is given, and the runner reads the header constants when no definition is given. The ESP-NN loop configures the firmware once and stages each program and its tolerances at fixed paths, so each case only rebuilds. The define path is unchanged for builds without a tolerance file, including the smoke firmware and the operator-library tests, which still pass-DET_ATOL/-DET_RTOL. The standalone (non-ESP-IDF) build is unchanged in behavior: it never defined the tolerances and now reads the header defaults of0.01.Authored with AI assistance using Muse Code powered by muse-latest.
Test plan
Local verification:
bash -nand shellcheck pass on.ci/scripts/test_espressif.sh, andpte_to_header.pycompiles and rejects malformed tolerance files (wrong count, non-numeric, non-finite) with clear errors. A simulation ran the loop text from the script against a tiny CMake project mirroring the new mechanics: one configure for four interleaved cases (noET_ATOLpassed), every case ran with its own model bytes and tolerances, the exact tolerance representation was preserved in the header, the define path still won when-DET_ATOL/-DET_RTOLwere given, and the default path stayed at0.01.The Test ESP32 Emulators workflow on this pull request is the verification run. It should show the ESP-NN loop's logged step total falling from the 200 to 232 second range with tolerance grouping to a single configure plus incremental builds, with the same 24 ESP-NN cases passing on each emulator job, and the smoke firmware and operator-library implementation tests passing on the unchanged define path.