QAI AppBuilder
2026-04-28
The Quick AI Application Builder (this repository) is also referred to as "QAI AppBuilder" in the source code and documentation.
QAI AppBuilder is an extension of the Qualcomm® AI Runtime SDK, which is used to simplify the deployment of QNN models. Some libraries from the Qualcomm® AI Runtime SDK are required to use QAI AppBuilder.
QAI AppBuilder is designed to help developers easily use the Qualcomm® AI Runtime SDK to execute models on Windows on Snapdragon (WoS) and Linux platforms. It encapsulates the model execution APIs into a set of simplified interfaces for loading models onto the NPU/HTP and performing inference. It substantially lowers the complexity of model deployment for developers.
Setup Environment
sudo apt install -y wget cmake git g++
pip install tqdm qai-hub py3_wget opencv-python torch torchvision
Download Resource
# Download QAIRT
wget https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.37.1.250807/v2.37.1.250807.zip
unzip -q v2.37.1.250807.zip
# Download QAI AppBuilder Source
git clone https://github.com/quic/ai-engine-direct-helper -b v2.38.0 --depth 1 --recursive
Build and Install QAI AppBuilder
export PRODUCT_SOC=6490 DSP_ARCH=68
source qairt/2.37.1.250807/bin/envsetup.sh
export ADSP_LIBRARY_PATH=$QNN_SDK_ROOT/lib/hexagon-v${DSP_ARCH}/unsigned
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$QNN_SDK_ROOT/lib/aarch64-oe-linux-gcc11.2
cd ai-engine-direct-helper
python3 setup.py bdist_wheel
pip3 install setdist/qai_appbuilder-2.34.0-cp313-cp313-linux_aarch64.whl
cd -
Tun Test Program
cd ai-engine-direct-helper/samples/linux/python
python3 inception_v3/inception_v3.py --image cat.png
Test Program Log
Current file directory: /home/p/quectel-pi-ai-engine-direct-helper/ai-engine-direct-helper/samples/linux/python/inception_v3
model_path: /home/p/quectel-pi-ai-engine-direct-helper/ai-engine-direct-helper/samples/linux/python/inception_v3/models/inception_v3.bin
0.0ms [WARNING] <W> Initializing HtpProvider
/prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:38:dummy call to rpcmem_init, rpcmem APIs will be used from libxdsprpc
163.9ms [WARNING] Time: Read model file to memory. 17.78
183.1ms [WARNING] Time: contextCreateFromBinary. 19.11
183.1ms [WARNING] Time: UnmapViewOfFile. 0.00
188.3ms [WARNING] Time: model_initialize inceptionV3 188.24
217.9ms [WARNING] Time: model_inference inceptionV3 4.11
Top 5 predictions for image:
Persian cat 0.964312017
tabby 0.0149575649
bucket 0.0060467576
Angora 0.0020394654
Egyptian cat 0.0020394654
/prj/qct/webtech_scratch20/mlg_user_admin/qaisw_source_repo/rel/qairt-2.37.1/point_release/SNPE_SRC/avante-tools/prebuilt/dsp/hexagon-sdk-5.4.0/ipc/fastrpc/rpcmem/src/rpcmem_android.c:42:dummy call to rpcmem_deinit, rpcmem APIs will be used from libxdsprpc
256.1ms [WARNING] Time: model_destroy inceptionV3 35.37
Testing Picture
