@@ -86,7 +86,6 @@ def preprocess(
86
86
edge_program : ExportedProgram ,
87
87
compile_specs : List [CompileSpec ],
88
88
) -> PreprocessResult :
89
- ep = copy .deepcopy (edge_program )
90
89
# Need to wrap EP here because xnnpack does addmm to linear
91
90
# transforms. This makes resulting graph not aten compliant
92
91
# as aten.linear is not a core aten op.
@@ -97,17 +96,17 @@ def preprocess(
97
96
# EdgeDialectVerifier, but disable it.
98
97
# TODO (task link) to implement NullVerifier or something similar
99
98
ep = ExportedProgram (
100
- root = ep .graph_module ,
101
- graph = ep .graph ,
102
- graph_signature = ep .graph_signature ,
103
- state_dict = ep .state_dict ,
104
- range_constraints = ep .range_constraints ,
105
- module_call_graph = copy . deepcopy ( ep . module_call_graph ) ,
106
- example_inputs = ep .example_inputs ,
99
+ root = edge_program .graph_module ,
100
+ graph = edge_program .graph ,
101
+ graph_signature = edge_program .graph_signature ,
102
+ state_dict = edge_program .state_dict ,
103
+ range_constraints = edge_program .range_constraints ,
104
+ module_call_graph = edge_program . module_call_graph ,
105
+ example_inputs = edge_program .example_inputs ,
107
106
verifier = EXIREdgeDialectVerifier (
108
107
check_edge_ops = False , enable = False , class_only = True
109
108
),
110
- constants = ep .constants ,
109
+ constants = edge_program .constants ,
111
110
)
112
111
113
112
passes = []
0 commit comments