Skip to content

feat(install): auto-select OpenVINO for Intel CPU/iGPU/Arc; block openvino on macOS#117

Merged
TCVinNYC merged 1 commit into
mainfrom
feat/openvino-auto-select
Jun 25, 2026
Merged

feat(install): auto-select OpenVINO for Intel CPU/iGPU/Arc; block openvino on macOS#117
TCVinNYC merged 1 commit into
mainfrom
feat/openvino-auto-select

Conversation

@TCVinNYC

Copy link
Copy Markdown
Member

What / Why

Four Intel hardware targets (Arc GPU, Iris/UHD iGPU, Intel CPU-only — on Windows and Linux) previously received no OpenVINO auto-selection despite it being their best ONNX Runtime EP. Additionally, --accelerator openvino on macOS would hard-fail at pip install time with no clear error.

Changes:

  • has_intel_gpu — broadened from a bare "intel" substring to also match arc, iris, uhd, and 8086 (PCI vendor prefix), catching Arc/DG2/Alchemist lspci lines like "Intel Corporation DG2 [Arc A770]".
  • has_discrete_non_intel_gpu — new property for conservative CPU-only detection (NVIDIA or AMD/Radeon present → don't fall through to CPU probe).
  • _auto_accelerator priority order (first match wins):
    1. macOS → None (no openvino wheel; CoreML auto)
    2. NVIDIA present (any OS) → nvidia
    3. Intel GPU detected (Windows or Linux) → openvino
    4. Linux + Intel CPU (via /proc/cpuinfo) + no discrete GPU → openvino
    5. Windows (any remaining) → directml
    6. Everything else → None
  • _resolve_accelerator — raises ValueError("OpenVINO has no macOS wheel; use the default CoreML/CPU build …") on Darwin when --accelerator openvino is requested explicitly.

CI Safety

plan_install forces accelerator="cpu" when --ci is set (line: requested = "cpu" if ci and accelerator == "auto" else accelerator), so _auto_accelerator is never reached from CI. No change to that path.

Test plan

  • 29 tests in tests/test_install.py (22 new) covering: Arc/Iris/UHD/8086 detection, Intel CPU-only Linux probe, macOS openvino gate (auto + explicit), Windows priority (NVIDIA > Intel GPU > DirectML), has_intel_gpu positive/negative cases, CI hardware-independence
  • pytest tests/ -v --timeout=60 — 1288/1288 passed
  • ruff check — all checks passed
  • ruff format --check — 152 files already formatted
  • mypy autoptz/engine/runtime/ autoptz/config/ — no issues (11 source files)
  • python -m autoptz --selftest — all checks passed
  • python tools/install.py --dry-run — prints sane plan (base + CoreML note on Darwin)

🤖 Generated with Claude Code

…nvino on macOS

Broadens has_intel_gpu to match Arc/Iris/UHD brand tokens and the "8086"
PCI vendor string so DG2/Alchemist lspci lines are caught.  Adds
has_discrete_non_intel_gpu for conservative CPU-fallback detection.

_auto_accelerator now picks openvino for any Intel GPU on Windows or Linux
(priority: NVIDIA > Intel GPU > Intel CPU-only > DirectML > None), and
probes /proc/cpuinfo on Linux to catch Intel CPU-only boxes where OpenVINO
beats the stock CPU EP.  macOS is always exempted (no wheel exists).

_resolve_accelerator raises a clear ValueError with an actionable message
when --accelerator openvino is passed on Darwin.

CI safety: plan_install already forces accelerator="cpu" when --ci is set,
so _auto_accelerator is never reached from CI; unchanged.

Adds 22 new tests covering Arc/Iris/UHD detection, Intel CPU-only Linux,
macOS gate, Windows priority ordering, and has_intel_gpu positive/negative
cases.  1288/1288 tests pass; ruff/mypy/selftest/dry-run all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@TCVinNYC TCVinNYC merged commit 220bf1b into main Jun 25, 2026
3 checks passed
@TCVinNYC TCVinNYC deleted the feat/openvino-auto-select branch June 25, 2026 17:58
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