Skip to content

Add mobius ep export support - #2644

Open
Xiaoyu (xiaoyu-work) wants to merge 4 commits into
mainfrom
feat/mobius-openvino-export
Open

Add mobius ep export support#2644
Xiaoyu (xiaoyu-work) wants to merge 4 commits into
mainfrom
feat/mobius-openvino-export

Conversation

@xiaoyu-work

Copy link
Copy Markdown
Collaborator

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

  • Added a new --execution_provider CLI argument to capture-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]
  • Updated the Mobius model builder pass to accept an optional execution_provider config parameter, which overrides the profile inferred from the accelerator. [1] [2]
  • Added and updated tests to verify correct handling of the execution_provider argument and config, including error cases and override behavior. [1] [2] [3]

OpenVINO extension registration

  • Refactored OpenVINO model handler and passes to use a new create_openvino_core utility, which ensures the _GroupQueryAttentionExtension is registered if available. This avoids code duplication and ensures consistent extension registration. [1] [2] [3] [4] [5] [6] [7] [8] [9]
  • Added unit tests for create_openvino_core to verify correct extension registration behavior.## Describe your changes

Checklist before requesting a review

  • Add unit tests for this change.
  • Make sure all tests can pass.
  • Update documents if necessary.
  • Lint and apply fixes to your code by running lintrunner -a
  • Is this a user-facing change? If yes, give a description of this change to be included in the release notes.

(Optional) Issue link

Copilot AI lite review requested due to automatic review settings September 1, 2026 01:46
@xiaoyu-work Xiaoyu (xiaoyu-work) changed the title Feat/mobius openvino export Add mobius openvino export Sep 1, 2026

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 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_provider to capture-onnx-graph (only valid with --use_mobius_builder) and plumbed it into the generated run config.
  • Updated MobiusBuilder pass config to accept an optional execution_provider override, 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.

@xiaoyu-work Xiaoyu (xiaoyu-work) changed the title Add mobius openvino export Add mobius ep export support Sep 1, 2026
@xiaoyu-work

Copy link
Copy Markdown
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>

Copilot AI commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Copilot resolve the merge conflicts in this pull request

Resolved in 8e80e3f — merged origin/main and fixed conflicts in mobius_model_builder.py and its test file, keeping both the execution_provider and text_only config options. Verified with the relevant tests and lintrunner.

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