Repository navigation
feat(android): add the Qualcomm QNN backend - #1482
Draft
msluszniak wants to merge 14 commits into
Draft
msluszniak wants to merge 14 commits into
msluszniak wants to merge 14 commits into
Conversation
4 of 12 tasks
msluszniak
added a commit
that referenced
this pull request
Oct 19, 2026
## Description - Bumps `nativeLibsVersion` to `0.10.6` ([v0.10.6-libs](https://github.com/software-mansion/react-native-executorch/releases/tag/v0.10.6-libs)): only `vulkan-android-*` changed. - Picks up pytorch/executorch#23381 (Adreno 720/740 crash at Vulkan pipeline creation, e.g. PP-OCRv6 detector) and the restored bias add in the 8da4w Vulkan linear shaders. ### Introduces a breaking change? - [ ] Yes - [x] No ### Type of change - [x] Bug fix (change which fixes an issue) - [ ] New feature (change which adds functionality) - [ ] Documentation update (improves or adds clarity to existing documentation) - [ ] Other (chores, tests, code style improvements etc.) ### Tested on - [ ] iOS - [ ] Android ### Testing instructions - Run a Vulkan model that uses `mean` (e.g. PP-OCRv6 detector) on an Adreno 740 device. ### Screenshots ### Related issues ### Checklist - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [x] My changes generate no new warnings ### Additional notes v0.10.6-libs includes #1482's QNN artifact, so #1482 can bump to 0.10.6 too.
Opt-in `qnn` backend: links libqnn_executorch_backend.so from the libs release and Qualcomm's runtime from Maven (com.qualcomm.qti:qnn-runtime 2.47.0). A QNN .pte targets one Hexagon version, so QNN variants resolve to the device's file through the new `qnnHtpArch` JSI value (ro.soc.model -> v69..v81), and QNN is only a DEFAULT candidate when that value is set. EfficientNetV2-S gains QNN_A16W8. nativeLibsVersion moves to 0.10.5.
Returns a class index per pixel rather than 21 logit planes, so the segmenter takes its index-map path and skips the transpose and argmax over H*W*K floats. 66.55% mIoU on an S26 Ultra over 200 VOC2012 val images, against 66.56% for the XNNPACK int8 file, at 3.20 ms/inference.
76.74% mIoU on 200 VOC2012 val images on an S26 Ultra, against 76.71% for the XNNPACK int8 file, at 20.1 ms/inference.
On an S26 Ultra over 200 VOC2012 val images, against the XNNPACK int8 files: DeepLabV3-ResNet101 78.90% vs 78.82% mIoU, FCN-ResNet50 71.21% vs 71.36%, FCN-ResNet101 74.93% vs 74.99%.
65.83% mIoU on an S26 Ultra over 200 VOC2012 val images, against 65.06% for the XNNPACK int8 file, at 2.06 ms/inference.
DeepLabV3-R50/R101 and FCN-R50/R101 resolve QNN_A8W8 on every Hexagon version: about 2x faster at the same mIoU on an S26 Ultra (v81, 200 VOC2012 val).
…cientNetV2-S QNN_A8W8 LR-ASPP and DeepLabV3-MBv3 resolve QNN_A8W8: about 2.2x faster at the same mIoU on an S26 Ultra (v81, 200 VOC2012 val). EfficientNetV2-S adds QNN_A8W8, 1.75x faster for 1.4 top-1; QNN_A16W8 stays its default.
Every size and resolution, one file per Hexagon version. On an S26 Ultra each is within 0.6 mAP50-95 of fp32 over 100 COCO val images, and 5-11x faster than the Vulkan files at 640 (n 3.6 ms, x 21.9 ms).
msluszniak
force-pushed
the
@ms/qnn-backend
branch
from
October 28, 2026 16:53
df164b6 to
10c541b
Compare
This branch has not been deployed
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.
Description
qnnbackend (Android arm64):libqnn_executorch_backend.sofromv0.10.5-libs, Qualcomm runtime from Maven (com.qualcomm.qti:qnn-runtime:2.47.0)..ptetargets one Hexagon version, so QNN variants resolve per device via a newqnnHtpArchJSI value (ro.soc.model→ v69–v81). QNN is aDEFAULTcandidate only when it is set.libcdsprpc.soin the manifest and setsADSP_LIBRARY_PATH; apps needuseLegacyPackaging = true(documented).QNN_A16W8(S26 Ultra: 74.1% top-1 on ImageNetV2 vs 74.4% fp32, 2.4 ms vs 46.9 ms XNNPACK fp32).MinMaxObserveractivations: 70.0% to 71.8% top-1 on 500 ImageNetV2 images (fp32 72.2%).QNN_A16W8, also in the CV demo: 66.55% mIoU on VOC2012 vs 66.56% XNNPACK int8, 3.2 ms.QNN_A16W8, also in the CV demo: 76.74% mIoU vs 76.71% XNNPACK int8, 20.1 ms.QNN_A16W8, also in the CV demo: 78.90% / 71.21% / 74.93% mIoU vs 78.82% / 71.36% / 74.99% XNNPACK int8.QNN_A16W8, also in the CV demo: 65.83% mIoU vs 65.06% XNNPACK int8, 2.1 ms.eps=1e-5: 66.55% to 69.02% mIoU (fp32 69.28%).Stacked on #1479 (includes its commit until it merges).
Introduces a breaking change?
Type of change
Tested on
Testing instructions
apps/computer-vision/package.jsonadd"backends": ["qnn"]; setexpo.useLegacyPackaging=trueinandroid/gradle.properties.QNN A16W8.Screenshots
Related issues
Checklist
Additional notes
Only the v81 file is device-validated; v69–v79 are untested.
The DeepLabV3/FCN ResNet QNN variants are a8w8: about 2x faster than a16w8 at the same mIoU on an S26 Ultra.
LR-ASPP and DeepLabV3-MBv3 QNN are a8w8 too (~2.2x faster, same mIoU); EfficientNetV2-S adds QNN_A8W8 (1.75x, -1.4 top-1).
YOLO26 detection gets QNN_FP16 at every size and resolution: within 0.6 mAP50-95 of fp32 and 5-11x faster than Vulkan on an S26 Ultra.