@@ -673,9 +673,7 @@ def save_bpte_program(exec_prog, original_model: torch.nn.Module, output_name: s
673
673
save_bundled_program (exec_prog , method_test_suites , output_name )
674
674
675
675
676
- def quantize_model (
677
- exported_program , args , model : torch .nn .Module , example_inputs , compile_spec
678
- ):
676
+ def quantize_model (args , model : torch .nn .Module , example_inputs , compile_spec ):
679
677
model_int8 = quantize (
680
678
model ,
681
679
args .model_name ,
@@ -707,7 +705,7 @@ def to_edge_TOSA_delegate(
707
705
model_int8 = None
708
706
if args .quantize :
709
707
model_int8 , exported_program = quantize_model (
710
- exported_program , args , model , example_inputs , compile_spec
708
+ args , model , example_inputs , compile_spec
711
709
)
712
710
model = model_int8
713
711
@@ -743,7 +741,7 @@ def to_edge_no_delegate(exported_program, args, model: torch.nn.Module, example_
743
741
args .memory_mode ,
744
742
)
745
743
model , exported_program = quantize_model (
746
- exported_program , args , model , example_inputs , compile_spec
744
+ args , model , example_inputs , compile_spec
747
745
)
748
746
model_int8 = model
749
747
0 commit comments