Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions backends/nxp/quantizer/neutron_quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
no_outside_users,
)
from torch import fx
from torch.ao.quantization.quantizer.utils import _annotate_output_qspec
from torchao.quantization.pt2e import (
FakeQuantize,
FusedMovingAvgObsFakeQuantize,
Expand All @@ -62,6 +61,7 @@
MovingAverageMinMaxObserver,
)
from torchao.quantization.pt2e.quantizer import (
annotate_output_qspec,
ComposableQuantizer,
DerivedQuantizationSpec,
OperatorConfig,
Expand Down Expand Up @@ -338,7 +338,7 @@ def _annotate_inputs(self, model: fx.GraphModule):
continue

if node.op == "placeholder" and len(node.users) > 0:
_annotate_output_qspec(node, act_qspec(self.is_qat))
annotate_output_qspec(node, act_qspec(self.is_qat))
self._mark_input_node_as_annotated(node)

def validate(self, model: torch.fx.GraphModule) -> None:
Expand Down
6 changes: 4 additions & 2 deletions backends/nxp/quantizer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@
import torch
from torch import fx
from torch._ops import OpOverload
from torch.ao.quantization import move_exported_model_to_eval
from torch.export import ExportedProgram
from torch.fx.passes.utils.source_matcher_utils import (
check_subgraphs_connected,
SourcePartition,
)
from torchao.quantization.pt2e import ObserverOrFakeQuantize
from torchao.quantization.pt2e import (
move_exported_model_to_eval,
ObserverOrFakeQuantize,
)
from torchao.quantization.pt2e.quantize_pt2e import (
convert_pt2e,
prepare_pt2e,
Expand Down
Loading