3434)
3535from executorch .exir .passes import ToOutVarPass
3636from executorch .exir .passes .sym_shape_eval_pass import HintBasedSymShapeEvalPass
37- from executorch .exir .program ._program import to_edge_with_preserved_ops
37+ from executorch .exir .program ._program import to_edge
3838from torch ._inductor .decomposition import remove_decompositions
3939
4040from torch .export .exported_program import ExportedProgram
@@ -219,9 +219,9 @@ def quantize_pt2(
219219 torch .ops .aten .angle .default ,
220220 torch .ops .aten .rms_norm .default ,
221221]
222- TO_EDGE_PRESERVE_OPS : tuple [torch ._ops .OpOverload , ...] = (
222+ TO_EDGE_PRESERVE_OPS : list [torch ._ops .OpOverload , ...] = [
223223 torch .ops .aten .rms_norm .default ,
224- )
224+ ]
225225
226226
227227def _lower_ep_to_edge (
@@ -233,18 +233,18 @@ def _lower_ep_to_edge(
233233 """
234234 Lower an ExportedProgram to an EdgeProgramManager (in edge IR).
235235 """
236- # Call to_edge_with_preserved_ops to convert the graph to edge IR.
236+ # Call to_edge to convert the graph to edge IR.
237237 # Note: dim_order is skipped (https://github.com/pytorch/executorch/issues/3704)
238- edge_prog_manager = to_edge_with_preserved_ops (
238+ edge_prog_manager = to_edge (
239239 expo_program ,
240240 compile_config = EdgeCompileConfig (
241241 _skip_dim_order = True ,
242242 # Allow specific non-core aten ops in the IR.
243243 _core_aten_ops_exception_list = TO_EDGE_OP_EXCEPTION_LIST
244244 + (core_aten_exceptions or []),
245+ preserve_ops = TO_EDGE_PRESERVE_OPS ,
245246 ),
246247 constant_methods = constant_methods ,
247- preserve_ops = TO_EDGE_PRESERVE_OPS ,
248248 )
249249
250250 if dump_graphs :
0 commit comments