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