Arm backend: Update _adjust_weight_qspec_for_conv_transpose#18094
Open
mansnils wants to merge 2 commits intopytorch:mainfrom
Open
Arm backend: Update _adjust_weight_qspec_for_conv_transpose#18094mansnils wants to merge 2 commits intopytorch:mainfrom
mansnils wants to merge 2 commits intopytorch:mainfrom
Conversation
* FusedMovingAvgObsFakeQuantize only supports channel axis 0, fall back to non-fused (MovingAveragePerChannelMinMaxObserver + FakeQuantize) when applicable. * Always check/update ch_axis for FakeQuantize/observer constructor regardless if ch axis is correct in Qspec. * Add unit tests. Jira: MLCE-1708 Signed-off-by: Måns Nilsson <mans.nilsson@arm.com> Change-Id: Ie707c3f446bbc23a454d2ce7bbf9c0cd32582e05
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18094
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 Cancelled JobAs of commit b2e6040 with merge base 569e7a9 ( NEW FAILURE - The following job has failed:
CANCELLED JOB - The following job was cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Arm backend’s conv_transpose2d weight-qspec adjustment to correctly handle per-channel axis selection (including TorchAO ctor rebuilding) and adds unit tests validating the behavior for both PTQ and QAT flows.
Changes:
- Update
_adjust_weight_qspec_for_conv_transposeto always fixch_axis(including rebuilding QAT/PTQ observer/fake-quant ctors) and to fall back from fused fake-quant when axis != 0. - Add targeted unit tests for axis correction and fused→non-fused fallback behavior in conv_transpose2d quantization preparation.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
backends/arm/quantizer/quantization_annotator.py |
Adjusts conv_transpose2d weight qspec axis handling and rebuilds TorchAO constructors (with fused fallback behavior). |
backends/arm/test/ops/test_transpose_conv2d.py |
Adds unit tests covering QAT/PTQ axis correction and fused/non-fused fake-quant selection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
zingo
approved these changes
Mar 11, 2026
Signed-off-by: Måns Nilsson <mans.nilsson@arm.com> Change-Id: I592b4326001baba0eebf7951ef3f625f934bc9c9
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.
cc @digantdesai @freddan80 @per @zingo @oscarandersson8218 @Sebastian-Larsson @robell