Skip to content

Commit 1d5b84b

Browse files
justinchubyCopilot
andauthored
MobiusBuilder: route OpenVINO EP to mobius openvino build with device_type (microsoft#2553)
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). Signed-off-by: Justin Chu <11205048+justinchuby@users.noreply.github.com> Co-authored-by: Justin Chu <11205048+justinchuby@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 94ccd02 commit 1d5b84b

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

olive/hardware/constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class ExecutionProvider(StrEnumBase):
4343
ExecutionProvider.DmlExecutionProvider: "webgpu",
4444
ExecutionProvider.MIGraphXExecutionProvider: "onnx-standard",
4545
ExecutionProvider.NvTensorRTRTXExecutionProvider: "trt-rtx",
46-
ExecutionProvider.OpenVINOExecutionProvider: "default",
46+
ExecutionProvider.OpenVINOExecutionProvider: "openvino",
4747
ExecutionProvider.QNNExecutionProvider: "onnx-standard",
4848
ExecutionProvider.ROCMExecutionProvider: "onnx-standard",
4949
ExecutionProvider.VitisAIExecutionProvider: "onnx-standard",

test/passes/onnx/test_mobius_model_builder.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,14 @@ def test_ep_map_covers_common_providers():
156156
assert MobiusBuilder.EP_MAP[ExecutionProvider.WebGpuExecutionProvider] == "webgpu"
157157

158158

159+
def test_openvino_ep_maps_to_openvino_mobius_ep():
160+
# OpenVINO routes to the mobius "openvino" EP (which emits the OpenVINO
161+
# provider options in genai_config); the graph itself is device-agnostic.
162+
from olive.hardware.constants import EXECUTION_PROVIDER_TO_MOBIUS_EP
163+
164+
assert EXECUTION_PROVIDER_TO_MOBIUS_EP[ExecutionProvider.OpenVINOExecutionProvider] == "openvino"
165+
166+
159167
# ---------------------------------------------------------------------------
160168
# Single-component model tests
161169
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)