Skip to content

Add an opt-in Linux x64 OpenVINO sidecar - #263

Merged
leehack merged 8 commits into
mainfrom
openvino-261-sidecar
Dec 2, 2026
Merged

leehack merged 8 commits into
mainfrom
openvino-261-sidecar

Conversation

@leehack

@leehack leehack commented Dec 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #261. Ship OpenVINO as a separate Linux x64 asset and expose explicit probe and private registration in the owner C API. The release pairs it with the independently built Vulkan core. The loader checks the settings, plugin configuration, runtime origins, ggml binding and five build identity fields (owner, llama.cpp, ggml, patches, target) before initializing OpenVINO. Design: docs/openvino_sidecar.md.

Changelog

  • Add an opt-in Linux x64 OpenVINO sidecar and typed native device probe for experimental Intel NPU support. Applications that ship the sidecar must pass through its bundled licenses and notices.

Production-readiness scope

Completeness checklist

  • Owner API, separate release packaging, status documentation and qualification checklist.
  • Regression controls for settings, runtime origin, plugin layout and cross-row identity.
  • Hosted packaged pair at prior heads b2327071 (job) and f6a4c726 (job); re-running on merged head a000e2c5.
  • Independent high-risk review (clean at fee2fdc and b2327071; conflict-only delta check pending at a000e2c5).
  • Dart coverage inventory applies to the consumer follow-up.

PR type guidance

Native feature. The contract includes Linux x64 real-SDK tests, Windows typed refusal and independently built core/sidecar pairing.

Test Plan

  • Linux x64 contract, packaged Vulkan pair and release provenance checks.
  • Dart preparation, formatting, analysis, VM, Chrome and coverage are N/A for this owner-only change.

Matrix Evidence

Scope Evidence Result
Hosted owner build build-linux-openvino, Intel SDK 2026.4.1. Module 2,874,408 bytes, archive 11,973,317 bytes, DT_RPATH=$ORIGIN (no DT_RUNPATH), direct OpenVINO, oneTBB and OpenCL loader NEEDED, 7 libraries within the glibc 2.38 ceiling Passed at f6a4c726; re-running at a000e2c5
Hosted packaged pair openvino-sidecar-pair: independently built Vulkan core and OpenVINO archives, CPU decode through the private device, five identity refusals, identity controls and runtime-origin cases Passed at f6a4c726; re-running at a000e2c5
Hosted contract openvino-sidecar-contract, linux-artifact-contract (x64, arm64), wrapper-contract, release provenance Passed at b2327071 (wrapper-contract and verify also passed at f6a4c726); re-running at a000e2c5
Loader regression The earlier owner API returned NO_DEVICE on a foreign runtime preload. The origin guard returns FOREIGN_RUNTIME on the same fixture. Red then green locally
CTest (OpenVINO) 52 cases: CPU placement and decode, private registry, checked origin, plugin list refusals (including a same-length rewrite), identity controls, live-context exit Passed locally at a000e2c5 (52/52; sidecar validator PASS; also passed at f6a4c726 and b2327071 after mutation runs)
CTest (Hexagon + OpenVINO + grammar shortlist) 4 llamadart_hexagon_startup_* cases + llamadart_openvino_identity_test + llamadart_grammar_top_k_make-model + llamadart_grammar_top_k_test + llamadart_grammar_top_k_p_test (wrapper-contract Linux x64 GCC Debug, plus grammar boundary and 126-symbol export check) Passed locally at a000e2c5 (8/8)
Python and provenance 548 test_*.py tooling tests (one platform skip), 23 *_test.py tests, and release provenance verifier Passed locally at a000e2c5
Windows refusal Hosted MSVC check at b2327071 Passed at b2327071; re-running at a000e2c5
Intel NPU, Flutter and Dart artifact layout Lunar Lake, Panther Lake and downstream consumer builds Qualification pending

Mutation controls

26 mutations, each caught; the 52 cases passed again after restoring the source. Runners: loader mutations and ELF mutations (kept outside the repo as local evidence).

