Revert "Revert "Arm backend: Run adaptive_avg_pool2d before quantization""#17831
Revert "Revert "Arm backend: Run adaptive_avg_pool2d before quantization""#17831
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17831
Note: Links to docs will display an error until the docs builds have been completed. ❌ 16 New Failures, 13 Unrelated FailuresAs of commit 9432f16 with merge base 23b2382 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following jobs failed but were likely due to flakiness present on trunk:
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
|
Reverts #17595 to essentially reland #17494. Original summary from @gggekov here:
To run mobilenet_v2 with good performance on Ethos-U55, we need to export the model in channels_last. If we export in channels_first (default behaviour), we pay a hefty performance penalty because the Ethos-U55 hardware is not efficient at doing Transpose
(see details in #17157). The adaptive_avg_pool2d operator, part of mv2,
is traced differently by ExecuTorch
depending on whether it was exported in
channels-first(operator not decomposed) or
exported in channels-last
(operator is decomposed by ExecuTorch in to_edge). To work around that, we add adaptive_avg_pool2d
to the transform_for_annotation
pipeline in order to decompose the
operator before quantization.