@@ -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