File tree Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Expand file tree Collapse file tree 2 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 13
13
import executorch .backends .cadence .aot .ops_registrations # noqa
14
14
import torch
15
15
from executorch .backends .cadence .aot .compiler_funcs import (
16
- convert as convert_fn ,
17
16
prepare as prepare_fn ,
18
17
trace as trace_fn ,
19
18
)
42
41
from executorch .exir .program ._program import to_edge
43
42
44
43
from torch .export .exported_program import ExportedProgram
44
+ from torchao .quantization .pt2e .quantize_pt2e import convert_pt2e
45
45
46
46
from .passes import apply_exir_ops_passes , apply_torch_ops_passes
47
47
@@ -139,7 +139,7 @@ def convert_pt2(
139
139
Returns a GraphModule with the converted model.
140
140
"""
141
141
142
- converted_model = convert_fn (graph_module )
142
+ converted_model = convert_pt2e (graph_module )
143
143
144
144
if dump_graphs :
145
145
logging .info ("Graph after convert:" )
Original file line number Diff line number Diff line change 11
11
12
12
import torch
13
13
from torch ._inductor .decomposition import remove_decompositions
14
- from torchao .quantization .pt2e .quantize_pt2e import (
15
- convert_pt2e ,
16
- prepare_pt2e ,
17
- prepare_qat_pt2e ,
18
- )
14
+ from torchao .quantization .pt2e .quantize_pt2e import prepare_pt2e , prepare_qat_pt2e
19
15
from torchao .quantization .pt2e .quantizer import Quantizer
20
16
21
17
@@ -56,8 +52,3 @@ def prepare(
56
52
prepared_model = prepare_pt2e (traced_model , quantizer )
57
53
58
54
return prepared_model
59
-
60
-
61
- def convert (prepared_model : torch .fx .GraphModule ) -> torch .fx .GraphModule :
62
- converted_model = convert_pt2e (prepared_model )
63
- return converted_model
You can’t perform that action at this time.
0 commit comments