Skip to content

QNN HTP init fails on CQ8750S (soc_id=705): "No Snapdragon SOC detected" #16465

Closed

Description

@INHA-SW

🐛 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

  1. Build ExecuTorch with Qualcomm backend and build the runner.
  2. Export a .pte with -m SM8750 (HTP v79).
  3. 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 @cbilgin

Activity

  1. nil-is-all commented on Jan 6, 2026

    @nil-is-all
    Contributor

    Thanks for reporting this, @INHA-SW! @haowhsu-quic @shewu-quic @winskuo-quic @DannyYuyang-quic can any of you take a look?

  2. added
    partner: qualcomm
    module: qnn
    on Jan 6, 2026
  3. metascroy commented on Jan 6, 2026

    @metascroy
    Contributor

    @cccclai can you have a look?

  4. haowhsu-quic commented on Jan 7, 2026

    @haowhsu-quic
    Contributor

    Hi, I think the value should be 105 and this device will be available with QNN v2.43 in next month.

  5. INHA-SW commented on Jan 7, 2026

    @INHA-SW
    Author

    @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:

    ./qnn_executor_runner --model_path ./dl3_qnn_q8.pte
    I 00:00:00.000550 executorch:qnn_executor_runner.cpp:232] Model file ./dl3_qnn_q8_250107.pte is loaded.
    I 00:00:00.000571 executorch:qnn_executor_runner.cpp:242] Using method forward
    I 00:00:00.000594 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
    [WARNING] [Qnn ExecuTorch]: Qnn API version 2.32.0 is used. The version is tested against 2.27.0.
    [INFO] [Qnn ExecuTorch]: Initialize Qnn backend parameters for Qnn executorch backend type 2
    [INFO] [Qnn ExecuTorch]: Caching: Caching is in RESTORE MODE.
    [INFO] [Qnn ExecuTorch]: QnnContextCustomProtocol expected magic number: 0x5678abcd but get: 0x2000000
    [INFO] [Qnn ExecuTorch]: Running level=1 optimization.
    I 00:00:00.148985 executorch:qnn_executor_runner.cpp:313] Method loaded.
    E 00:00:00.150647 executorch:method.cpp:1274] Output 0 is memory planned, or is a constant. Cannot override the existing data pointer.
    I 00:00:00.150659 executorch:qnn_executor_runner.cpp:373] ignoring error from set_output_data_ptr(): 0x2
    E 00:00:00.151951 executorch:method.cpp:1274] Output 1 is memory planned, or is a constant. Cannot override the existing data pointer.
    I 00:00:00.151963 executorch:qnn_executor_runner.cpp:373] ignoring error from set_output_data_ptr(): 0x2
    I 00:00:00.151967 executorch:qnn_executor_runner.cpp:376] Inputs prepared.
    I 00:00:00.152385 executorch:qnn_executor_runner.cpp:575] Input list not provided. Inputs prepared with default values set.
    I 00:00:00.157533 executorch:qnn_executor_runner.cpp:584] Model executed successfully.
    I 00:00:00.157544 executorch:qnn_executor_runner.cpp:587] Perform 0 inferences for warming up
    I 00:00:00.161817 executorch:qnn_executor_runner.cpp:609] 1 inferences took 4.269000 ms, avg 4.269000 ms
    I 00:00:00.161841 executorch:qnn_executor_runner.cpp:620] Write etdump to etdump.etdp, Size = 576
    [INFO] [Qnn ExecuTorch]: Destroy Qnn context
    [INFO] [Qnn ExecuTorch]: Destroy Qnn device
    [INFO] [Qnn ExecuTorch]: Destroy Qnn backend
  6. ZIFENG278 commented on Jan 14, 2026

    @ZIFENG278

    Hi, what is the mean of "value to 105" and where to set this value

  7. yoonsuk98 commented on Mar 11, 2026

    @yoonsuk98

    @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.

  8. cccclai commented on Mar 11, 2026

    @cccclai
    Contributor

    I think it's likely this ID

    class QcomChipset(IntEnum):

    @ZIFENG278 @yoonsuk98 are both of you using CQ8750S

    cc: @haowhsu-quic can we add them to the support list, and @abhinaykukkadapu fyi

  9. abhinaykukkadapu commented on Mar 12, 2026

    @abhinaykukkadapu
    Contributor

    @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?

  10. haowhsu-quic commented on Mar 12, 2026

    @haowhsu-quic
    Contributor

    Sorry, this information is private currently.

  11. INHA-SW commented on Mar 13, 2026

    @INHA-SW
    Author

    @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). CQ8750S is not in the upstream ExecuTorch codebase — I added it manually to backends/qualcomm/serialization/qc_schema.py:

    # In QcomChipset enum:
    SM8750 = 69    # HTP v79
    CQ8750S = 105  # HTP v79 (this is what I used)
    
    # In _soc_info_table:
    QcomChipset.CQ8750S: SocInfo(QcomChipset.CQ8750S, HtpInfo(HtpArch.V79, 8)),

    SM8750 (SOC 69) is already built-in and maps to the same HTP v79, so -m SM8750 should 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)

    export QNN_SDK_ROOT=/path/to/qnn_sdk/2.43.0.260128
    export LD_LIBRARY_PATH="$QNN_SDK_ROOT/lib/x86_64-linux-clang:$LD_LIBRARY_PATH"
    export ANDROID_NDK_ROOT=/path/to/android-ndk-r27d

    The ExecuTorch build script (backends/qualcomm/scripts/build.sh) links against the QNN SDK from this path. The .pte file 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:

    DEVICE_DIR=/data/local/tmp/executorch_qualcomm/
    adb shell "mkdir -p ${DEVICE_DIR}"
    
    adb push ${QNN_SDK_ROOT}/lib/aarch64-android/libQnnHtp.so ${DEVICE_DIR}
    adb push ${QNN_SDK_ROOT}/lib/aarch64-android/libQnnSystem.so ${DEVICE_DIR}
    adb push ${QNN_SDK_ROOT}/lib/aarch64-android/libQnnHtpV79Stub.so ${DEVICE_DIR}
    adb push ${QNN_SDK_ROOT}/lib/hexagon-v79/unsigned/libQnnHtpV79Skel.so ${DEVICE_DIR}
    
    adb push model.pte ${DEVICE_DIR}
    adb push build-android/examples/qualcomm/executor_runner/qnn_executor_runner ${DEVICE_DIR}
    adb shell "cd ${DEVICE_DIR} \
      && export LD_LIBRARY_PATH=${DEVICE_DIR}:/vendor/lib64:/system/lib64 \
      && export ADSP_LIBRARY_PATH=${DEVICE_DIR}:/vendor/lib64 \
      && ./qnn_executor_runner --model_path ./model.pte"

    4. For Custom Android Apps

    Copy the same QNN .so files into jniLibs/arm64-v8a/, and add to AndroidManifest.xml:

    <uses-native-library android:name="libcdsprpc.so" android:required="false"/>

    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.

  12. added theissue type on Jul 21, 2026
  13. nil-is-all commented on Jul 29, 2026

    @nil-is-all
    Contributor

    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.

  14. INHA-SW commented on Jul 30, 2026

    @INHA-SW
    Author

    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!

  15. ivaylo681-dev commented on Aug 2, 2026

    @ivaylo681-dev

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    module: qnnpartner: qualcomm

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions