Skip to content

MobiusBuilder: route OpenVINO EP to mobius openvino build#2553

Merged
justinchuby merged 2 commits into
mainfrom
feat/mobius-openvino-ep
Jul 2, 2026
Merged

MobiusBuilder: route OpenVINO EP to mobius openvino build#2553
justinchuby merged 2 commits into
mainfrom
feat/mobius-openvino-ep

Conversation

@justinchuby

@justinchuby justinchuby commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Maps OpenVINOExecutionProvider to the mobius openvino EP in EXECUTION_PROVIDER_TO_MOBIUS_EP (previously "default"), so the generated genai_config.json targets the OpenVINO EP with its provider options instead of emitting empty (CPU) provider options.

The OpenVINO graph is device-independent, so no device_type logic is needed in MobiusBuilder — mobius emits a default OpenVINO device_type, overridable downstream in genai_config.

Changes

  • olive/hardware/constants.py: EXECUTION_PROVIDER_TO_MOBIUS_EP[OpenVINOExecutionProvider] = "openvino".
  • Test for the mapping.

Requires the mobius openvino EP (onnxruntime/mobius#388).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates Olive’s MobiusBuilder integration so OpenVINO builds are correctly routed to mobius’s openvino EP and propagate the Olive accelerator device (npu/gpu/cpu) into OpenVINO’s device_type for ORT GenAI config generation, preventing unintended CPU execution.

Changes:

  • Map ExecutionProvider.OpenVINOExecutionProvider to mobius EP "openvino" (instead of "default").
  • Add OpenVINO EP enum value and pass device_type through MobiusBuilder’s genai_config generation path.
  • Add unit tests validating OpenVINO EP mapping and device_type propagation, and ensuring non-OpenVINO EPs pass device_type=None.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
olive/hardware/constants.py Updates EP→mobius EP mapping for OpenVINO to use "openvino".
olive/passes/onnx/mobius_model_builder.py Adds OpenVINO EP support and passes OpenVINO device_type into genai_config generation.
test/passes/onnx/test_mobius_model_builder.py Adds tests for OpenVINO EP mapping and device_type propagation behavior.

Comment thread olive/passes/onnx/mobius_model_builder.py Outdated
Comment thread olive/passes/onnx/mobius_model_builder.py Outdated
Comment thread olive/passes/onnx/mobius_model_builder.py Outdated
Map OpenVINOExecutionProvider to the mobius "openvino" EP (instead of the
generic "default" EP) so the generated genai_config targets the OpenVINO EP
with its provider options, rather than emitting empty (CPU) provider options.

The OpenVINO graph is device-independent, so no device_type plumbing is
needed here: mobius emits a default OpenVINO device_type, which can be
overridden downstream in genai_config if a non-default device is required.

Requires the mobius "openvino" EP (onnxruntime/mobius#388).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Justin Chu <11205048+justinchuby@users.noreply.github.com>
@justinchuby justinchuby force-pushed the feat/mobius-openvino-ep branch from c87eb1b to 0233fa6 Compare July 2, 2026 20:56
@justinchuby justinchuby enabled auto-merge (squash) July 2, 2026 21:00
@justinchuby justinchuby changed the title MobiusBuilder: route OpenVINO EP to mobius openvino build with device_type MobiusBuilder: route OpenVINO EP to mobius openvino build Jul 2, 2026
@xiaoyu-work

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@justinchuby justinchuby merged commit 1d5b84b into main Jul 2, 2026
12 checks passed
@justinchuby justinchuby deleted the feat/mobius-openvino-ep branch July 2, 2026 22:49
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.

3 participants