File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ def convert_pt2(
144144# It is however useful for unit tests to separate the converted model from the
145145# fused model, to be able to get reference numerics.
146146# If this does not apply, please use quantize_pt2 instead.
147- def fuse_pt2 (
147+ def apply_pre_edge_transform_passes (
148148 converted_program : ExportedProgram ,
149149 quantizer : CadenceQuantizer ,
150150) -> ExportedProgram :
@@ -229,7 +229,7 @@ def quantize_pt2(
229229
230230 # Apply quant fusion to the exported program
231231 program = torch .export .export (converted_gm , inputs , strict = True )
232- fused_program = fuse_pt2 (program , quantizer )
232+ fused_program = apply_pre_edge_transform_passes (program , quantizer )
233233
234234 if dump_graphs :
235235 logging .info ("Graph after quantization and fusion:" )
Original file line number Diff line number Diff line change 1818
1919from executorch .backends .cadence .aot .compiler import (
2020 _lower_ep_to_cadence_gen_etrecord ,
21+ apply_pre_edge_transform_passes ,
2122 convert_pt2 ,
22- fuse_pt2 ,
2323 prepare_pt2 ,
2424)
2525
@@ -66,7 +66,7 @@ def export_model(
6666 ep = torch .export .export (converted_model , example_inputs , strict = True )
6767
6868 # Fuse the quantized patterns on the exported program (note: quantizer needs to be the same as the one used in prepare_and_convert_pt2)
69- ep = fuse_pt2 (ep , quantizer )
69+ ep = apply_pre_edge_transform_passes (ep , quantizer )
7070
7171 # Get edge program after Cadence specific passes
7272 exec_prog : ExecutorchProgramManager = _lower_ep_to_cadence_gen_etrecord (
You can’t perform that action at this time.
0 commit comments