@@ -55,12 +55,12 @@ def get_input_quantization_params(captured_model):
55
55
input_scales = {}
56
56
input_zeropoints = {}
57
57
input_names = []
58
- for node in captured_model .exported_program .graph .nodes :
58
+ for node in captured_model .exported_program () .graph .nodes :
59
59
if node .op == "placeholder" :
60
60
input_names .append (node .name )
61
61
continue
62
62
63
- for node in captured_model .exported_program .graph .nodes :
63
+ for node in captured_model .exported_program () .graph .nodes :
64
64
if (
65
65
node .target
66
66
== exir_ops .edge .quantized_decomposed .quantize_per_tensor .default
@@ -78,11 +78,11 @@ def get_output_quantization_param(captured_model):
78
78
output_scale = 0.0
79
79
output_zeropoint = 0
80
80
output_name = ""
81
- for node in captured_model .exported_program .graph .nodes :
81
+ for node in captured_model .exported_program () .graph .nodes :
82
82
if node .op == "output" :
83
83
output_name = node .args [0 ][0 ]
84
84
85
- for node in captured_model .exported_program .graph .nodes :
85
+ for node in captured_model .exported_program () .graph .nodes :
86
86
if (
87
87
node .target
88
88
== exir_ops .edge .quantized_decomposed .dequantize_per_tensor .default
@@ -172,7 +172,7 @@ def tosa_run_test(op, profile=TosaProfile.MI): # noqa: C901
172
172
173
173
# Export model
174
174
model_capture = export (model , inputs )
175
- model_edge = to_edge (model_capture , _EDGE_COMPILE_CONFIG )
175
+ model_edge = to_edge (model_capture , compile_config = _EDGE_COMPILE_CONFIG )
176
176
ArmPartitioner .compile_spec = compile_spec
177
177
178
178
if profile == TosaProfile .BI :
@@ -185,9 +185,8 @@ def tosa_run_test(op, profile=TosaProfile.MI): # noqa: C901
185
185
output_quantization_zp ,
186
186
) = get_output_quantization_param (model_edge )
187
187
188
- model_edge = model_edge .transform (DuplicateDequantNodePass ()).to_backend (
189
- ArmPartitioner
190
- )
188
+ model_edge = model_edge .transform ((DuplicateDequantNodePass (),))
189
+ model_edge = model_edge .to_backend (ArmPartitioner )
191
190
exec_prog = model_edge .to_executorch ()
192
191
193
192
# Save ground truth results to file
0 commit comments