Skip to content

Commit

Permalink
Rename qnnpack quantizer to xnnpack quantizer
Browse files Browse the repository at this point in the history
Summary:
X-link: pytorch/pytorch#105551

att

Reviewed By: andrewor14

Differential Revision: D47422894

fbshipit-source-id: 937a8d9422b2e81b976c68fd3e2dd5d148799c3e
  • Loading branch information
jerryzh168 authored and facebook-github-bot committed Jul 20, 2023
1 parent 4266da0 commit 8adba12
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions backends/xnnpack/test/test_xnnpack_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
convert_pt2e,
get_symmetric_quantization_config,
prepare_pt2e,
QNNPackQuantizer,
XNNPACKQuantizer,
)

from torch.testing import FileCheck
Expand Down Expand Up @@ -307,7 +307,7 @@ def quantize_and_test_model_with_quantizer(
captured_program = exir.capture(module, example_inputs, config=capture_config)
m = captured_program.graph_module

quantizer = QNNPackQuantizer()
quantizer = XNNPACKQuantizer()
quantization_config = get_symmetric_quantization_config()
quantizer.set_global(quantization_config)
prepared = prepare_pt2e(m, quantizer)
Expand Down
10 changes: 5 additions & 5 deletions exir/tests/test_quantization.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
get_qnnpack_pt2e_backend_config,
)

from torch.ao.quantization.pt2e.quantizer import QNNPackQuantizer
from torch.ao.quantization.pt2e.quantizer.qnnpack_quantizer import (
from torch.ao.quantization.pt2e.quantizer import XNNPACKQuantizer
from torch.ao.quantization.pt2e.quantizer.xnnpack_quantizer import (
get_symmetric_quantization_config,
)
from torch.ao.quantization.quantize_fx import convert_to_reference_fx, prepare_fx
from torch.ao.quantization.quantize_pt2e import convert_pt2e, prepare_pt2e_quantizer
from torch.ao.quantization.quantize_pt2e import convert_pt2e, prepare_pt2e
from torch.testing import FileCheck
from torch.testing._internal.common_quantization import skipIfNoQNNPACK
from torch.testing._internal.common_quantized import override_quantized_engine
Expand Down Expand Up @@ -60,10 +60,10 @@ def test_resnet(self) -> None:
exir.EdgeCompileConfig(_check_ir_validity=False)
).graph_module

quantizer = QNNPackQuantizer()
quantizer = XNNPACKQuantizer()
operator_config = get_symmetric_quantization_config(is_per_channel=True)
quantizer.set_global(operator_config)
m = prepare_pt2e_quantizer(m, quantizer)
m = prepare_pt2e(m, quantizer)
self.assertEqual(
id(m.activation_post_process_3), id(m.activation_post_process_2)
)
Expand Down

0 comments on commit 8adba12

Please sign in to comment.