Skip to content

Fix local QNN AAR setup in the Android LlamaDemo guide - #266

Open
eoinjordan wants to merge 1 commit into
meta-pytorch:mainfrom
eoinjordan:codex/qnn-local-aar-setup
Open

eoinjordan wants to merge 1 commit into
meta-pytorch:mainfrom
eoinjordan:codex/qnn-local-aar-setup

Conversation

@eoinjordan

@eoinjordan eoinjordan commented Oct 1, 2026 •

Copy link
Copy Markdown

Following the QNN LlamaDemo guide instructions I confirmed the copied AAR needs useLocalAar=true to be selected. Otherwise the app can report Invalid model type category: 4 (QNN) as raised in #227

This PR:

Adds the local AAR setup for Android Studio and command-line builds, invokes the build script with Bash, and gives a clear error if the AAR is missing. Keeps category 4 for the QNN runner.

Validation (on 8s Gen 3 (Ultra RAZR 50))

  • Windows and Ubuntu builds passed, with 9 unit tests.
  • Checked that the local AAR is selected and the Maven AAR excluded.
  • Missing local AAR gives the expected error.
  • QNN APK installs and launches on my handset.

To validate from an onnx model :

You need to make sure a compatible, or compiled from onnx follow steps here - https://workbench.aihub.qualcomm.com/docs/hub/compile_examples.html#compile-onnx

@meta-cla

meta-cla Bot commented Oct 1, 2026

Copy link
Copy Markdown

Hi @eoinjordan!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@eoinjordan

Copy link
Copy Markdown
Author

Hi @eoinjordan!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

Signed

@eoinjordan
eoinjordan marked this pull request as draft October 2, 2026 08:43
@meta-cla

meta-cla Bot commented Oct 2, 2026

Copy link
Copy Markdown

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 2, 2026
@eoinjordan
eoinjordan marked this pull request as ready for review October 2, 2026 08:43
@eoinjordan

Copy link
Copy Markdown
Author

Hi @kirklandsign if you get a chance can you review? I have tested it on my handset with QNN and its working. Do you need screenshots etc?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant