Skip to content

Commit 560c378

Browse files
justinchubyCopilot
andcommitted
Disable opset lowering by default
ORT now has kernel registrations for opset 24 standard ops, so the workaround of lowering the opset declaration to 23 is no longer needed by default. Users on older ORT builds can re-enable it with MOBIUS_ORT_LOWER_OPSET_FOR_EP=1. Co-authored-by: Copilot <[email protected]> Signed-off-by: Justin Chu <[email protected]>
1 parent e5eb966 commit 560c378

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎src/mobius/_flags.py‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ class _Flags:
8181
deduplication pass.
8282
* - ``ort_lower_opset_for_ep``
8383
- ``MOBIUS_ORT_LOWER_OPSET_FOR_EP``
84-
- ``True``
84+
- ``False``
8585
- Lower the ONNX opset declaration to 23 for non-CPU EPs
86-
(ORT ≤1.24.x workaround).
86+
(ORT ≤1.24.x workaround). Disabled by default.
8787
* - ``use_gqa_for_kv_shared``
8888
- ``MOBIUS_USE_GQA_FOR_KV_SHARED``
8989
- ``False``
@@ -125,16 +125,16 @@ class _Flags:
125125
"""
126126

127127
ort_lower_opset_for_ep: bool = dataclasses.field(
128-
default_factory=lambda: _env_bool("MOBIUS_ORT_LOWER_OPSET_FOR_EP", True)
128+
default_factory=lambda: _env_bool("MOBIUS_ORT_LOWER_OPSET_FOR_EP", False)
129129
)
130130
"""Lower the ONNX default-domain opset declaration to 23 when creating
131131
ORT sessions on non-CPU execution providers (CUDA, TRT, etc.).
132132
133-
ORT ≤1.24.x EPs don't register kernels for opset 24 standard ops
133+
ORT ≤1.24.x EPs didn't register kernels for opset 24 standard ops
134134
(Squeeze, Reshape, etc.) even though the semantics are unchanged.
135135
Lowering the import declaration lets the EP find its existing kernels.
136-
Set ``MOBIUS_ORT_LOWER_OPSET_FOR_EP=0`` to disable once ORT adds
137-
opset 24 kernel support.
136+
Set ``MOBIUS_ORT_LOWER_OPSET_FOR_EP=1`` to re-enable if running on
137+
an older ORT build without opset 24 kernel registration.
138138
"""
139139

140140

0 commit comments

Comments
 (0)