Optimium Runtime
Supported Environments
Optimium Runtime supports Linux and Android OS with X64 and Arm64 architectures.
| OS \ Arch | i386 (x86) | x64 (x86-64, AMD64) | ARM(ARMv7) | ARM64(ARMv8) |
|---|---|---|---|---|
| Linux | ✅ | ✅ | ✅ | ✅ |
| Android | ✅ | ✅ | ✅ | ✅ |
| Windows | ✅ | ✅ | ❌ | ✅ |
| macOS | ❌ | ✅ | ❌ | ✅ |
Requirements
Linux
- Ubuntu 20.04 or above
- glibc: 2.31 or above
- libstdc++: 10 or above
- Python: 3.8 ~ 3.13 (Optimium Runtime for Python)
Not tested on non-debian based Linux distros.
Android
- Android API: 28 (Android 9) or above
Built with
minSdkVer == 28,compileSdkVer == 34andandroid-ndk-r28b.
Windows
- x86 or AMD64: Windows 10 version 1903 (Windows SDK 10.0.18362.0) or later
- ARM64: Windows 11 (Windows SDK 10.0.20348.0) or later
macOS
- macOS 14(Sonoma) or later
Components
Optimium Runtime is composed of various components. User can selectively install Optimium Runtime according to their applications, however, we strongly recommend installing all components by usingall.
Depending on the languages, some components may be inaccessible or have different names. Please check below installation guide for each language. Before that, available components are listed here ⬇️
| Components | Description |
|---|---|
all | Install every Optimium Runtime components |
bin | Install Optimium model executor and remote server. Required when using Remote optimization feature of Optimium |
dev | Install header files and development tools support files |
lib | Install core Optimium Runtime components |
native | Install Optimium Runtime extension for Native(CPU) devices. This extension is mandatory. |
xnnpack | Install Optimium Runtime extension for XNNPACK |
Install
Optimium Runtime provides bindings for various languages. You can choose according to your preference.
This document assumes that Optimium installation path is defined as
OPTIMIUM_SDK_ROOTenvironment variable.If you have not exported the variable, recommend to append
export OPTIMIUM_SDK_PATH=<your-install-path>in your.bashrcfile.In order to run the optimized model on your target device, you need to download a runtime on target device. Since the runtime is included inside Optimium SDK, we’ve created a folder named “(Optional) Resource limited target device” to prevent users from manually extracting runtime from Optimium SDK. When you use this archive which only contains Optimium Runtime rather than Optimium SDK, '$OPTIMIUM_SDK_ROOT' must be replaced to '$OPTIMIUM_RT_ROOT'.
The supported languages are listed below:
C++ with automated scripts (Host PC or "local")
1️⃣ To install Optimium Runtime, type command below.
$ cd Optimium_SDK/runtime
$ ./install_runtime.sh allinstall_runtime.sh will extract packages to $HOME/.local folder on your host device.
Additionally, You can install Optimium Runtime for other architectures to facilitate cross-compilation.
$ cd Optimium_SDK/runtime
$ ./install_runtime.sh --cross arm64-linux dev2️⃣ Configure your environment.
Configure your PATH environment variable to run Optimium Runtime properly.
export PATH="$PATH:$HOME/.local/bin"IMPORTANT! If you're using Android, please configure your environment using below.
export PATH="$PATH:/data/local/tmp/.local/bin"
export LD_LIBRARY_PATH="/data/local/tmp/.local/lib/aarch64-linux-android"C++ with automated scripts (target device or "remote")
1️⃣ To install Optimium Runtime, type command below.
$ cd Optimium_SDK/runtime
$ ./install_runtime.sh \
--remote your-account@your-device \
allinstall_runtime.sh will extract packages to $HOME/.local folder on your target device.
The script uses SSH and SCP to install Optimium Runtime on your target device and will ask for your SSH password if needed.
2️⃣ Configure your environment.
Configure your PATH environment variable to run Optimium Runtime properly.
export PATH="$PATH:$HOME/.local/bin"C++ with manual installation
1️⃣ Get Optimium Runtime.
If you want to get the runtime without using the automated installation script, you can note the archive that contains all components at $OPTIMIUM_SDK_DIR/runtime/cpp/archives/optimium-runtime-<version>-<arch>-<os>.tar.gz.
Copy it into your working directory.
cp Optimium_SDK/runtime/cpp/archives/optimium-runtime-<version>-<arch>-<os>.tar.gz optimium-runtime.tar.gz2️⃣ Unzip the archive.
You can install Optimium Runtime in any path you want. In this document, it is assumed that you install the runtime at $HOME/.local.
mkdir -p $HOME/.local
tar xzf optimium-runtime.tar.gz -C $HOME/.local3️⃣ Configure your environment.
Configure your PATH environment variable to run Optimium Runtime properly.
export PATH="$PATH:$HOME/.local/bin"Python
-
Install Optimium Runtime from the Optimium SDK distribution.
$ cd Optimium_SDK/ $ pip install -f "runtime/python" optimium-runtime -
Requirements:
- Python 3.8 or above
Updated about 1 month ago