Skip to content

Commit 45a9f11

Browse files
Update nncf.quantize
1 parent fc239a7 commit 45a9f11

File tree

14 files changed

+7865
-7657
lines changed

14 files changed

+7865
-7657
lines changed

nncf/experimental/torch/fx/quantization/quantize_model.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
import torch
1616
import torch.fx
17-
from torch.ao.quantization.pt2e.duplicate_dq_pass import DuplicateDQPass
1817
from torch.ao.quantization.pt2e.port_metadata_pass import PortNodeMetaForQDQ
1918
from torch.ao.quantization.pt2e.qat_utils import _fold_conv_bn_qat
2019
from torch.ao.quantization.pt2e.utils import _disallow_eval_train
@@ -27,6 +26,7 @@
2726
from nncf.common.quantization.structs import QuantizationPreset
2827
from nncf.data import Dataset
2928
from nncf.experimental.torch.fx.quantization.backend_parameters import is_weight_compression_needed
29+
from nncf.experimental.torch.fx.transformations import DuplicateDQPassNoAnnotations
3030
from nncf.experimental.torch.fx.transformations import apply_quantization_transformations
3131
from nncf.experimental.torch.fx.transformations import compress_post_quantize_transformation
3232
from nncf.experimental.torch.fx.transformations import fq_weights_transformation
@@ -102,7 +102,7 @@ def quantize_impl(
102102
quantized_model = GraphModule(quantized_model, quantized_model.graph)
103103

104104
quantized_model = _fold_conv_bn_qat(quantized_model)
105-
pm = PassManager([DuplicateDQPass()])
105+
pm = PassManager([DuplicateDQPassNoAnnotations()])
106106

107107
quantized_model = pm(quantized_model).graph_module
108108
pm = PassManager([PortNodeMetaForQDQ()])

tests/torch2/data/fx/dynamic_shapes/post_quantization_compressed/mobilenet_v3_small.dot

Lines changed: 1021 additions & 991 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/dynamic_shapes/post_quantization_compressed/resnet18.dot

Lines changed: 422 additions & 408 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/dynamic_shapes/post_quantization_compressed/unet.dot

Lines changed: 449 additions & 441 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/dynamic_shapes/quantized/mobilenet_v3_small.dot

Lines changed: 1089 additions & 1059 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/dynamic_shapes/quantized/resnet18.dot

Lines changed: 458 additions & 444 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/dynamic_shapes/quantized/unet.dot

Lines changed: 491 additions & 483 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/post_quantization_compressed/mobilenet_v3_small.dot

Lines changed: 1021 additions & 991 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/post_quantization_compressed/resnet18.dot

Lines changed: 422 additions & 408 deletions
Large diffs are not rendered by default.

tests/torch2/data/fx/post_quantization_compressed/unet.dot

Lines changed: 449 additions & 441 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)