# How to Use the QAIRT Sample App on Windows In this tutorial we will walk you from start to finish getting a model working with the QAIRT Sample App on a Windows host machine. The Sample App provides a reference implementation for how to use the QAIRT API to execute inferences on your target device with your model. After you understand how to build the app and use it, you can use its implementation as a starting point for allowing your own on-target application to interact with your model. The recommended developer flow is: 1. Follow these steps to prove you can: 1. Execute your model on the target device. 2. Build and use an app on your target device. 2. Adapt sections of the Sample App into your on-device application for your use case (or add your own logic to expand the Sample App based on your needs). 1. You should read the code in the Sample App to understand what is going on. You can use the API docs to identify how you can change the code for your use case. This tutorial as a whole is designed to show you how to use QAIRT across different target devices and situations from a Windows host. In order to provide actionable commands for all of those paths, this tutorial is structured like a “choose your own adventure” where you will frequently be able to choose the steps that are relevant for your situation. Note Throughout this tutorial, we frequently use commands and environment variables to help you take the right actions. If any command does not work for you, we recommend you copy it and any errors into an AI chat of your choosing and ask the AI to explain what the command is doing and why it was not working for you. Before you start taking actions, it’s important for you to note down the configuration(s) you want to support. Having those written down ahead of time will help you choose the right paths through this tutorial for your situation. You can also use the default configuration (underneath these questions) if you aren’t sure yet what configuration you want. ## Questions to Answer Warning If you don’t know what answers to give, you can skip past these questions and use the default configuration underneath. 1. What AI model do you want to use? 1. Qualcomm’s software allows you to work with your own models, or use models from various popular frameworks. You can also explore [Qualcomm’s AI Hub](https://aihub.qualcomm.com/) to find models for your use case. 2. Example model: [EfficientNet Lite](https://github.com/onnx/models/tree/main/validated/vision/classification/efficientnet-lite4/model) 2. Which AI framework is the model using? 1. You can usually tell what framework a model was built with by looking at the file extension of it. 2. Ex. [ONNX](https://onnx.ai/) (`.onnx`), [Tensorflow](https://www.tensorflow.org/) (`.pb`, `.tflite` for TensorflowLite format), [PyTorch](https://pytorch.org/) (`.pt`) etc. 3. What is the architecture of your Windows host machine? 1. Run `Get-ComputerInfo | Select-Object WindowsProductName, WindowsVersion, OsArchitecture` in PowerShell. 2. Ex. `x86_64` `Windows 11` 4. What is the architecture and OS of your target device? 1. See the previous question for commands you can run to investigate this. On a non-Windows target, the relevant commands depend on its OS. 2. Ex. `ARM64` `Windows 11` ## Default Configuration You can use this to experience the QAIRT workflow for running inferences with a model on a target device: 1. Model: [EfficientNet Lite](https://github.com/onnx/models/tree/main/validated/vision/classification/efficientnet-lite4/model) 2. Framework: ONNX 3. Host machine architecture and OS: `x86_64` Windows 11 4. Target device: The same as your host device (testing locally) Note When you are presented with choices going forward, refer back to your answers to these questions. ## Final Notes Before Starting Note Keep in mind that all steps below are **required** unless they explicitly say they are “(optional)”. Warning The SDK install path must contain **no spaces**. Use `C:\qairt\`, not `C:\Program Files\...` or any other path with spaces — several SDK scripts and the build system fail on paths with spaces. ## Part 0: Configuring Your System This section is required to ensure you have the proper software and environment variables to work with the QAIRT SDK and API on Windows. Note Step 4 below defines a PowerShell function `setenvvar` that we will use extensively throughout this tutorial to set, log, and persist values across PowerShell sessions, so ensure you follow those steps. - **Step 1:** Install Visual Studio 2022 Ensure you’re using Visual Studio 2022, not Visual Studio 2026. If Visual Studio 2026 is installed, the build will fail. - **Step 1.1:** Download Visual Studio 2022 Professional from [https://visualstudio.microsoft.com/vs/older-downloads/](https://visualstudio.microsoft.com/vs/older-downloads/). - **Step 1.2:** In the installer, select the **Desktop development with C++** workload, plus these individual components: - **MSVC v143 – VS 2022 C++ x64/x86 build tools (v14.34-17.4)** - **C++ CMake tools for Windows** - **Windows 11 SDK (10.0.22621)** Note Do **not** install the Clang components — clang-cl 19.x (shipped with newer VS bundles) breaks on the SDK’s `__FUNCSIG__` parser at compile time. The build uses plain MSVC. - **Step 2:** Download and extract the [Qualcomm AI Runtime (QAIRT) SDK](https://www.qualcomm.com/developer/software/qualcomm-ai-engine-direct-sdk) to `C:\qairt\` - **Step 2.1:** Visit the [QAIRT SDK download page](https://www.qualcomm.com/developer/software/qualcomm-ai-engine-direct-sdk) and click “Get Software”. - **Step 2.2:** Extract the downloaded ZIP and move the inner `qairt\\` directory to `C:\qairt\\` so the path contains no spaces. - **Step 3:** Open the developer shell Most build commands need the MSVC environment loaded. The cleanest way is to launch the Visual Studio Native Tools developer prompt and then start PowerShell from inside it so PowerShell inherits the dev environment. - **Step 3.1:** From the Start menu, open **“x64 Native Tools Command Prompt for VS 2022”**. Note This must be `cmd`, not PowerShell — the VS env-setup is a `.bat` file and only sets variables in the `cmd` it runs in. If the Start menu shortcut errors, run from any `cmd.exe`: "C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Auxiliary\Build\vcvars64.bat" Copy to clipboard (Replace `Professional` with `Enterprise` if that’s what you installed.) - **Step 3.2:** Launch PowerShell from that `cmd` so it inherits the dev environment: powershell -NoExit Copy to clipboard - **Step 3.3:** Source the SDK environment: cd C:\qairt\ Unblock-File .\bin\envsetup.ps1 .\bin\envsetup.ps1 Copy to clipboard You should see something like: [INFO] QAIRT_SDK_ROOT=C:\qairt\2.47.0.260520 [WARN] QNN_SDK_ROOT/SNPE_ROOT set to QAIRT_SDK_ROOT for backwards compatibility and will be deprecated in a future release. [INFO] QAIRT SDK environment setup complete Copy to clipboard - **Step 4:** Create a `setenvvar` PowerShell function for persistent variables In this guide we’ll be using environment variables often. `setenvvar` writes them to the current session AND to your User scope so they persist across PowerShell instances. if (-not (Test-Path $PROFILE)) { New-Item -ItemType File -Path $PROFILE -Force | Out-Null } Add-Content -Path $PROFILE -Value @' function setenvvar { param([string]$Name, [string]$Value) [System.Environment]::SetEnvironmentVariable($Name, $Value, 'User') Set-Item -Path "Env:$Name" -Value $Value Write-Host "$Name set to $Value" } '@ . $PROFILE Copy to clipboard - **Step 5:** Pick and save your target architecture Pick the value matching your target device: | Target | Architecture | OS | | --- | --- | --- | | `x86_64-windows-msvc` | x86\_64 | Windows | | `aarch64-windows-msvc` | ARM64 | Windows (Snapdragon) | | `aarch64-android` | ARM64 | Android | setenvvar QAIRT_TARGET_ARCH_AND_OS "x86_64-windows-msvc" Copy to clipboard - **Step 6:** Verify and install Windows build dependencies - **Step 6.1:** Run the SDK’s dependency check script: Unblock-File "${env:QAIRT_SDK_ROOT}\bin\check-windows-dependency.ps1" & "${env:QAIRT_SDK_ROOT}\bin\check-windows-dependency.ps1" Copy to clipboard Re-run this script after each tool it asks you to install. When it prints “All Done”, continue. - **Step 6.2:** Verify the toolchain versions: & "${env:QAIRT_SDK_ROOT}\bin\envcheck.ps1" -a Copy to clipboard A clean pass requires VS 2022 17.4, MSVC v14.34, Windows 11 SDK 10.0.22621, and CMake 3.21+. Re-install any flagged components from the VS Installer. - **Step 7:** Install Python 3.10 Windows currently supports Python 3.10 only. - **Step 7.1:** Install Python 3.10 from [https://www.python.org/downloads/release/python-3104/](https://www.python.org/downloads/release/python-3104/). - **Step 7.2:** Create and activate a venv inside the SDK root: cd ${env:QAIRT_SDK_ROOT} py -3.10 -m venv venv .\venv\Scripts\Activate.ps1 Copy to clipboard - **Step 7.3:** Install Python dependencies: python -m pip install --upgrade pip python "${env:QAIRT_SDK_ROOT}\bin\check-python-dependency" Copy to clipboard - **Step 8:** Install the toolchain(s) for your target Pick the sub-step(s) below that match your chosen `QAIRT_TARGET_ARCH_AND_OS`. You only need to set up toolchains for targets you actually plan to build. - **Sub-Step 8.1:** (For `x86_64-windows-msvc`) No additional toolchain needed — VS 2022 from Step 1 is sufficient. - **Sub-Step 8.2:** (For `aarch64-windows-msvc`) Use the ARM64 developer prompt instead Restart from Step 3.1 using **“ARM64 Native Tools Command Prompt for VS 2022”** (or call `vcvarsarm64.bat` instead of `vcvars64.bat`). All later steps that build for the target architecture pick this up automatically. - **Sub-Step 8.3:** (For `aarch64-android`) Install the Android NDK and set `ANDROID_NDK_ROOT` Invoke-WebRequest -Uri "https://dl.google.com/android/repository/android-ndk-r26c-windows.zip" -OutFile "$env:USERPROFILE\android-ndk-r26c.zip" Expand-Archive -Path "$env:USERPROFILE\android-ndk-r26c.zip" -DestinationPath "$env:USERPROFILE" setenvvar ANDROID_NDK_ROOT "$env:USERPROFILE\android-ndk-r26c" & "${env:QAIRT_SDK_ROOT}\bin\envcheck.ps1" -n Copy to clipboard ## Part 1: Build a Model In order to execute an inference using your model on your target device, you need to convert it into a QAIRT Deep Learning Container (`.dlc`) file. The Sample App loads `.dlc` files via the `--input_dlc` flag. Choose which type of model / conversion you would like to do, your options are: 1. Build with an example ONNX Model (Recommended to see the conversion steps) 2. Build your own model or use a pre-built model (ex. Tensorflow, PyTorch) Skim to the **Option** you chose below and follow all steps within: - **Option 1:** Build with an example ONNX Model - **Step 1:** Enter the models directory cd "${env:QAIRT_SDK_ROOT}\examples\Models" Copy to clipboard - **Step 2:** Install Python dependencies pip install numpy onnx onnxruntime onnxsim pandas Copy to clipboard - **Step 3:** Download the example [EfficientNet Lite](https://github.com/onnx/models/tree/main/validated/vision/classification/efficientnet-lite4/model) model Invoke-WebRequest -Uri "https://github.com/onnx/models/raw/refs/heads/main/validated/vision/classification/efficientnet-lite4/model/efficientnet-lite4-11.tar.gz" -OutFile "efficientnet-lite4-11.tar.gz" tar -xf efficientnet-lite4-11.tar.gz Copy to clipboard - **Step 4:** Save model path setenvvar ONNX_MODEL_PATH "${env:QAIRT_SDK_ROOT}\examples\Models\efficientnet-lite4\efficientnet-lite4.onnx" Copy to clipboard - **Step 5:** Get model dimensions and name - **Step 5.1:** Inspect the model python -c "import os, onnx, onnxruntime; f = os.environ['ONNX_MODEL_PATH']; m = onnx.load(f); s = onnxruntime.InferenceSession(f); lines = [f'ONNX Input: name={i.name}, shape={[d.dim_value for d in i.type.tensor_type.shape.dim]}\n' for i in m.graph.input]; print(''.join(lines), end=''); open('input_name_and_dim.txt', 'w').writelines(lines)" Copy to clipboard You can access these values later by looking at `input_name_and_dim.txt`. - **Step 5.2:** Save the values to environment variables $line = Get-Content "$(Split-Path $env:ONNX_MODEL_PATH)\input_name_and_dim.txt" | Select-Object -First 1 if ($line -match 'name=([^,]+), shape=\[(.*)\]') { setenvvar ONNX_INPUT_NAME $matches[1] setenvvar ONNX_INPUT_DIMENSIONS $matches[2] } Copy to clipboard You should see the following output: ONNX_INPUT_NAME set to images:0 ONNX_INPUT_DIMENSIONS set to 1, 224, 224, 3 Copy to clipboard - **Step 6:** Create input\_list.txt For running the model we need input data. The QAIRT tools expect this data to be in a raw format, and the paths defined in a text file. - **Step 6.1:** Convert `.pb` inputs to `.raw` python -c "import onnx, numpy as np, glob, os; base = os.path.dirname(os.environ['ONNX_MODEL_PATH']); [onnx.numpy_helper.to_array(onnx.TensorProto.FromString(open(pb,'rb').read())).astype(np.float32).tofile(os.path.splitext(pb)[0]+'.raw') for pb in glob.glob(os.path.join(base,'test_data_set_*','input_0.pb'))]" Copy to clipboard - **Step 6.2:** Build `input_list.txt` $base = Split-Path $env:ONNX_MODEL_PATH Get-ChildItem -Path $base -Directory | ForEach-Object { "$base\$($_.Name)\input_0.raw" } | Set-Content "$base\input_list.txt" setenvvar QAIRT_INPUT_LIST "$base\input_list.txt" Copy to clipboard - **Step 7:** Convert the model to a DLC with `qairt-converter` & "${env:QAIRT_SDK_ROOT}\bin\x86_64-windows-msvc\qairt-converter" ` --input_network "${env:ONNX_MODEL_PATH}" ` -d "${env:ONNX_INPUT_NAME}" "${env:ONNX_INPUT_DIMENSIONS}" ` -l "${env:ONNX_INPUT_NAME}" NHWC ` --output_path "$([System.IO.Path]::ChangeExtension($env:ONNX_MODEL_PATH, '.dlc'))" Copy to clipboard - **Step 8:** Save model path setenvvar QAIRT_MODEL_PATH "$([System.IO.Path]::ChangeExtension($env:ONNX_MODEL_PATH, '.dlc'))" Copy to clipboard - **Option 2:** Build your own model or use a pre-built model (ex. Tensorflow, PyTorch) - **Step 1:** Enter the models directory cd "${env:QAIRT_SDK_ROOT}\examples\Models" Copy to clipboard - **Step 2:** Install dependencies for your framework. `qairt-converter` accepts ONNX, TensorFlow, TensorFlow Lite, and PyTorch directly — install whichever Python package matches your model file: pip install numpy pandas # then one or more of: pip install onnx onnxruntime pip install tensorflow==2.10.1 pip install tflite==2.3.0 pip install torch==1.13.1 torchvision==0.14.1 Copy to clipboard - **Step 3:** Place your model file (`.onnx`, `.pb`, `.tflite`, `.pt`) and any test data under `${env:QAIRT_SDK_ROOT}\examples\Models\`. - **Step 4:** Save model path setenvvar MODEL_PATH "${env:QAIRT_SDK_ROOT}\examples\Models\" Copy to clipboard - **Step 5:** Get model dimensions and input name. The way to identify these values varies from framework to framework. We recommend you ask an AI chat (like ChatGPT) to generate a small Python script for your specific framework, modeled on the ONNX example in **Option 1, Step 5.1**. - **Step 6:** Create `input_list.txt` (same structure as Option 1, Step 6). - **Step 7:** Convert with `qairt-converter` — it auto-detects the framework from the file extension. & "${env:QAIRT_SDK_ROOT}\bin\x86_64-windows-msvc\qairt-converter" ` --input_network "${env:MODEL_PATH}" ` -d "${env:INPUT_NAME}" "${env:INPUT_DIMENSIONS}" ` -l "${env:INPUT_NAME}" NHWC ` --output_path "$([System.IO.Path]::ChangeExtension($env:MODEL_PATH, '.dlc'))" Copy to clipboard - **Step 8:** Save model path setenvvar QAIRT_MODEL_PATH "$([System.IO.Path]::ChangeExtension($env:MODEL_PATH, '.dlc'))" Copy to clipboard ## Part 2: Build the QAIRT Sample App Now that our environment’s setup and we have a converted model, we’re ready to build the QAIRT Sample App. The app source ships with the SDK at `${env:QAIRT_SDK_ROOT}\examples\QAIRT\SampleApp\src`. - **Step 1:** Enter the Sample App source directory cd "${env:QAIRT_SDK_ROOT}\examples\QAIRT\SampleApp\src" Copy to clipboard - **Step 2:** Configure and build with CMake - **Sub-Option 1:** Windows x64 target (from the **x64** Native Tools developer shell) mkdir build -ErrorAction SilentlyContinue cd build cmake -G "Visual Studio 17 2022" -A x64 .. cmake --build . --config Release Copy to clipboard - **Sub-Option 2:** Windows ARM64 target (from the **ARM64** Native Tools developer shell) mkdir build -ErrorAction SilentlyContinue cd build cmake -G "Visual Studio 17 2022" -A ARM64 .. cmake --build . --config Release Copy to clipboard - **Step 3:** Verify the build Get-Item ".\Release\qairt-sample-app.exe" Copy to clipboard - **Step 4:** Stage the runtime DLLs next to the binary `qairt-sample-app.exe` loads QAIRT runtime libraries from the same directory it runs from. Copy them in once after every build: Copy-Item "${env:QAIRT_SDK_ROOT}\lib\${env:QAIRT_TARGET_ARCH_AND_OS}\*.dll" .\Release\ .\Release\qairt-sample-app.exe --help Copy to clipboard ## Part 3: Moving the app and binaries to the target device In this part we transfer files to the target device. Pick the section matching your target’s OS. - **Step 1:** Set target connection variables - **Option 1:** Windows target (over OpenSSH) On the **target** Windows device, install and start the OpenSSH Server (in an admin PowerShell): Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 Start-Service sshd Set-Service -Name sshd -StartupType 'Automatic' ipconfig Copy to clipboard On the **host**: setenvvar QAIRT_TARGET_ADDR "TARGET_IP_GOES_HERE" setenvvar QAIRT_TARGET_USER "TARGET_USER_GOES_HERE" setenvvar QAIRT_TARGET_DEST "C:/qairt_test_package" Copy to clipboard - **Option 2:** Android target (over adb) setenvvar QAIRT_TARGET_DEST "/data/local/tmp/qairt" Copy to clipboard - **Option 3:** Linux target (over OpenSSH) On the **host**: setenvvar QAIRT_TARGET_ADDR "TARGET_IP_GOES_HERE" setenvvar QAIRT_TARGET_USER "TARGET_USER_GOES_HERE" setenvvar QAIRT_TARGET_DEST "/tmp/qairt" Copy to clipboard - **Step 2:** Create a target `input_list` Rewrite each path so it points at where the inputs will live on the target. $base = Split-Path $env:QAIRT_INPUT_LIST Get-Content $env:QAIRT_INPUT_LIST | ForEach-Object { $parts = $_ -split '[\\/]' "$env:QAIRT_TARGET_DEST/$($parts[-2])/$($parts[-1])" } | Set-Content "$base\input_list_target.txt" Copy to clipboard - **Step 3:** Transfer files - **Option 1:** Windows target (scp) ssh "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}" "mkdir ${env:QAIRT_TARGET_DEST} -ErrorAction SilentlyContinue" scp "${env:QAIRT_SDK_ROOT}\examples\QAIRT\SampleApp\src\build\Release\qairt-sample-app.exe" ` "${env:QAIRT_SDK_ROOT}\lib\${env:QAIRT_TARGET_ARCH_AND_OS}\QairtCpu.dll" ` "${env:QAIRT_MODEL_PATH}" ` "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}:${env:QAIRT_TARGET_DEST}" scp -r "$(Split-Path $env:QAIRT_INPUT_LIST)\*" "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}:${env:QAIRT_TARGET_DEST}" Copy to clipboard For HTP on a Snapdragon target, also transfer `QairtHtp.dll` plus the per-Hexagon-version backend stub (`QnnHtpVStub.dll`) and the matching unsigned skel `.so` from `lib\hexagon-v\unsigned\`. - **Option 2:** Android target (adb) adb shell "mkdir -p ${env:QAIRT_TARGET_DEST}" adb push "${env:QAIRT_SDK_ROOT}\examples\QAIRT\SampleApp\src\build\Release\qairt-sample-app" "${env:QAIRT_TARGET_DEST}/" adb push "${env:QAIRT_SDK_ROOT}\lib\aarch64-android\libQairtCpu.so" "${env:QAIRT_TARGET_DEST}/" adb push "${env:QAIRT_MODEL_PATH}" "${env:QAIRT_TARGET_DEST}/" Get-ChildItem "$(Split-Path $env:QAIRT_INPUT_LIST)" | ForEach-Object { adb push $_.FullName "${env:QAIRT_TARGET_DEST}/" } Copy to clipboard - **Option 3:** Linux target (scp) ssh "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}" "mkdir -p ${env:QAIRT_TARGET_DEST}" scp "${env:QAIRT_SDK_ROOT}\examples\QAIRT\SampleApp\src\build\Release\qairt-sample-app" ` "${env:QAIRT_SDK_ROOT}\lib\${env:QAIRT_TARGET_ARCH_AND_OS}\libQairtCpu.so" ` "${env:QAIRT_MODEL_PATH}" ` "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}:${env:QAIRT_TARGET_DEST}" scp -r "$(Split-Path $env:QAIRT_INPUT_LIST)\*" "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}:${env:QAIRT_TARGET_DEST}" Copy to clipboard ## Part 4: Run the QAIRT Sample App At this stage we’ll run the app and generate an output. Below are 2 options: **Host** and **Target**. If you want to test your changes on your host machine, follow the “Host Machine” steps. If you want to run the sample app on your target device, follow the “On your Target Device” steps. The Sample App requires three arguments: `--backend` (path to a backend `.dll`/`.so`), `--input_dlc` (path to your converted DLC), and `--input_list` (path to your input-list file). - **Option 1:** On your Windows host (testing locally) Pick the backend you want to use: - **Sub-Option 1:** CPU cd "${env:QAIRT_SDK_ROOT}\examples\QAIRT\SampleApp\src\build\Release" .\qairt-sample-app.exe ` --backend ".\QairtCpu.dll" ` --input_dlc "${env:QAIRT_MODEL_PATH}" ` --input_list "${env:QAIRT_INPUT_LIST}" Copy to clipboard - **Sub-Option 2:** HTP Emulation (x86\_64 only) cd "${env:QAIRT_SDK_ROOT}\examples\QAIRT\SampleApp\src\build\Release" .\qairt-sample-app.exe ` --backend ".\QairtHtp.dll" ` --input_dlc "${env:QAIRT_MODEL_PATH}" ` --input_list "${env:QAIRT_INPUT_LIST}" Copy to clipboard - **Option 2:** On your target device - **Sub-Option 1:** Windows target (Snapdragon) ssh "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}" cd C:\qairt_test_package .\qairt-sample-app.exe ` --backend ".\QairtCpu.dll" ` --input_dlc ".\.dlc" ` --input_list ".\input_list_target.txt" Copy to clipboard For HTP on the target, also set: $env:ADSP_LIBRARY_PATH = "C:\qairt_test_package" Copy to clipboard - **Sub-Option 2:** Android target adb shell cd /data/local/tmp/qairt export LD_LIBRARY_PATH=/data/local/tmp/qairt export ADSP_LIBRARY_PATH=/data/local/tmp/qairt ./qairt-sample-app ` --backend ./libQairtCpu.so ` --input_dlc ./.dlc ` --input_list ./input_list_target.txt Copy to clipboard - **Sub-Option 3:** Linux target ssh "${env:QAIRT_TARGET_USER}@${env:QAIRT_TARGET_ADDR}" cd /tmp/qairt ./qairt-sample-app \ --backend ./libQairtCpu.so \ --input_dlc ./.dlc \ --input_list ./input_list_target.txt Copy to clipboard ## Conclusion With that, you have successfully ran the QAIRT Sample App on your target device from a Windows host! The next steps are to: 1. Inspect the source code for the Sample App in order to understand how it uses the QAIRT API to interact with your model. 2. Integrate similar logic into your on-target application to use your model. 1. You can also build off of the Sample App if you don’t have a pre-existing application. You will likely need to leverage the API section to look up what various functions do. ## Common Snags - `cl.exe` / `cmake` not found — you’re not in the developer shell from Step 3.1. Re-launch `vcvars64.bat` (or `vcvarsarm64.bat` for ARM64) and start PowerShell from inside that `cmd`. - `__FUNCSIG__` / `__PRETTY_FUNCTION__` static-assert at compile time (`Tags not found ... Update openTag/closeTag`) — you’re building with clang-cl. Drop `-T ClangCL` from CMake; use plain MSVC. - Missing DLL at runtime (`QairtHtp.dll`, etc.) — re-run the `Copy-Item` from Part 2 Step 4. - `--backend HTP` fails on a Snapdragon target — the device also needs `QnnHtpVStub.dll` and the matching unsigned skel `.so` from `lib\hexagon-v\unsigned\` deployed alongside the app. - `envcheck.ps1` reports VS Build Tools not installed when VS 2022 is present — `vswhere -latest` is returning VS 2026. Uninstall VS 2026 (or remove its install path from `vswhere`’s search path). Last Published: Aug 06, 2026 [Previous Topic Linux](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/tutorial_sample_app_linux.md) [Next Topic Migration Guide](https://docs.qualcomm.com/bundle/publicresource/80-63442-10/topics/migration-guide.md)