Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ ERROR ] Number of input elements 524288 does not match number of output elements 0.(Snapdragon 8 Elite) #211

Closed
Dantetang opened this issue Dec 12, 2024 · 2 comments

Comments

@Dantetang
Copy link

When I execute on the Snapdragon 8 Elite, I encounter the following error:
I followed the instructions strictly as outlined in the run_qwen_npu.sh script. I used the libraries related to V79 instead of V75

/main_qwen_npu -s 64 -c 1
[INFO] Dec 11 2024 [/home/mllm/src/backends/qnn/QNNBackend.cpp:121] Backend: libQnnHtp.so
[INFO] Dec 11 2024 [/home/mllm/src/backends/qnn/QNNBackend.cpp:148] qnn-backend build version: v2.16.4.231110151339_60331
[INFO] Dec 11 2024 [/home/mllm/src/backends/qnn/QNNBackend.cpp:149] Backend build version: v2.25.9.240826120644_20452
[INFO] Dec 11 2024 [/home/mllm/src/backends/qnn/QNNBackend.cpp:172] Initialize Backend Returned Status = 0
[INFO] Dec 11 2024 [/home/mllm/src/backends/qnn/QNNBackend.cpp:636] Registered Op Package: libQnnLLaMAPackage_CPU.so and interface provider: LLaMAPackageInterfaceProvider
[INFO] Dec 11 2024 [/home/mllm/src/backends/qnn/QNNBackend.cpp:636] Registered Op Package: libQnnLLaMAPackage_HTP.so and interface provider: LLaMAPackageInterfaceProvider
Load model: 5.68148 s
Load model: 2.33918 s
Load model: 3.86221 s
12063.4ms [ ERROR ] Number of input elements 524288 does not match number of output elements 0.

12063.4ms [ ERROR ] Op specific validation failed.

 0.0ms [ ERROR ]  <E> validateNativeOps master op validator model.layers.0.self_attn.ires_split-00_view_:qti.aisw:Reshape failed 3110

 0.0ms [ ERROR ]  <E> QnnBackend_validateOpConfig failed 3110

 0.0ms [ ERROR ]  <E> Failed to validate op model.layers.0.self_attn.ires_split-00_view_ with error 0xc26

[ ERROR ] QnnModel::addNode() validating node model.layers.0.self_attn.ires_split-00_view_ failed.
[ ERROR ] qnnModels_[qnnModelIndex_].addNode( QNN_OPCONFIG_VERSION_1, name.c_str(), packageName.c_str(), nodeType.c_str(), paramsPtr, params.size(), inputTensorNames, inputTensorNames.size(), outputTensors.data(), outputTensors.size() ) expected MODEL_NO_ERROR, got MODEL_GRAPH_ERROR

@Dantetang Dantetang changed the title [ ERROR ] Number of input elements 524288 does not match number of output elements 0. [ ERROR ] Number of input elements 524288 does not match number of output elements 0.(Snapdragon 8 Elite) Dec 12, 2024
@oreomaker
Copy link
Collaborator

In main_qwen_npu.cpp, the chunk size is set manually to 256, so the 'seq' argument should be multiple of 256. The error is caused by this.
As for the 8 Elite, we have not tested the QNN library on it, which may have issues with compatibility.

@Dantetang
Copy link
Author

Thank you. The issue with "Number of input elements 524288 does not match number of output elements 0" has been resolved. The current issue is the compatibility problem with V79. Similar to the one described in #178.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants