Skip to main content

Prerequisites

  • Host OS: Ubuntu 22.04 LTS
If the host computer uses Windows or macOS, install a virtual machine. Subsequent steps must be run in the virtual machine running Ubuntu 22.04 LTS.
  1. Enable Wi-Fi and SSH on the device. The device requires an internet connection to download the artifacts needed to run sample applications. If SSH and Wi-Fi are already configured, skip this step. Follow Setup an SSH connection to enable Wi-Fi and SSH on the device.
  2. Sign in to the host computer:
    ssh root@<IP_ADDRESS>
    
  3. For the rest of the document, the QAIRT_ROOT environment variable represents the full path to the Qualcomm AI Runtime SDK root directory.
    • If installed using the direct download method, ${QAIRT_ROOT} is the path to the unzipped SDK.
      unzip v2.47.0.260601.zip
      
      cd qairt/2.47.0.260601 
      
      export QAIRT_ROOT=`pwd`
      
    • If installed using QPM, the SDK is installed under /opt/qcom/aistack/qairt/<version>
      export QAIRT_ROOT=/opt/qcom/aistack/qairt/2.47.0.260601/
      
  4. Python: v3.10 If Python is already installed, ensure that the environment path is updated with the Python 3.10 path. If Python 3.10 isn’t installed on your system, you may install it with the following commands:
    sudo apt-get update
    
    sudo apt-get install python3.10 python3-distutils libpython3.10
    
  5. System Dependencies:
    Run the following command as administrator/root to install the system libraries. The command takes time to fully complete.
    sudo bash ${QAIRT_ROOT}/bin/check-linux-dependency.sh
    
  6. Virtual environment (VENV)
    <venv_path> is the path for the new virtual environment.
    sudo apt-get install python3.10-venv 
    
    python3.10 -m venv "<venv_path>"
    
    source <venv_path>/bin/activate
    
  7. Run the following script to check and install missing dependencies:
    python3 -m pip install --upgrade pip
    
    ${QAIRT_ROOT}/bin/check-python-dependency
    
    Expected output:
    Summary: 
    
    Package              Recommended    Installed
    ~~~~~~~              ~~~~~~~~~~~    ~~~~~~~~~
    absl-py              2.1.0          2.1.0
    attrs                23.2.0         23.2.0 
    dash                 2.12.1         2.12.1
    decorator            4.4.2          4.4.2
    invoke               1.7.3          1.7.3
    joblib               1.4.0          1.4.0
    jsonschema           4.19.0         4.19.0
    Ixml                 5.2.1          5.2.1
    mako                 1.1.0          1.1.0
    matplotlib           3.3.4          3.3.4
    mock                 3.0.5          3.0.5
    numpy                1.26.4         1.26.4
    opencv-python        4.5.4.58       4.5.4.58
    optuna               3.3.0          3.3.0
    packaging            24.0           24.0
    pandas               2.0.1          2.0.1
    paramiko             3.4.0          3.4.0
    pathlib2             2.3.6          2.3.6
    pillow               10.2.0         10.2.0
    plotly               5.20.0         5.20.0
    protobuf             3.19.6         3.19.6
    psutil               5.6.4          5.6.4 
    pytest               8.1.1          8.1.1
    pyyaml               5.3            5.3 
    scikit-optimize      0.9.0          0.9.0
    scipy                1.10.1         1.10.1
    six                  1.16.0         1.16.0
    tabulate             0.9.0          0.9.0
    typing-extensions    4.10.0         4.10.0
    xlsxwriter           1.2.2          1.2.2
    

Setup ML Frameworks

To convert ML models trained on different frameworks into intermediate representations consumable by the Qualcomm AI Runtime SDK, you may need to download and install the corresponding frameworks on your host computer. This Qualcomm AI Runtime SDK release is verified to work with the following versions of the ML training frameworks:
FrameworkVersion
TensorFlow2.10.1
TFLite2.18.0
PyTorch2.4.1
ONNX1.19.1
  • Install TensorFlow
    pip install tensorflow==2.10.1
    
  • Install TFLite
    pip install tflite==2.18.0
    
  • Install PyTorch
    pip install torch==2.4.1 torchvision==0.19.1
    
  • Install ONNX
    pip install onnx==1.19.1 onnxruntime==1.23.2 onnxsim==0.6.2
    

Setup Qualcomm AI Runtime SDK environment

Source the environment setup script provided by Qualcomm AI Runtime SDK to ensure all necessary tools and libraries are available in $PATH for the workflow.
source ${QAIRT_ROOT}/bin/envsetup.sh