You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Run Android LlamaDemo with QNN backend (#16011)
### Motivation
- The current Android LlamaDemo only supports XNNPACK.
- The QNN-backend Android Demo is missing, the `qnn_llama_runner`
approach is provided though.
### Summary
- Add Guidance for building and running Android LlamaDemo with
QNN-Backend
- It's verified on Samsung S23 (SoC SM8550).
### Test plan
- This PR has been tested on
[LlamaDemo-Executorch-QNN](https://github.com/luffy-yu/LlamaDemo-Executorch-QNN).
> The APK file and the pre-built model can be found in its README.
- This PR primarily borrows doc from
[QNN_ANDROID_FIX_SUMMARY](https://github.com/luffy-yu/LlamaDemo-Executorch-QNN/blob/master/QNN_ANDROID_FIX_SUMMARY.md).
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
-**Cause**: Wrong parameter order in Runner constructor or missing QNN config
383
+
384
+
-**Solution**: Check `$EXECUTORCH_ROOT/examples/qualcomm/oss_scripts/llama/runner/runner.h` for the correct constructor signature.
385
+
386
+
##### Issue 2: Error 1 (Internal) with QNN API Version Mismatch
387
+
388
+
-**Symptoms**:
389
+
390
+
```
391
+
W [Qnn ExecuTorch]: Qnn API version 2.33.0 is mismatched
392
+
E [Qnn ExecuTorch]: Using newer context binary on old SDK
393
+
E [Qnn ExecuTorch]: Can't create context from binary. Error 5000
394
+
```
395
+
396
+
- **Cause**: Model compiled with QNN SDK version X but APK uses QNN runtime version Y
397
+
398
+
- **Solution**:
399
+
- Update `build.gradle.kts` with matching QNN runtime version
400
+
401
+
> **Note:** The version numbers below (`2.33.0` and `2.37.0`) are examples only. Please check for the latest compatible QNN runtime version or match your QNN SDK version to avoid API mismatches.
0 commit comments