microsoft / microsoft/onnxruntime-inference-examples
QNN EP Sample - Fresh build with latest official QNN package produces errors on ARM64 Snapdragon QC PC
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 1.7k
- Forks
- 414
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 14
Description
I used official latest ORT 1.20 pre-built package per https://onnxruntime.ai/docs/execution-providers/QNN-ExecutionProvider.html#pre-built-packages-windows-only
It looks to use QNN_2.27.0.240926142112_100894
After build and execute, some of the executions will produce error messages or crash
run_qnn_ep_sample.bat C:\Users\ivberg\Downloads\microsoft.ml.onnxruntime.qnn.1.20.0\build\native C:\Users\ivberg\Downloads\microsoft.ml.onnxruntime.qnn.1.20.0\runtimes\win-arm64\native
// Error 1
REM TODO Check for mobilenetv2-12_quant_shape.onnx_ctx.onnx
Error in cpuinfo: Unknown chip model name 'snapdragon (tm) 8cx gen 3 @ 3.40 GHz'.
Please add new Windows on Arm SoC/chip support to arm/windows/init.c!
unknown Qualcomm CPU part 0x1 ignored
...
2024-11-08 13:02:36.8328541 [E:onnxruntime:, onnx_ctx_model_helper.cc:162 onnxruntime::qnn::LoadQnnCtxFromOnnxGraph] Failed to load from EpContext model. qnn_backend_manager.cc:636 onnxruntime::qnn::QnnBackendManager::LoadCachedQnnContextFromBuffer Failed to get context binary info.
Exception in run_ort_qnn_ep: Failed to load from EpContext model. qnn_backend_manager.cc:636 onnxruntime::qnn::QnnBackendManager::LoadCachedQnnContextFromBuffer Failed to get context binary info.
// Error 2
REM run mobilenetv2-12_net_qnn_ctx.onnx (generated from native QNN) with QNN HTP backend
s:\src\onnxruntime-inference-examples\c_cxx\QNN_EP\mobilenetv2_classification\build\Release>qnn_ep_sample.exe --qnn mobilenetv2-12_net_qnn_ctx.onnx kitten_input_nhwc.raw
Exception in run_ort_qnn_ep:
The other combo of runs work fine
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with run_qnn_ep_sample.bat and qnn_ep_sample.exe, reproducing the two reported failures on the ARM64 Snapdragon system. Read arm/windows/init.c alongside the QNN sample paths and the reported EpContext errors. Done means the affected executions no longer error or crash while the combinations already reported as working remain successful.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- machine-learning, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100