File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 5353 no_outside_users ,
5454)
5555from torch import fx
56- from torch .ao .quantization .quantizer .utils import _annotate_output_qspec
5756from torchao .quantization .pt2e import (
5857 FakeQuantize ,
5958 FusedMovingAvgObsFakeQuantize ,
6261 MovingAverageMinMaxObserver ,
6362)
6463from torchao .quantization .pt2e .quantizer import (
64+ annotate_output_qspec ,
6565 ComposableQuantizer ,
6666 DerivedQuantizationSpec ,
6767 OperatorConfig ,
@@ -338,7 +338,7 @@ def _annotate_inputs(self, model: fx.GraphModule):
338338 continue
339339
340340 if node .op == "placeholder" and len (node .users ) > 0 :
341- _annotate_output_qspec (node , act_qspec (self .is_qat ))
341+ annotate_output_qspec (node , act_qspec (self .is_qat ))
342342 self ._mark_input_node_as_annotated (node )
343343
344344 def validate (self , model : torch .fx .GraphModule ) -> None :
Original file line number Diff line number Diff line change 1515import torch
1616from torch import fx
1717from torch ._ops import OpOverload
18- from torch .ao .quantization import move_exported_model_to_eval
1918from torch .export import ExportedProgram
2019from torch .fx .passes .utils .source_matcher_utils import (
2120 check_subgraphs_connected ,
2221 SourcePartition ,
2322)
24- from torchao .quantization .pt2e import ObserverOrFakeQuantize
23+ from torchao .quantization .pt2e import (
24+ move_exported_model_to_eval ,
25+ ObserverOrFakeQuantize ,
26+ )
2527from torchao .quantization .pt2e .quantize_pt2e import (
2628 convert_pt2e ,
2729 prepare_pt2e ,
You can’t perform that action at this time.
0 commit comments