Skip to content

feat(runtime-iree-android): IreeModuleRunner — a generic single-shot runner for batch modules - #513

Merged
michalharakal merged 2 commits into
developfrom
feature/iree-module-runner
Oct 21, 2026
Merged

michalharakal merged 2 commits into
developfrom
feature/iree-module-runner

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

A generic single-shot runner for one compiled IREE module: one float32 tensor in, one float32 tensor
out, weights from an optional .irpa (scope model). Two commits, rebased onto develop (post-0.62.2).

What it is

  • IreeModuleRunner (Kotlin) + libskainet_iree_module.so (arm64-v8a, armeabi-v7a; CPU
    local-task and Vulkan drivers): open a .vmfb (+ optional parameter archive), invoke one entry
    function, FloatTensor (data + shape) in/out.
  • For batch cartridges: the detection-yolov8-iree blueprint extracts the .so from this AAR
    (same pattern as Moonshine) and binds YoloV8Cartridge over the runner.
  • IreeModuleRunnerDeviceTest: an instrumentation check over served module cases (host serves the
    cases, adb reverse), exercising both drivers.

Verification

  • Unit tests 16/16 on the rebased branch.
  • First device run, Pixel 8a (Android 17): 4/4 cases green — tiny affine module exact on CPU and
    Vulkan; the YOLOv8n head 0/705,600 values outside rtol/atol 1e-2 vs ONNX Runtime
    (max|Δ| CPU 0.0018, Vulkan 0.0032); head p50 CPU 2000 ms, Vulkan 205 ms.
  • Downstream, through the blueprint's public API on the same device: both packs detect 4 person +
    1 bus with identical scores; app-level p50 269 ms (Vulkan) / 2205 ms (CPU).

🤖 Generated with Claude Code

michalharakal and others added 2 commits October 21, 2026 22:33
libskainet_iree_module.so (arm64-v8a, armeabi-v7a; local-task and vulkan)
runs one compiled module's function: one float32 tensor in, one out, with
weights optionally bound from an .irpa (scope "model") through io_parameters.
IreeModuleRunner and FloatTensor wrap it; nothing in it is model-specific.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
IreeModuleRunnerDeviceTest (connectedAndroidTest) fetches cases.json and its
files from the host over adb reverse, runs each case and compares it with the
reference (rtol/atol), logging max |delta| and p50/p95 latency. Skips when no
server is reachable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@michalharakal
michalharakal force-pushed the feature/iree-module-runner branch from 8407c2b to 2699285 Compare October 21, 2026 21:00
@michalharakal
michalharakal merged commit 22877a5 into develop Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant