Arm backend: Add missing BasePipeline.set_quantization_calibration - #23265
Conversation
pytorch#23182 made the NSS and NFRU model tests call pipeline.set_quantization_calibration(), but never added the method, so the real-data TOSA INT tests fail with AttributeError. Add it to BasePipeline, configuring the quantize stage the same way the NSS test did directly before pytorch#23182. Authored with Claude Code.
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/23265
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Pending, 3 Unrelated FailuresAs of commit fcf732c with merge base 96c621d ( NEW FAILURE - The following job has failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused helper correctly restores the calibration behavior expected by the NSS and NFRU tests.
Review effort: Balanced
Findings: None
What changed in this PR
Fixes the calibration API regression introduced by #23182.
Changes:
- Adds
BasePipeline.set_quantization_calibration(). - Supports custom calibration samples and dynamic shapes.
| File | Description |
|---|---|
backends/arm/test/tester/test_pipeline.py |
Adds the missing quantization calibration helper. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Check if test-arm-backend-vkml / test-arm-backend-no-driver pass on this PR |
|
Seem to be a gigger problme (or you moved it?) I also spoted this #23256 that seem to point in the same direction but also still fails that tests :( |
|
It seem you improved stuff with this, one of the error types seems fixed, left is this: |
|
@zingo Thanks for looking into it.. Yes, this fixes the original set_quantization_calibration AttributeError from #23182 (all 5 now pass). The 4 remaining failures are a separate issue: the new *_prequantized tests from #23236/#23237 download from HF at test time, and /mnt/hf_cache is read-only on the runner. They fail on #23256 too, so they're coming from main. Let's land this one and fix the HF cache issue in a separate PR, unless I am missing something.. Wdyt ? |
|
Im happy to just getting it green and sort of the details later :) Ill approve this if you think it ok to forwardfix and ok that we look at the rest in 8:ish hours :) (if still there) Im also happy to revert it and we can retry tomorrow if this unblocks you in a better/faster way. |
|
other PR fix is here : #23268 |
zingo
left a comment
There was a problem hiding this comment.
OK to merge, this fix a few erros, the left ones where there before.
#23182 made the NSS and NFRU model tests call
pipeline.set_quantization_calibration(), but never added the method, so the real-data TOSA INT tests fail with AttributeError. Add it to BasePipeline, configuring the quantize stage the same way the NSS test did directly before #23182.
Authored with Claude Code.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell @rascani