OVMobileBench supports three flexible modes for obtaining OpenVINO runtime, making it easy to integrate into different workflows.
The openvino section in your configuration file determines how the OpenVINO runtime is obtained:
openvino:
mode: build|install|link # Choose one of three modesBuild OpenVINO from source code with custom configurations.
- Need specific optimizations or features
- Testing unreleased versions
- Custom patches or modifications
- CI/CD pipeline with source control
openvino:
mode: "build"
source_dir: "/path/to/openvino" # Path to OpenVINO source
commit: "HEAD" # Git commit/tag/branch
build_type: "Release" # CMAKE_BUILD_TYPE
toolchain:
android_ndk: "/opt/android-ndk-r26d"
abi: "arm64-v8a"
api_level: 24
cmake: "cmake"
ninja: "ninja"
options:
ENABLE_INTEL_GPU: "OFF"
ENABLE_ONEDNN_FOR_ARM: "ON"
BUILD_SHARED_LIBS: "ON"openvino:
mode: "build"
source_dir: "${HOME}/openvino"
commit: "releases/2024/3"
build_type: "Release"
toolchain:
android_ndk: "${ANDROID_NDK_HOME}"
abi: "arm64-v8a"
api_level: 24
options:
ENABLE_INTEL_GPU: "OFF"
ENABLE_ONEDNN_FOR_ARM: "ON"
ENABLE_PYTHON: "OFF"openvino:
mode: "build"
source_dir: "/workspace/openvino"
commit: "master"
build_type: "RelWithDebInfo"
toolchain:
cmake: "/usr/bin/cmake"
ninja: "/usr/bin/ninja"
options:
ENABLE_ARM_COMPUTE: "ON"
CMAKE_CXX_FLAGS: "-march=armv8.2-a+fp16"Use a pre-built OpenVINO installation directory.
- Already have OpenVINO built
- Using official OpenVINO packages
- Faster iteration during development
- Consistent runtime across tests
openvino:
mode: "install"
install_dir: "/path/to/openvino/install" # Path to install directoryopenvino:
mode: "install"
install_dir: "/opt/intel/openvino_2024.3"openvino:
mode: "install"
install_dir: "${HOME}/builds/openvino-arm64/install"Download OpenVINO archives from a URL or automatically fetch the latest build.
- Quick setup without building
- Testing nightly builds
- CI/CD with ephemeral environments
- Cross-platform testing
openvino:
mode: "link"
archive_url: "URL or 'latest'" # Archive URL or "latest" keywordopenvino:
mode: "link"
archive_url: "https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/2025.4.0-19820-4671c012da0/openvino_toolkit_rhel8_2025.4.0.dev20250820_aarch64.tgz"openvino:
mode: "link"
archive_url: "latest" # Automatically selects for your platformWhen using archive_url: "latest", OVMobileBench automatically selects the appropriate build:
| Device Type | Platform | Selected Build |
|---|---|---|
| Android | Any | Linux ARM64 |
| Linux SSH | Linux ARM64 | RHEL8 ARM64 |
| Linux SSH | Linux x86_64 | Ubuntu 22 x86_64 |
| Host | macOS ARM64 | macOS ARM64 |
| Host | macOS x86_64 | macOS x86_64 |
| Host | Windows | Windows x86_64 |
Latest builds are fetched from:
https://storage.openvinotoolkit.org/repositories/openvino/packages/nightly/latest.json
Common archive patterns:
linux_aarch64- Linux ARM64 genericrhel8_aarch64- RHEL8 ARM64ubuntu22_x86_64- Ubuntu 22.04 x86_64macos_arm64- macOS Apple Siliconwindows_x86_64- Windows x86_64
| Feature | Build | Install | Link |
|---|---|---|---|
| Setup time | Slow (compile) | Fast | Medium (download) |
| Customization | Full | None | None |
| Storage space | Large | Medium | Medium |
| Network required | No* | No | Yes |
| Reproducibility | High | High | Medium |
| Version control | Git | Manual | URL-based |
*Except for initial clone
- Initial Development: Use Mode 2 (install) with a local build
- Testing Changes: Use Mode 1 (build) with specific commits
- CI/CD: Use Mode 3 (link) with "latest" or pinned URLs
# CI configuration for automated testing
openvino:
mode: "link"
archive_url: "latest" # Always test with latest build# Production configuration with pinned version
openvino:
mode: "link"
archive_url: "https://storage.openvinotoolkit.org/.../openvino_2024.3.0_aarch64.tgz"# Development configuration with local build
openvino:
mode: "install"
install_dir: "${HOME}/openvino-builds/current"Mode 3 (link) caches downloaded archives:
- Location:
artifacts/{run_id}/openvino_download/ - Archive:
openvino.tar.gz - Extracted:
openvino_download/
Mode 1 (build) uses CMake cache:
- Location:
artifacts/{run_id}/build/ - Incremental builds supported
-
Mode 1: Build fails
- Check toolchain paths
- Verify NDK version compatibility
- Review CMake options
-
Mode 2: Install directory not found
- Verify path exists
- Check for
benchmark_appin directory - Ensure correct architecture
-
Mode 3: Download fails
- Check network connectivity
- Verify URL is accessible
- Try specific URL instead of "latest"
OVMobileBench validates the configuration:
# Mode-specific validation
if mode == "build" and not source_dir:
raise ValueError("source_dir required for build mode")
elif mode == "install" and not install_dir:
raise ValueError("install_dir required for install mode")
elif mode == "link" and not archive_url:
raise ValueError("archive_url required for link mode")Old format (pre-1.0):
build:
openvino_repo: "/path/to/openvino"
enabled: trueNew format:
openvino:
mode: "build"
source_dir: "/path/to/openvino"To switch between modes, only change the mode field and corresponding options:
# From build mode
openvino:
mode: "build"
source_dir: "/workspace/openvino"
# To install mode
openvino:
mode: "install"
install_dir: "/workspace/openvino/install"
# To link mode
openvino:
mode: "link"
archive_url: "latest"project:
name: "android-benchmark"
run_id: "test-001"
openvino:
mode: "link"
archive_url: "latest"
device:
kind: "android"
serials: ["device1"]
push_dir: "/data/local/tmp/ovmobilebench"
models:
- name: "resnet50"
path: "models/resnet50.xml"
run:
matrix:
threads: [1, 2, 4]
report:
sinks:
- type: "json"
path: "results.json"project:
name: "rpi-benchmark"
run_id: "test-002"
openvino:
mode: "build"
source_dir: "${OPENVINO_ROOT}"
commit: "releases/2024/3"
build_type: "Release"
options:
ENABLE_ONEDNN_FOR_ARM: "ON"
device:
kind: "linux_ssh"
host: "192.168.1.100"
username: "pi"
push_dir: "/home/pi/benchmark"
models:
- name: "mobilenet"
path: "models/mobilenet.xml"
run:
matrix:
threads: [1, 4]
report:
sinks:
- type: "csv"
path: "results.csv"