-
Notifications
You must be signed in to change notification settings - Fork 788
Description
🐛 Describe the bug
I use [QNN 2.37.0] (https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.37.0.250724/v2.37.0.250724.zip) SA8295
My model has been successfully converted to the pte of qnn
I created my own application and then introduced dependencies
implementation("org.pytorch:executorch-android-qnn:1.0.1")
use model.forward() The errors encountered are as follows:
Deserializing processed data using QnnContextCustomProtocol
create QNN Logger with log_level 1
Initialize Qnn backend parameters for Qnn executorch backend type 2
Caching: Caching is in RESTORE MODE.
QnnContextCustomProtocol expected magic number: 0x5678abcd but get: 0x2000000
QnnDsp Failed to create transport for device, error: 4000
QnnDsp Failed to load skel, error: 4000
QnnDsp Transport layer setup failed: 14001
QnnDsp Failed to parse default platform info: 14001
QnnDsp Failed to load default platform info: 14001
QnnDsp Failed to parse platform config: 14001
Failed to create device_handle for Backend ID 6, error=14001
Fail to configure Qnn device
Fail to initialize Qnn Manager
Init failed for backend QnnBackend: 0x1
org.pytorch.executorch.ExecutorchRuntimeException: [Executorch Error 0x1]
Internal error: Execution failed for method: forward
Detailed logs:
[10359688 _unsafe_reset_threadpool threadpool.cpp:48] I Resetting threadpool to 3 threads.
[196622240 Init QnnManager.cpp:340] E Fail to configure Qnn device
[196650000 init QnnExecuTorchBackend.cpp:95] E Fail to initialize Qnn Manager
[196655677 Init method.cpp:114] E Init failed for backend QnnBackend: 0x1
I tried to add the environment Settings in my jni, but still got the same error
adb push *.so pathStr
setenv("ADSP_LIBRARY_PATH", pathStr, 1);
setenv("LD_LIBRARY_PATH", pathStr, 1);
Versions
Collecting environment information...
PyTorch version: 2.9.0+cpu
Is debug build: False
CUDA used to build PyTorch: Could not collect
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: 14.0.0-1ubuntu1.1
CMake version: version 3.31.10
Libc version: glibc-2.35
Python version: 3.10.12 (main, Nov 4 2025, 08:48:33) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.8.0-90-generic-x86_64-with-glibc2.35
Is CUDA available: False
CUDA runtime version: 12.8.61
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: GPU 0: Quadro P4000
Nvidia driver version: 580.95.05
cuDNN version: Could not collect
Is XPU available: False
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Caching allocator config: N/A
CPU:
架构: x86_64
CPU 运行模式: 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
字节序: Little Endian
CPU: 8
在线 CPU 列表: 0-7
厂商 ID: GenuineIntel
型号名称: Intel(R) Xeon(R) Gold 5122 CPU @ 3.60GHz
CPU 系列: 6
型号: 85
每个核的线程数: 2
每个座的核数: 4
座: 1
步进: 4
CPU 最大 MHz: 3700.0000
CPU 最小 MHz: 1200.0000
BogoMIPS: 7200.00
标记: 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 smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 pti intel_ppin ssbd mba ibrs ibpb stibp tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req vnmi pku ospke md_clear flush_l1d arch_capabilities ibpb_exit_to_user
虚拟化: VT-x
L1d 缓存: 128 KiB (4 instances)
L1i 缓存: 128 KiB (4 instances)
L2 缓存: 4 MiB (4 instances)
L3 缓存: 16.5 MiB (1 instance)
NUMA 节点: 1
NUMA 节点0 CPU: 0-7
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: KVM: Mitigation: VMX disabled
Vulnerability L1tf: Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; 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; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT vulnerable
Vulnerability Vmscape: Mitigation; IBPB before exit to userspace
Versions of relevant libraries:
[pip3] executorch==1.0.1a0+7b220c6
[pip3] numpy==2.2.6
[pip3] nvidia-cublas-cu12==12.8.4.1
[pip3] nvidia-cuda-cupti-cu12==12.8.90
[pip3] nvidia-cuda-nvrtc-cu12==12.8.93
[pip3] nvidia-cuda-runtime-cu12==12.8.90
[pip3] nvidia-cudnn-cu12==9.10.2.21
[pip3] nvidia-cufft-cu12==11.3.3.83
[pip3] nvidia-curand-cu12==10.3.9.90
[pip3] nvidia-cusolver-cu12==11.7.3.90
[pip3] nvidia-cusparse-cu12==12.5.8.93
[pip3] nvidia-cusparselt-cu12==0.7.1
[pip3] nvidia-nccl-cu12==2.27.5
[pip3] nvidia-nvjitlink-cu12==12.8.93
[pip3] nvidia-nvtx-cu12==12.8.90
[pip3] pytorch_tokenizers==1.0.1
[pip3] torch==2.9.0+cpu
[pip3] torchao==0.14.0+git02941240f
[pip3] torchaudio==2.9.1
[pip3] torchdata==0.11.0
[pip3] torchsr==1.0.4
[pip3] torchtune==0.6.1
[pip3] torchvision==0.24.1
[pip3] triton==3.5.1
[conda] No relevant packages
cc @cccclai @winskuo-quic @shewu-quic @haowhsu-quic @DannyYuyang-quic @cbilgin