File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,11 +70,10 @@ def annotate_custom(gm: torch.fx.GraphModule) -> None:
7070 This function is specific for custom op.
7171 The source_fn of the rewritten nn module turns out to be "my_ops.mul3.default"
7272 """
73- from executorch .backends .qualcomm .quantizer .annotators import _is_annotated
74-
7573 from executorch .backends .qualcomm .quantizer .qconfig import (
7674 get_ptq_per_channel_quant_config ,
7775 )
76+ from executorch .backends .qualcomm .quantizer .rules import _is_annotated
7877 from torch .fx import Node
7978 from torchao .quantization .pt2e .quantizer import QuantizationAnnotation
8079 from torchao .quantization .pt2e .quantizer .quantizer import Q_ANNOTATION_KEY
Original file line number Diff line number Diff line change 1212import numpy as np
1313import torch
1414
15- from executorch .backends .qualcomm .quantizer .annotators import (
16- QuantizationConfig ,
17- QuantizationSpec ,
18- )
1915from executorch .backends .qualcomm .quantizer .observers .per_channel_param_observer import (
2016 PerChannelParamObserver ,
2117)
2218from executorch .backends .qualcomm .quantizer .qconfig import (
2319 _derived_bias_quant_spec ,
2420 MovingAverageMinMaxObserver ,
21+ QuantizationConfig ,
2522)
2623
2724from executorch .backends .qualcomm .quantizer .quantizer import QuantDtype
4037 SimpleADB ,
4138 topk_accuracy ,
4239)
40+ from torchao .quantization .pt2e .quantizer import QuantizationSpec
4341
4442
4543def get_instance (repo_path : str , checkpoint_path : str ):
You can’t perform that action at this time.
0 commit comments