AidLite SDK Development Documents
CONTENTS
Introduction
AidLite SDK (also called AidSDK) is the AI inference SDK encapsulated by Aplux. It is aim to use a unified API to load and inference AI model for various mainstream AI frameworks, and to be able to schedule various computing units of the hardware (CPU, GPU, NPU). AidLux SDK is part of the AI tool chain in the AIoT field launched by Aplux Company.
The Aplux AI tool chain covers the entire inference part, as shown in the figure below:

Using Aplux AI tool chain can greatly reduce the development cycle in deploying AI models on edge devices.

AidLite works with AIMO (a model conversion platform), can help developers quickly migrate and deploy existing models to edge devices.
- AIMO online access link: AI Model Optimization Platform
AidLite SDK features are shown in the figure

OS Environmental Description
AidLite SDK support Android OS, Linux OS and AidLux OS.
AI runtime support
Qualcomm SNPE | Qualcomm QNN | TFLite | RKNN | |
---|---|---|---|---|
AidLux OS | β | β | β | β |
Linux OS | β | β | β | β |
Android OS | β | π§ | π§ | β |
β : Supported
π§: Supported in the next version
β: To be supported
AI Box support
Qualcomm SNPE1.61 | Qualcomm SNPE2.1x | Qualcomm QNN | RKNN | |
---|---|---|---|---|
QCS6490 | β | β | β | β |
QCS8250 | β | β | β | β |
QCS8550 | β | β | β | β |
RK3588 | β | β | β | β |
β : Supported
β: Unsupported
Installation
Installation for AidLux
- Install AidLite in APP store

the password is
aidlux
- Install AidLite in terminal
# password is aidlux
# aidlite c++ sdk
sudo aid-pkg -i aidlite-sdk
# aidlite python sdk
python3 -m pip install pyaidlite -i https://mirrors.aidlux.com --trusted-host mirrors.aidlux.com
Installation for Linux
The AidLite SDK is pre-install in AI Box Linux OS.
The update way show blow:
# password is aidlux
# aidlite c++ sdk
sudo aid-pkg -i aidlite-sdk
# aidlite python sdk
python3 -m pip install pyaidlite -i https://mirrors.aidlux.com --trusted-host mirrors.aidlux.com
Installation for Android
- Ensure compileSdk=30, minSdk=21, targetSdk=28 in the project build.gradle file
- Import SDK: Create a new libs folder under the main application app under the project view of android studio, and import AidliteSDK-release.aar and snpe-release.aar into libs
- Add dependencies: Add dependencies under the dependencies of build.gradle in the main application app directory
implementation fileTree(include: ['*.jar', "*.aar"], dir: 'libs')
implementation 'com.github.tiann:FreeReflection:3.1.0'
implementation 'com.elvishew:xlog:1.10.1'
implementation "com.blankj:utilcodex:1.30.6"
implementation 'net.java.dev.jna:jna:5.10.0'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation "com.squareup.okhttp3:logging-interceptor:4.9.0"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
- Add permissions and attribute configurations to the app/mainifests/AndroidManifest.xml file under the Android view
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
- Add packagingOptions in build.gradle file
packagingOptions {
doNotStrip "*/arm64-v8a/libsnpe_dsp_v68_domains_v3_skel.so"
doNotStrip "*/arm64-v8a/libsnpe_dsp_v66_domains_v2_skel.so"
doNotStrip "*/arm64-v8a/libsnpe_dsp_v65_domains_v2_skel.so"
doNotStrip "*/arm64-v8a/libsnpe_dsp_domains_v2.so"
doNotStrip "*/arm64-v8a/libsnpe_dsp_domains_v3.so"
doNotStrip "*/arm64-v8a/libSNPE.so"
doNotStrip "*/arm64-v8a/libsnpe-android.so"
}
Tutorial
AidLite SDK Demo in AidLux/Linux
- After installing AidLite SDK, the demo program will download automatically.
# Demo files path
/usr/local/share/aidlite/examples
- Use
ls
to show file structure
ls /usr/local/share/aidlite/examples
|__cpp
|__data
|__python
- Run demo
C++ demo
sudo apt update
sudo apt-get install cmake -y
# Our sample program in [/usr/local/share/aidlite/examples/] directory.
# We recommend that you copy the sample program directory to your own working directory.
mkdir -p /home/aidlux/your_work_dir/ && cp -r /usr/local/share/aidlite/examples/ /home/aidlux/your_work_dir/
cd /home/aidlux/your_work_dir/examples/cpp/
# If you do not want to copy the sample program, then next few steps require Sudo permissions
mkdir -p build && cd build
cmake ..
make
# Run the resulting executable program
./snpe2_yolov5_multi
Python demo
sudo cp -r /usr/local/share/aidlite/examples /home/aidlux/examples
cd /home/aidlux/
sudo chown -R aidlux:aidlux ~/examples
cd ~/examples/python
python3 snpe2_yolov5_multi.py
AidLite SDK Demo in Android
AidLite SDK provides a simple and runnable Android project demo, which includes three quantitative models:
- Unet (defect detection)
- ResNet18 (classification)
- YOLOv5s (target detection)
- CPU bind demo
Download Android project and run demo: