Cortex-M backend: Improve int8-portable operator support#17812
Merged
Conversation
Using the int8 portable ops is an option for most ops not requiring rescales such as data move ops, max/min ops and logic ops. Even though they are not accelerated, quantizing them to int8 is more efficient than doing them in fp32+dequant/quantization. This patch adds a large number of such ops to be quantized by the SharedQspecQuantizer together with tests. It also modifies the quantizer to increase the support: - If multiple qspecs are found, use top one rather than falling back to fp32 since this is what users most likely want. - Reject node with non-float inputs/outputs which would previously crash - Let BFS algorithm search through non-float edges to support indexing ops. Signed-off-by: Adrian Lundell <adrian.lundell@arm.com> Change-Id: I7a5964d5924496480e965724b4f130f56a43f538
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17812
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 Awaiting Approval, 3 New FailuresAs of commit 3771a54 with merge base dae7a02 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
rascani
approved these changes
Mar 3, 2026
Collaborator
Author
|
Unrelated fails |
jpiat
pushed a commit
to jpiat/executorch
that referenced
this pull request
Mar 17, 2026
Using the int8 portable ops is an option for most ops not requiring rescales such as data move ops, max/min ops and logic ops. Even though they are not accelerated, quantizing them to int8 is more efficient than doing them in fp32+dequant/quantization. This patch adds a large number of such ops to be quantized by the SharedQspecQuantizer together with tests. It also modifies the quantizer to increase the support: - If multiple qspecs are found, use top one rather than falling back to fp32 since this is what users most likely want. - Reject node with non-float inputs/outputs which would previously crash - Let BFS algorithm search through non-float edges to support indexing ops. Signed-off-by: Adrian Lundell <adrian.lundell@arm.com>
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.
Using the int8 portable ops is an option for most ops not requiring rescales such as data move ops, max/min ops and logic ops. Even though they are not accelerated, quantizing them to int8 is more efficient than doing them in fp32+dequant/quantization.
This patch adds a large number of such ops to be quantized by the SharedQspecQuantizer together with tests. It also modifies the quantizer to increase the support:
cc @digantdesai @SS-JIA @freddan80 @per @zingo @oscarandersson8218 @mansnils @Sebastian-Larsson @robell