What problem does it solve?
Debugging the MNN QNN (Qualcomm HTP/NPU) backend is hard: runtime errors like 1002/6000/1003/6004, wrong inference results, fp16 precision gaps, and missing operator support all require deep backend knowledge. This Skill provides a systematic workflow to locate the first failing operator, distinguish real bugs from hardware fp16 accumulation, and add or adapt QNN operators.
Core Features & Use Cases
- Intermediate tensor dump comparison: Uses MNN2QNNModel with --dump_intermediate_outputs to export all QNN intermediate tensors in one pass and compare them against a CPU fp32 baseline to pinpoint the first failing operator.
- Bug vs precision triage: Compares QNN-fp16 against CPU-fp16 and OpenCL-fp16 baselines to separate genuine operator bugs from HTP fp16 accumulation, with an error-pattern lookup table and error-code reference.
- Operator implementation guidance: Walks through adding or adapting QNN operators by consulting SDK docs (MasterOpDef, HtpOpDefSupplement, SupportedOps), following existing operator templates, and verifying with probe scripts.
- Use Case: A model produces garbage output on the NPU with error 6000. The Skill guides you to retry with shapeMutable=false, dump intermediate tensors, bisect to the first bad operator, and fix the QNN implementation.
Quick Start
Ask the assistant to debug why my MNN model gives wrong results on the QNN NPU backend and locate the first failing operator.