ggml-hexagon NPU backend: remote session open fails on Snapdragon X Elite WoA (HND driver v1.0.0.14) — GGML_ASSERT(device) in v0.5.0 NPU inference
Title
ggml-hexagon: remote_handle64_open fails on Snapdragon X Elite Windows-on-ARM (HND driver v1.0.0.14) — GGML_ASSERT(device) in backend init; also reproduces via GenieX v0.5.0 stockBody
Summary
On Snapdragon X Elite (X1E78100, Windows on ARM64), the ggml-hexagon backend fails during device init: remote_handle64_open(domain="cdsp") returns an error (first 0x43, then 0x72 after enabling test-signing), leading to GGML_ASSERT(device) failed at ggml-backend.cpp:584. The identical failure occurs through the stock GenieX v0.5.0 CLI NPU path, so this is not specific to our build. It worked in early July 2026 (~9.6 tok/s on Qwen3.6-35B-A3B NPU) before a driver/runtime version change.
Environment
| Component | Version |
|---|---|
| Device | ASUS Vivobook S15 S5507QA, Snapdragon X Elite X1E78100, 32 GB |
| OS | Windows on ARM64 (current as of 2026-08-26) |
| Hexagon NPU driver | Qualcomm_Hexagon_NPU_Driver v1.0.0.14 (HND; kernel driver qcnspmcdm8380.sys RUNNING, PnP entity OK) |
| QAIRT | 2.49.40.260810 (+ 2.48 installed); GenieX v0.5.0 bundles QAIRT v2.45 |
| llama.cpp base | qvac fork @ v1.4.1-era tree (also reproduced on b10567-era builds of other forks) |
| Compiler | LLVM clang-cl 22.1.8, vcvarsarm64, Ninja |
Reproduction A — build from source (our tree)
cmake -S src -B build -G Ninja -DGGML_HEXAGON=ON -DGGML_OPENMP=OFF \
-DCMAKE_C{,XX}_COMPILER=clang-cl -DHEXAGON_SDK_ROOT=... -DHEXAGON_ARCH=v73
# Build completes 100% after 3 small patches (list below — happy to PR)
llama-bench --list-devices # hangs/errors during hexagon backend initVerbose stderr:
ggml-hex: Hexagon Arch version v73
ggml-hex: allocating new session: HTP0
ggml-hex: failed to open session 0 : error 0x72
ggml-hex: releasing session: HTP0
ggml-hex: failed to create device/session 0
ggml-backend.cpp:584: GGML_ASSERT(device) failedEarlier state (before test-signing was active): same flow returned error 0x43.
Reproduction B — stock GenieX v0.5.0 (no custom build)
geniex pull unsloth/Qwen3-0.6B-GGUF:Q4_K_M # OK
geniex infer unsloth/Qwen3-0.6B-GGUF:Q4_K_M -c npu -p helloggml-backend.cpp:569: GGML_ASSERT(device) failed
fatal: backend aborted (SIGABRT)
github.com/qualcomm/GenieX/bindings/go.NewLLM ...What we verified as healthy
- NPU PnP entity present, Status OK (
Snapdragon(R) X Elite ... Hexagon(TM) NPU) - Kernel driver service
qcnspmcdmRUNNING; CDSP SW Thermal device OK libcdsprpc.dll(DriverStore copy) exports all expected symbols incl.remote_handle64_open/close,rpcmem_*(96 exports)- Test-signing ON; unsigned skel
libggml-htp-v73.sobuilt vianinja htp-v73(115 KB) and staged; also tried Qualcomm's own signed skel+.catshipped inside GenieX — failure identical, so skel signature/content is not the variable ADSP_LIBRARY_PATHtried both plain andunsigned;-prefixed forms- Contrast: the QNN path works fine on this machine — our separate QAIRT-based pipeline runs MobileNetV3 on the Hexagon NPU at ~224 img/s, so the hardware + driver stack is functional for context-binary execution; the failure is specific to the FastRPC session/domain open path used by ggml-hexagon.
Build patches we needed (offered as PRs)
backends/qualcomm/CMakeLists.txt: arch gate"x86_64|AMD64"excludes ARM64 hosts (Windows-native ET-QNN build)extension/llm/custom_ops/CMakeLists.txt: regex misses uppercaseARM64CMAKE_SYSTEM_PROCESSORthird-party/CMakeLists.txt: flatc byproduct missing.exesuffix under Ninja on Windowsggml/src/ggml-hexagon/CMakeLists.txt: host TUs need explicit_M_ARM64define when compiled by x64-hosted clang-cl under ARM64 emulation; plus SDK's${HEXAGON_SDK_ROOT}/incs/stddefPUBLIC include poisons MSVC header chain for dependent TUs (should be PRIVATE/system)ggml/src/ggml-hexagon/ggml-hexagon.cpp:ggml_backend_buffer_i/ggml_backend_ipositional initializers misaligned with current struct members (newset_tensor_2d/get_tensor_2d/async-2d slots)
Regression window
Worked ~2026-07-08 (GenieX v0.3.x era, earlier HND driver/QAIRT). Current combo (HND v1.0.0.14 + QAIRT 2.49/2.45 + Aug Windows updates) fails for both our source build and stock GenieX.
Ask
Guidance on WoS remote_handle64_open requirements: correct domain string, driver↔QAIRT version matching, or any registry/driver-mode prerequisites beyond TESTSIGNING for session creation. Happy to provide additional traces.
Source: qualcomm/GenieX