Skip to content

Commit 9630642

Browse files
committed
fix
1 parent 474187a commit 9630642

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

_unittests/ut_tasks/try_export.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ def test_qwen25_vli_visual(self):
7979
"float32": torch.float32,
8080
}[dtype]
8181
exporter = os.environ.get("EXPORTER", "custom")
82-
cut_ep = os.environ.get("CUT_EXPORTED_PROGRAM", None)
83-
if cut_ep is not None:
84-
cut_ep = cut_ep.split(",")
8582

8683
from transformers import AutoModel, AutoProcessor
8784
from onnx_diagnostic.torch_export_patches.patches._patch_transformers_qwen2_5 import (
@@ -205,7 +202,6 @@ def _config_reduction(config, task):
205202
target_opset=24 if attention == "LOOPA24" else 22,
206203
optimize=True,
207204
onnx_plugs=PLUGS,
208-
cut_ep=cut_ep,
209205
)
210206

211207
if not self.unit_test_going():

onnx_diagnostic/export/api.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ def to_onnx(
2121
use_control_flow_dispatcher: bool = False,
2222
onnx_plugs: Optional[List[EagerDirectReplacementWithOnnx]] = None,
2323
inline: bool = True,
24-
cut_ep: Optional[List[str]] = None,
2524
) -> Any:
2625
"""
2726
Common API for exporters. By default, the models are optimized to use the
@@ -47,8 +46,6 @@ def to_onnx(
4746
custom loops (see :func:`onnx_diagnostic.export.control_flow_onnx.loop_for_onnx`)
4847
:param onnx_plugs: the code was modified to replace some parts with onnx translation
4948
:param inline: inline local functions
50-
:param cut_ep: cut the exported program before exporting,
51-
this is used to investigate issues.
5249
:return: the output of the selected exporter, usually a structure including
5350
an onnx model
5451
@@ -143,7 +140,7 @@ def find_method(self, name: Any):
143140
dynamic_shapes=dynamic_shapes,
144141
large_model=True,
145142
output_dynamic_shapes=output_dynamic_shapes,
146-
export_options=ExportOptions(save_ep=save_ep, cut_ep=cut_ep),
143+
export_options=ExportOptions(save_ep=save_ep),
147144
options=options,
148145
inline=inline,
149146
dispatcher=main_dispatcher,
@@ -158,7 +155,6 @@ def find_method(self, name: Any):
158155
assert (
159156
not output_dynamic_shapes
160157
), f"output_dynamic_shapes not supported for exporter={exporter!r}"
161-
assert not cut_ep, f"cut_ep={cut_ep} not available with exporter={exporter!r}"
162158
custom_translation_table = {}
163159
if onnx_plugs:
164160
for plug in onnx_plugs:
@@ -222,7 +218,6 @@ def find_method(self, name: Any):
222218
f"Only a specified set of inputs is supported for exporter={exporter!r}, "
223219
f"but it is {list(kwargs)}" # type: ignore[arg-type]
224220
)
225-
assert not cut_ep, f"cut_ep={cut_ep} not available with exporter={exporter!r}"
226221
flat_inputs = flatten_object(kwargs, drop_keys=True)
227222
first = flat_inputs[0]
228223
first_float = [

0 commit comments

Comments
 (0)