Backend

Clients interact with Qualcomm® AI Engine Direct through backends. In general terms, a Qualcomm® AI Engine Direct backend is a software entity that implements QNN API, and is typically compiled in the form of a shared library. The terms QNN backend and QNN backend library are often used interchangeably.

QNN backend libraries provide integration modularity per hardware accelerator core (see Overview for more details).

The QNN SDK provides several backend libraries. These libraries can be found in <QNN_SDK_ROOT>/lib/<target-platform> folders. QNN backend libraries follow naming rules that are platform dependent (see Platform Differences for more details). In the Available Backend Libraries table Library Description, the backend library is referred to by its platform agnostic name.

Available QNN SDK Backend libraries

Backend Name

Backend Description

Target and Library Names

Library Description

CPU

Backend for Snapdragon™ CPU hardware core(s)

  • aarch64-android

  • x86_64-linux-clang

    • libQnnCpu.so

  • aarch64-windows-msvc

  • arm64x-windows-msvc

  • x86_64-windows-msvc

    • QnnCpu.dll

QnnCpu : CPU backend library, same name used across all targets.

DSP

Backend for Hexagon™ DSP hardware accelerator

  • hexagon-v##

    • libQnnDspV##Skel.so

    • libQnnDspV##.so

  • aarch64-android

    • libQnnDsp.so

    • libQnnDspV##Stub.so

  • aarch64-windows-msvc

    • QnnDsp.dll

    • QnnDspV##Stub.dll

Note: v## indicates libraries for different hexagon architecture versions are available.

libQnnDspV##Skel.so : DSP native library which is to be loaded using corresponding QnnDspV##Stub from the device CPU side and is responsible for executing graphs on the DSP accelerator as a proxy for CPU side backend.

QnnDspV##Stub : DSP CPU-side proxy library that communicates with libQnnDspV##Skel.so on DSP side via RPC channel.

QnnDsp : DSP device CPU-side backend library, loads the corresponding DSP stub library based on the SoC.

libQnnDspV##.so : DSP native backend library that allows direct integration on DSP without RPC.

GPU

Backend for Adreno™ GPU hardware accelerator

  • aarch64-android

    • libQnnGpu.so

  • aarch64-windows-msvc

  • arm64x-windows-msvc

    • QnnGpu.dll

QnnGpu : GPU backend library, same name used across all targets.

HTP

Backend for Hexagon™ HTP hardware accelerator

  • hexagon-v##

    • libQnnHtpV##Skel.so

    • libQnnHtpV##.so

  • aarch64-android

    • libQnnHtp.so

    • libQnnHtpPrepare.so

    • libQnnHtpV##Stub.so

  • x86_64-linux-clang

    • libQnnHtp.so

  • aarch64-windows-msvc

  • arm64x-windows-msvc

    • QnnHtp.dll

    • QnnHtpPrepare.dll

    • QnnHtpV##Stub.dll

Note: v## indicates libraries for different hexagon architecture versions are available.

libQnnHtpV##Skel.so : HTP native library which is to be loaded using corresponding QnnHtpV##Stub from the device CPU side and is responsible for executing graphs on the HTP accelerator as a proxy for CPU side backend.

QnnHtpV##Stub : HTP CPU-side proxy library that communicates with libQnnHtpV##Skel.so on the HTP side via RPC channel.

QnnHtp : HTP backend library. There are two variants: (aarch64-android) Android device CPU-side backend library, loads the corresponding HTP stub library based on the SoC; (x86_64-linux) x86 Linux host backend serves as an functional simulator for the hardware accelerator and supports graph preparation on x86_64 hosts.

libQnnHtpV##.so : HTP native backend library that allows direct integration on HTP without RPC.

QnnHtpPrepare : HTP library which provides functionality to compose and finalize graphs on the device ARM (CPU) side. This library is automatically loaded by HTP backend library only when one of the following operations is requested: 1) QnnBackend_validateOpConfig, 2) QnnGraph_addNode, 3) QnnGraph_finalize, or 4) QnnBackend_registerOpPackage() with “CPU” target. If these operations are not requested, this library does not need to be on the device.

