Add execution provider selection for builder capture - #2690
Merged
David Fan (jiafatom) merged 2 commits intoSep 26, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
FP16/BF16 CPU routing regression remains unresolved; MobiusBuilder GPU coverage is also requested.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes GPU routing for INT4 Model Builder and Mobius Builder exports.
Changes:
- Routes explicit GPU conversions through CUDA.
- Adds INT4 Model Builder GPU regression coverage.
| File | Description |
|---|---|
test/cli/test_cli.py |
Adds INT4 Model Builder GPU configuration coverage. |
olive/cli/capture_onnx.py |
Updates builder accelerator and execution-provider routing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
David Fan (jiafatom)
force-pushed
the
jiafa/fix-int4-model-builder-gpu-routing
branch
from
September 25, 2026 17:57
c69d496 to
399a0ab
Compare
David Fan (jiafatom)
force-pushed
the
jiafa/fix-int4-model-builder-gpu-routing
branch
from
September 25, 2026 18:05
399a0ab to
5b3f096
Compare
David Fan (jiafatom)
force-pushed
the
jiafa/fix-int4-model-builder-gpu-routing
branch
from
September 25, 2026 18:08
5b3f096 to
0b246ee
Compare
David Fan (jiafatom)
force-pushed
the
jiafa/fix-int4-model-builder-gpu-routing
branch
from
September 25, 2026 19:54
0b246ee to
05e19bb
Compare
David Fan (jiafatom)
enabled auto-merge (squash)
September 25, 2026 21:06
Xiaoyu Z (xiaoyu-work)
approved these changes
Sep 26, 2026
David Fan (jiafatom)
deleted the
jiafa/fix-int4-model-builder-gpu-routing
branch
September 26, 2026 18:30
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.

Summary
--execution_providertoolive capture-onnx-graphfor Model Builder and Mobius Builder exports--conversion_devicescoped to exporters that need a conversion host deviceWhy
Model Builder and Mobius Builder use the target execution provider to choose the generated graph format. In particular, a CUDA INT4 QMoE export uses CUDA-specific expert-weight layouts and FP16 I/O. The existing capture CLI derives that argument from Olive's target accelerator but cannot independently select a CUDA target for INT4.
This change uses Olive's existing host/target separation:
The export host uses the existing CPU default and does not need a GPU. The capture workflow does not run on or evaluate the target, so Olive skips the local supported-EP check, and ONNX Runtime GenAI CUDA weight prepacking has a CPU fallback.
--execution_providercurrently requires--use_model_builderor--use_mobius_builder.Testing
pytest test/cli/test_cli.py -k "capture_onnx_command_builder_execution_provider or capture_onnx_command_model_builder_accelerator or capture_onnx_command_use_mobius_builder or capture_onnx_command" -q(14 passed)ruff check olive/cli/capture_onnx.py test/cli/test_cli.pyruff format --check olive/cli/capture_onnx.py test/cli/test_cli.pyAll tests were run in the
jiafa-devcontainer.