MobiusBuilder: route OpenVINO EP to mobius openvino build#2553
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.OpenVINOExecutionProviderto mobius EP"openvino"(instead of"default"). - Add OpenVINO EP enum value and pass
device_typethrough MobiusBuilder’s genai_config generation path. - Add unit tests validating OpenVINO EP mapping and
device_typepropagation, and ensuring non-OpenVINO EPs passdevice_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. |
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>
c87eb1b to
0233fa6
Compare
xiaoyu-work
approved these changes
Jul 2, 2026
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Maps
OpenVINOExecutionProviderto the mobiusopenvinoEP inEXECUTION_PROVIDER_TO_MOBIUS_EP(previously"default"), so the generatedgenai_config.jsontargets the OpenVINO EP with its provider options instead of emitting empty (CPU) provider options.The OpenVINO graph is device-independent, so no
device_typelogic is needed in MobiusBuilder — mobius emits a default OpenVINOdevice_type, overridable downstream in genai_config.Changes
olive/hardware/constants.py:EXECUTION_PROVIDER_TO_MOBIUS_EP[OpenVINOExecutionProvider] = "openvino".Requires the mobius
openvinoEP (onnxruntime/mobius#388).