HTA

Backend for Snapdragon™ HTA hardware accelerator

  • aarch64-android

    • libQnnHta.so

QnnHta : HTA backend library, same name used across all supported targets.

LPAI

Backend for Snapdragon™ LPAI hardware accelerator

  • Artifacts for offline model generation

    • x86_64-linux-clang

      • libQnnLpai.so

      • libQnnLpaiPrepare_v##.so

    • x86_64-windows-msvc

      • QnnLpai.dll

      • QnnLpaiPrepare_v##.dll

  • Artifacts for execution from v5 version only

    • lpai-v##

      • libQnnLpaiSkel.so

      • libQnnLpai.so

      • libQnnLpaiIsland.so

    • aarch64-android

      • libQnnLpai.so

      • libQnnLpaiStub.so

    • x86_64-linux-clang

      • libQnnLpai.so

      • libQnnLpaiPrepare_v##.so

      • libQnnLpaiSim_v##.so

    • x86_64-windows-msvc

      • QnnLpai.dll

      • QnnLpaiPrepare_v##.dll

      • QnnLpaiSim_v##.dll

Note:

  • Sim_v## indicates Simulator libraries for different eNPU architecture versions.

  • Prepare_v## indicates compiler libraries for different eNPU architecture versions.

  • libQnnLpai.so : LPAI native library located under lpai-v## to be loaded by qnn-net-run direct-mode or other DSP client app.

  • libQnnLpaiSkel.so : LPAI native library which is to be loaded using corresponding QnnLpaiStub.so from the device ARM(CPU) side and is responsible for executing graphs on the LPAI accelerator as a proxy for CPU side backend.

  • libQnnLpaiIsland.so : LPAI native Island library which is to be used by client to develop native DSP app with island functionality.

  • QnnLpaiStub.so : LPAI ARM(CPU) side proxy library that communicates with libQnnLpaiSkel.so on the LPAI side via RPC channel.

  • libQnnLpai.so : LPAI backend library. There are two variants: (aarch64-android) Android device ARM(CPU) side backend library, loads the corresponding LPAI stub library based on the SoC; (x86_64-linux) x86 Linux host backend serves as an functional simulator for the hardware accelerator and supports graph generation on x86_64 hosts.

  • libQnnLpaiSim_v##.so : x86_64 Linux host simulator library for specific eNPU architecture. This library is automatically loaded by LPAI backend library when one of the following operations is requested: 1) QnnContext_createFromBinary 2) QnnContext_create.

  • libQnnLpaiPrepare_v##.so : x86_64 Linux host model generator library for specific eNPU architecture. This library is automatically loaded by LPAI backend library when one of the following operations is requested: 1) QnnBackend_validateOpConfig, 2) QnnGraph_addNode, 3) QnnGraph_finalize

  • QnnLpai.dll : x86_64 Windows host backend serves as an functional simulator for the hardware accelerator and supports graph generation on x86_64 hosts.

  • QnnLpaiSim_v##.dll : x86_64 Windows host simulator library for specific eNPU architecture. This library is automatically loaded by LPAI backend library when one of the following operations is requested: 1) QnnContext_createFromBinary 2) QnnContext_create.

  • QnnLpaiPrepare_v##.dll : x86_64 Windows host model generator library for specific eNPU architecture. This library is automatically loaded by LPAI backend library when one of the following operations is requested: 1) QnnBackend_validateOpConfig, 2) QnnGraph_addNode, 3) QnnGraph_finalize

Saver

Backend which captures QNN API calls and saves them to a file as they are issued by a client. This can later be replayed for support and troubleshooting.

  • aarch64-android

  • x86_64-linux-clang

  • hexagon-v68

    • libQnnSaver.so

  • aarch64-windows-msvc

  • x86_64-windows-msvc

    • QnnSaver.dll

QnnSaver : Saver backend library.

Backend Specific Pages