File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
torchao/quantization/pt2e Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 25
25
_fuse_conv_bn_ ,
26
26
_get_node_name_to_scope ,
27
27
)
28
+ from typing import Union
28
29
29
30
from .convert import _convert_to_reference_decomposed_fx
30
31
from .prepare import prepare
39
40
40
41
def prepare_pt2e (
41
42
model : GraphModule ,
42
- quantizer : Quantizer ,
43
+ quantizer : Union [ Quantizer , torch . ao . quantization . quantizer . quantizer . Quantizer ] ,
43
44
) -> GraphModule :
44
45
"""Prepare a model for post training quantization
45
46
@@ -127,7 +128,7 @@ def calibrate(model, data_loader):
127
128
128
129
def prepare_qat_pt2e (
129
130
model : GraphModule ,
130
- quantizer : Quantizer ,
131
+ quantizer : Union [ Quantizer , torch . ao . quantization . quantizer . quantizer . Quantizer ] ,
131
132
) -> GraphModule :
132
133
"""Prepare a model for quantization aware training
133
134
You can’t perform that action at this time.
0 commit comments