Repository navigation
Closed
Labels
module: qnnIssues related to Qualcomm's QNN delegate and code under backends/qualcomm/partner: qualcommFor backend delegation, kernels, demo, etc. from the 3rd-party partner, Qualcomm
Description
🐛 Describe the bug
Describe the bug
On a CQ8750S device (ro.soc.model=CQ8750S, ro.board.platform=sun, soc_id=705), QNN HTP backend fails to initialize with:
"No Snapdragon SOC detected" and fails to create backend_handle. This happens even with root access, proper LD_LIBRARY_PATH/ADSP_LIBRARY_PATH, and QNN SDK 2.37.0.250724 libs pushed to the device.
Repro steps
- Build ExecuTorch with Qualcomm backend and build the runner.
- Export a .pte with -m SM8750 (HTP v79).
- Push QNN libs (aarch64-android + hexagon-v79 skel/stub) and run qnn_executor_runner.
Command
adb shell "
cd /data/local/tmp/executorch_qualcomm_tutorial \
&& export LD_LIBRARY_PATH=/data/local/tmp/executorch_qualcomm_tutorial:/vendor/lib64:/system/lib64 \
&& export ADSP_LIBRARY_PATH=/data/local/tmp/executorch_qualcomm_tutorial \
&& export QNN_LOG_LEVEL=5 \
&& ./qnn_executor_runner --model_path ./dl3_qnn_q8.pte
"
Observed error
I 00:00:00.000731 executorch:qnn_executor_runner.cpp:232] Model file ./dl3_qnn_q8.pte is loaded.
I 00:00:00.000802 executorch:qnn_executor_runner.cpp:242] Using method forward
I 00:00:00.000813 executorch:qnn_executor_runner.cpp:289] Setting up planned buffer 0, size 9031680.
[INFO] [Qnn ExecuTorch]: Deserializing processed data using QnnContextCustomProtocol
[INFO] [Qnn ExecuTorch]: Creating new backend bundle.
[INFO] [Qnn ExecuTorch]: create QNN Logger with log_level 1
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> No Snapdragon SOC detected
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> No Snapdragon SOC detected
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> Failed to init router
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> failed sg_htpSingletonProvider initialize: 4000
[WARNING] [Qnn ExecuTorch]: Failed to create log_handle for backend 6, qnn_log_level 1, error=4000
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> No Snapdragon SOC detected
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> No Snapdragon SOC detected
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> Failed to init router
[ERROR] [Qnn ExecuTorch]: QnnDsp <E> Failed to initialize provider
[ERROR] [Qnn ExecuTorch]: Failed to create backend_handle for Backend ID 6, error=4000
E 00:00:00.023759 executorch:QnnBackendUnifiedRegistry.cpp:129] Fail to configure Qnn backend
E 00:00:00.023796 executorch:QnnManager.cpp:236] Fail to get or create shared Qnn backend bundle. Error code: 1
E 00:00:00.023800 executorch:QnnExecuTorchBackend.cpp:95] Fail to initialize Qnn Manager
E 00:00:00.023804 executorch:method.cpp:114] Init failed for backend QnnBackend: 0x1
F 00:00:00.033641 executorch:qnn_executor_runner.cpp:312] In function main(), assert failed (method.ok()): Loading of method forward failed with status 0x1
Aborted
adb shell getprop ro.board.platform => sun
adb shell getprop ro.soc.model => CQ8750S
adb shell cat /sys/devices/soc0/soc_id => 705
getenforce => Enforcing
### Versions
QNN SDK 2.37.0.250724 used
python collect_env.py
Collecting environment information...
PyTorch version: 2.11.0.dev20251222+cpu
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.5 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04.2) 11.4.0
Clang version: Could not collect
CMake version: version 3.31.10
Libc version: glibc-2.35
Python version: 3.10.19 (main, Oct 21 2025, 16:43:05) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-6.8.0-87-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Caching allocator config: N/A
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 39 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Vendor ID: GenuineIntel
Model name: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
CPU family: 6
Model: 142
Thread(s) per core: 2
Core(s) per socket: 4
Socket(s): 1
Stepping: 12
CPU max MHz: 4600.0000
CPU min MHz: 400.0000
BogoMIPS: 3999.93
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp vnmi md_clear flush_l1d arch_capabilities ibpb_exit_to_user
Virtualization: VT-x
L1d cache: 128 KiB (4 instances)
L1i cache: 128 KiB (4 instances)
L2 cache: 1 MiB (4 instances)
L3 cache: 8 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-7
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds: Mitigation; Microcode
Vulnerability Tsx async abort: Not affected
Vulnerability Vmscape: Mitigation; IBPB before exit to userspace
Versions of relevant libraries:
[pip3] ament-flake8==0.12.14
[pip3] executorch==1.1.0a0+09b5bdb
[pip3] numpy==2.2.6
[pip3] pytorch_tokenizers==1.0.1
[pip3] torch==2.11.0.dev20251222+cpu
[pip3] torchao==0.16.0+git08e5e203f
[pip3] torchaudio==2.10.0.dev20251222+cpu
[pip3] torchdata==0.11.0
[pip3] torchsr==1.0.4
[pip3] torchtune==0.6.1
[pip3] torchvision==0.25.0.dev20251222+cpu
[conda] executorch 1.1.0a0+09b5bdb pypi_0 pypi
[conda] numpy 2.2.6 pypi_0 pypi
[conda] pytorch-tokenizers 1.0.1 pypi_0 pypi
[conda] torch 2.11.0.dev20251222+cpu pypi_0 pypi
[conda] torchao 0.16.0+git08e5e203f pypi_0 pypi
[conda] torchaudio 2.10.0.dev20251222+cpu pypi_0 pypi
[conda] torchdata 0.11.0 pypi_0 pypi
[conda] torchsr 1.0.4 pypi_0 pypi
[conda] torchtune 0.6.1 pypi_0 pypi
[conda] torchvision 0.25.0.dev20251222+cpu pypi_0 pypi
(qnn) skmagic@skmagic:~/git_repo/executorch$
cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilginMetadata
Metadata
Assignees
Labels
module: qnnIssues related to Qualcomm's QNN delegate and code under backends/qualcomm/partner: qualcommFor backend delegation, kernels, demo, etc. from the 3rd-party partner, Qualcomm
Activity
nil-is-all commentedon Jan 6, 2026
Thanks for reporting this, @INHA-SW! @haowhsu-quic @shewu-quic @winskuo-quic @DannyYuyang-quic can any of you take a look?
metascroy commentedon Jan 6, 2026
@cccclai can you have a look?
haowhsu-quic commentedon Jan 7, 2026
Hi, I think the value should be 105 and this device will be available with QNN v2.43 in next month.
INHA-SW commentedon Jan 7, 2026
@haowhsu-quic Thanks for the clarification!
I tried setting the value to 105 and tested with QNN v2.42, and it works successfully on our device
The model loads and executes correctly with
qnn_executor_runner.For reference, here is the relevant execution log:
ZIFENG278 commentedon Jan 14, 2026
Hi, what is the mean of "value to 105" and where to set this value
yoonsuk98 commentedon Mar 11, 2026
@INHA-SW
I am reaching out to you because I am currently facing the exact same issue you described. I was incredibly encouraged and relieved to see your comment that setting the value to 105 and testing with QNN v2.42 worked successfully on your device.
I have been struggling with this problem for several days now, and your success is the first real breakthrough I've come across. If you could spare a few moments, I would be deeply grateful if you could share a bit more detail on the following:
Setting the Value to 105: Could you please explain the specific procedure or the file path you used to set this value? I have tried several approaches on my end, but unfortunately, none have resolved the issue so far.
QNN v2.42 Setup: To better understand your environment, did you update the target device itself to QNN v2.42, or did you install it on the host side and manually copy the necessary binaries/libraries to the target?
Reference Materials: If there were any specific documents, vendor guides, or forum posts you followed during this process, sharing them would be an immense help to me.
Your guidance would mean a great deal to me, as this project is currently at a critical standstill. I sincerely apologize for the intrusion on your time, but any hints or advice from your experience would be life-saving.
Thank you very much for your time and kind consideration.
cccclai commentedon Mar 11, 2026
I think it's likely this ID
executorch/backends/qualcomm/serialization/qc_schema.py
Line 40 in 096f10c
@ZIFENG278 @yoonsuk98 are both of you using CQ8750S
cc: @haowhsu-quic can we add them to the support list, and @abhinaykukkadapu fyi
abhinaykukkadapu commentedon Mar 12, 2026
@haowhsu-quic Noob q, wondering if it is possible to automate this part, or possibly any QC documentation link so that users can self unblock?
haowhsu-quic commentedon Mar 12, 2026
Sorry, this information is private currently.
INHA-SW commentedon Mar 13, 2026
@ZIFENG278 , @yoonsuk98 Hi, sorry for the late reply. Hope this helps.
1. SOC Value & QNN SDK Version
I used
-m CQ8750S(SOC 105, maps to HTP v79).CQ8750Sis not in the upstream ExecuTorch codebase — I added it manually tobackends/qualcomm/serialization/qc_schema.py:SM8750(SOC 69) is already built-in and maps to the same HTP v79, so-m SM8750should work without modifying the source. I'm not sure all of these changes were strictly necessary, but this is what I had when it worked.The main fix was upgrading QNN SDK to v2.42+. v2.41 gave "No Snapdragon SOC detected" for HTP v79. I used v2.43.
2. Environment Setup (Host)
The ExecuTorch build script (
backends/qualcomm/scripts/build.sh) links against the QNN SDK from this path. The.ptefile contains the QNN context binary, so no QNN SDK is needed on the device.3. Running on Device (qnn_executor_runner)
Push the minimum required files for HTP v79:
4. For Custom Android Apps
Copy the same QNN
.sofiles intojniLibs/arm64-v8a/, and add toAndroidManifest.xml:Without this, HTP delegation fails with FastRPC error 4000. Only needed for apps using JNI bindings, not for
qnn_executor_runner.5. Reference
Official tutorial: Setting up ExecuTorch for Qualcomm
6. Additional Notes
For reference, QCS6490 (HTP v68) worked fine with QNN SDK versions before v2.42. The v2.42+ requirement seems specific to HTP v79.
Also, when loading models other than DeepLab V3, I needed to add operator support in the QNN backend. Depending on your model, similar changes may be needed.
nil-is-all commentedon Jul 29, 2026
Hi @INHA-SW, based on your explanation, I understand upgrading QNN SDK to v2.42+. Does this completely solve the issue? If so, we can close this issue.
INHA-SW commentedon Jul 30, 2026
Yes, upgrading to QNN SDK v2.42+ completely resolved the issue. I verified it with QNN SDK v2.43, and the model loads and executes successfully on CQ8750S. This issue can be closed. Thanks!
ivaylo681-dev commentedon Aug 2, 2026
Dear @INHA-SW,
I think that I have the same problem with error 4000, but I use a different SoC - SM8750-AB with soc_id=639. qnnRuntime version "2.48.0".
I have started a topic at Qualcom, but later I found out this one with same problem described.
https://mysupport.qualcomm.com/supportforums/s/question/0D5dK00000RuGM1SAN/qnn-htp-fails-to-initialize-on-snapdragon-8-elite-sm8750p-native-no-snapdragon-soc-detected-transport-error-4000-reproduced-across-two-independent-frameworks