Add mobius ep export support - #2644
Open
Xiaoyu (xiaoyu-work) wants to merge 4 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR extends Olive’s MobiusBuilder export flow to allow explicitly selecting a Mobius execution provider profile (e.g., "openvino") and centralizes OpenVINO Core creation so required extensions are consistently registered across the OpenVINO model handler and related passes.
Changes:
- Added
--execution_providertocapture-onnx-graph(only valid with--use_mobius_builder) and plumbed it into the generated run config. - Updated
MobiusBuilderpass config to accept an optionalexecution_provideroverride, taking precedence over the accelerator-inferred profile. - Introduced
create_openvino_core()and refactored OpenVINO handler/passes to use it; added unit tests for both features.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
olive/cli/capture_onnx.py |
Adds CLI arg and config wiring for Mobius execution provider profile override. |
olive/passes/onnx/mobius_model_builder.py |
Adds optional execution_provider pass config and override logic for mobius build. |
olive/model/handler/openvino.py |
Introduces create_openvino_core() and reuses it for model load/session preparation. |
olive/passes/openvino/compression.py |
Switches OpenVINO Core creation to create_openvino_core() for consistent extension registration. |
olive/passes/openvino/encapsulation.py |
Switches OpenVINO Core creation to create_openvino_core(). |
olive/passes/openvino/io_update.py |
Switches OpenVINO Core creation to create_openvino_core(). |
test/cli/test_cli.py |
Adds CLI tests for --execution_provider behavior (valid with mobius builder, rejected otherwise). |
test/passes/onnx/test_mobius_model_builder.py |
Adds/updates tests for default config and execution provider override behavior. |
test/model/test_openvino_model.py |
Adds unit tests validating extension registration behavior in create_openvino_core(). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
Author
|
Copilot resolve the merge conflicts in this pull request |
…export # Conflicts: # olive/passes/onnx/mobius_model_builder.py # test/passes/onnx/test_mobius_model_builder.py Co-authored-by: xiaoyu-work <85524621+xiaoyu-work@users.noreply.github.com>
Contributor
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.
This pull request introduces support for specifying a Mobius execution provider profile (such as 'openvino') when using the Mobius model builder, and refactors OpenVINO model handling to consistently register necessary extensions. It also adds tests to ensure the correct behavior of these features.
Mobius execution provider support
--execution_providerCLI argument tocapture-onnx-graph, allowing users to specify a Mobius execution provider profile when using--use_mobius_builder. The option is validated to ensure it's only used with Mobius builder. [1] [2]execution_providerconfig parameter, which overrides the profile inferred from the accelerator. [1] [2]execution_providerargument and config, including error cases and override behavior. [1] [2] [3]OpenVINO extension registration
create_openvino_coreutility, which ensures the_GroupQueryAttentionExtensionis registered if available. This avoids code duplication and ensures consistent extension registration. [1] [2] [3] [4] [5] [6] [7] [8] [9]create_openvino_coreto verify correct extension registration behavior.## Describe your changesChecklist before requesting a review
lintrunner -a(Optional) Issue link