Make BundleIO ATOL/RTOL configurable per-test via runtime args#18739
Make BundleIO ATOL/RTOL configurable per-test via runtime args#18739BryanBradfo wants to merge 1 commit intopytorch:mainfrom
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18739
Note: Links to docs will display an error until the docs builds have been completed.
|
There was a problem hiding this comment.
Pull request overview
This PR makes BundleIO output-comparison tolerances (ATOL/RTOL) configurable per test run for the ARM semihosting executor_runner, enabling tighter defaults while allowing per-model overrides in Cortex-M end-to-end tests.
Changes:
- Add runtime
-atol/-rtolCLI args to the semihosting runner and tighten default tolerances to1e-3. - Remove hardcoded tolerance compile definitions from the Cortex-M test runner build script.
- Add a per-model tolerance lookup table in the Cortex-M e2e script and pass tolerances through the FVP semihosting command line.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| examples/arm/executor_runner/CMakeLists.txt | Tightens default ET_ATOL/ET_RTOL CMake cache values and fixes RTOL help text. |
| examples/arm/executor_runner/arm_executor_runner.cpp | Introduces runtime -atol/-rtol overrides for BundleIO comparisons and updates defaults/usage text. |
| backends/cortex_m/test/build_test_runner.sh | Stops baking relaxed ATOL/RTOL into the runner binary at build time. |
| .ci/scripts/test_cortex_m_e2e.sh | Adds per-model tolerances and forwards them to the runner via semihosting cmd line. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1c01def to
143c585
Compare
143c585 to
7abb0a6
Compare
|
@pytorchbot label "release notes: none" |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Previously tolerances were compile-time constants (ET_ATOL=5.0, ET_RTOL=1.0) baked into the executor runner binary, applied uniformly to all models. This masked numerical regressions on precise models. Add -atol and -rtol CLI args to the semihosting runner so tolerances can be set per-model at runtime. Tighten defaults to 1e-3 and move per-model overrides to a lookup table in test_cortex_m_e2e.sh. Resolves pytorch#18424
7abb0a6 to
d85f1a5
Compare
Summary
Previously ATOL/RTOL were compile-time constants baked into the executor runner binary, applied uniformly to all models. This masked numerical regressions on models that could pass with tighter bounds.
-atoland-rtolCLI args to the semihosting runner for runtime override-DET_ATOL=5.0 -DET_RTOL=1.0from build_test_runner.shFixes #18424
Test plan
Ran
bash .ci/scripts/test_cortex_m_e2e.sh mv2on Corstone-300 FVP:Setting atol to 5.000000/Setting rtol to 2.500000Test_result: PASSwith calibrated tolerances (ATOL=5.0, RTOL=2.5)Test_result: FAILwith zero tolerances (-atol 0.0 -rtol 0.0), proving runtime override workscc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @psiddh @AdrianLundell, @rascani, @AdrianLundell