-
Notifications
You must be signed in to change notification settings - Fork 794
Closed
Labels
module: qnnIssues related to Qualcomm's QNN delegate and code under backends/qualcomm/Issues related to Qualcomm's QNN delegate and code under backends/qualcomm/partner: qualcommFor backend delegation, kernels, demo, etc. from the 3rd-party 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/Issues related to Qualcomm's QNN delegate and code under backends/qualcomm/partner: qualcommFor backend delegation, kernels, demo, etc. from the 3rd-party partner, QualcommFor backend delegation, kernels, demo, etc. from the 3rd-party partner, Qualcomm