Mutation Result
Remove the environment settings gate 4 red
Remove the NPU device check 1 red (child aborts)
Register the backend in the public ggml registry (contaminates the default registry) 2 red
Bypass the pre-load origin layer 4 red
Bypass the post-load origin layer 3 red
Compare runtime version only 4 red
Skip the resolved-directory check of the runtime 3 red
Compare unresolved instead of canonical sidecar directory 1 red
Refuse only when the runtime is already loaded elsewhere 1 red
Drop the runtime-address anchor / the ggml-instance anchor 1 red each
Skip the plugin list validation 3 red
Skip the openvino-* plugin directory refusal 1 red
Follow file symlinks for the module and CPU plugin 2 red
Remove the final scan 1 red
Skip the identity field check (allow every field) 5 red
Whole-string identity comparison (strcmp of the full build identity) 4 red (identity-config, -compiler, -backends, -options)
Drop the patches field 1 red
Compare plugins.xml by length only (audit N1) 1 red (plugin-list-mismatch-same-length)
Drop the backend term from the layout comparator (audit N3) 1 red (identity_test)
Swap the NPU diagnosis rule 1 red
ELF: generic module name, missing plugins.xml, missing DT_RPATH, DT_RUNPATH in place of DT_RPATH, no direct oneTBB NEEDED 5 fail the static or pair validator

The whole-string mutation was run against the local contract build; the hosted pair job was not run against it. Same-tree contract cases stay green under that mutation, so the pair job's independently built core and sidecar remain the intended hosted control.

Review Notes

  • Maintainer decisions (approved 2026-12-01). (a) The sidecar ships the Intel SDK's oneTBB binary under Apache-2.0 with its notices, copied verbatim with the SDK licensing tree. (b) Native releases depend on the Intel SDK download host (storage.openvinotoolkit.org) and on the openvino-sidecar-pair job, which package-and-release requires. Recorded in docs/openvino_sidecar.md.
  • Use the Khronos OpenCL C++ headers v2025.07.22 with the vendored C headers. Ubuntu 24.04's C++ header package still references extension constants removed by those C headers.
  • The optional Intel CPU plugin must also be a regular file. A symlink would move plugin resolution outside the vetted directory.
  • The build copies the module only from the current CMake output and stages it outside the core output directory. The SDK patch-release URL was verified against the pinned bytes. Intel archive instructions
  • Removing the direct oneTBB NEEDED entry fails static validation. With DT_RPATH, the runtime still resolves oneTBB transitively, as expected.

Community NPU qualification (not run here)

Full procedure: docs/openvino_sidecar.md. Required on both Lunar Lake and Panther Lake:

  • AMD XDNA or another non-Intel /dev/accel host: record the result of an NPU request (the diagnosis can return MISSING_DRIVER or DEVICE_ACCESS_DENIED instead of NO_DEVICE).
  • Enumeration with kernel driver absent, /dev/accel denied, Level Zero loader absent, and a working setup.
  • Actual NPU placement, decoded output against upstream llama-cli, cold and warm cache, clean exit with a live context.
  • LD_DEBUG=files: does an Intel NPU driver map its own libopenvino* object? If so the probe returns FOREIGN_RUNTIME on a working machine (design I7, unverified).
  • Gated DeltaNet model with the in-plugin compiler required.
  • Consumer builds (Add opt-in OpenVINO NPU backend for llama.cpp on Linux and Windows x64 llamadart#2554): do flutter build linux and dart build keep DT_RPATH=$ORIGIN, unchanged plugins.xml and a flat directory of regular files (readelf -d)?

High-risk regression review

  • Classification: High risk. Native loader/FFI and release automation, with regression policy checks.
  • Implementation task: Add opt-in OpenVINO sidecars for Linux and Windows x64 #261.
  • Independent blocking QA task: Clean at fee2fdc and delta-clean at b2327071 (delta-audit-263-b2327070.md); conflict-only delta check pending at a000e2c5 (merge-only sync with origin/main f914d88e, resolving only .github/workflows/validate_wrapper.yml and tests/test_validate_exports.py as the exact union, 126 exports).
  • Exact head / current base: a000e2c52358b77762118a01d0d4629c80aeaf00 / f914d88e3a38fd53e94a9f0da13f4aca796bcade.
  • Bypass proof: The foreign runtime fixture refuses before load. Disabling both early origin checks lets the canaries run, and the final scan still refuses the foreign runtime.
  • Affected-family evidence: Pinned real Intel SDK and a small GGUF using the CPU overlay. Intel NPU driver-side runtime mapping and consumer DT_RPATH preservation remain unverified.
  • Known PR-caused P1 regressions / unresolved review threads: Pending conflict-only delta QA on a000e2c5.

@leehack
leehack marked this pull request as ready for review December 2, 2026 02:29
@leehack
leehack merged commit 67cef25 into main Dec 2, 2026
33 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.

Add opt-in OpenVINO sidecars for Linux and Windows x64

1 participant