[Mobile] QNN Execution provider mem alloc failure. #22288
Labels
api:Java
issues related to the Java API
ep:QNN
issues related to QNN exeution provider
platform:mobile
issues related to ONNX Runtime mobile; typically submitted using template
Describe the issue
I have Snapdragon 8 Gen 1+ (v69 platform) and i am trying to initialize ONNX runtime with QNN backend (with NPU support).
I followed the instruction described if the official documentation from QNN execution provider and got onnxruntime.so for arm64-v8a. Doc states, that i need to put QNN dependencies such as libQnnHtp.so inside my .apk.
After this step i got following list of libraries (from Qualcomm AI SDK):
Here is a code, that i use to initialize session:
I used a model from ONNX model zoo, small enough, to check that problem persists on any model.
At this point i got the following output:
As i can see, the main problem is here
So, it looks like i picked right dependencies, and, at least, QNN EP is constructed, but, for some unknown reason, failed to allocate memory on DSP. I guess this problem can be related to Qualcomm AI SDK or CPU/NPU itself, but here is a chance, that QNN EP may handle something wrong (or i am missing something).
To reproduce
Provided in description.
In general, build QNN EP according to official instructions with standard Qualcomm libraries (i used QAIRT 2.27.0.240926 and Hexagon SDK 6.0.0.2), then try to initialize session using QNN EP with default settings and any model on Snapdragon 8 Gen 1+.
Urgency
N/A
Platform
Android
OS Version
API 29, 30
ONNX Runtime Installation
Built from Source
Compiler Version (if 'Built from Source')
Clang 17.0.2
Package Name (if 'Released Package')
onnxruntime-mobile
ONNX Runtime Version or Commit ID
a47254e
ONNX Runtime API
C++/C
Architecture
ARM64
Execution Provider
Other / Unknown
Execution Provider Library Version
QNN
The text was updated successfully, but these errors were encountered: