mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/64817 This migrates `torch.quantization._numeric_suite` to `torch.ao.ns._numeric_suite`, and `torch.quantization._numeric_suite_fx` to `torch.ao.ns._numeric_suite_fx`. 1. move the files ``` HG: move eager mode hg mv caffe2/torch/quantization/_numeric_suite.py caffe2/torch/ao/ns/ HG: move fx hg mv caffe2/torch/quantization/_numeric_suite_fx.py caffe2/torch/ao/ns/ hg mv caffe2/torch/quantization/ns/* caffe2/torch/ao/ns/fx/ ``` 2. create new versions of `_numeric_suite.py` and `_numeric_suite_fx.py` with imports 3. update all FB callsites Test Plan: buck test mode/dev //caffe2/test:quantization Reviewed By: z-a-f Differential Revision: D30867538 fbshipit-source-id: 120ee830434ca490c1183a187a518eebcbbaf22c
29 lines
779 B
Python
29 lines
779 B
Python
# flake8: noqa: F401
|
|
r"""
|
|
This file is in the process of migration to `torch/ao/quantization`, and
|
|
is kept here for compatibility while the migration process is ongoing.
|
|
If you are adding a new entry/functionality, please, add it to the
|
|
`torch/ao/ns/_numeric_suite.py`, while adding an import statement
|
|
here.
|
|
"""
|
|
|
|
from torch.ao.ns._numeric_suite import (
|
|
NON_LEAF_MODULE_TO_ADD_OBSERVER_ALLOW_LIST,
|
|
_find_match,
|
|
compare_weights,
|
|
_get_logger_dict_helper,
|
|
get_logger_dict,
|
|
Logger,
|
|
ShadowLogger,
|
|
OutputLogger,
|
|
_convert_tuple_to_list,
|
|
_dequantize_tensor_list,
|
|
Shadow,
|
|
prepare_model_with_stubs,
|
|
_is_identical_module_type,
|
|
compare_model_stub,
|
|
get_matching_activations,
|
|
prepare_model_outputs,
|
|
compare_model_outputs,
|
|
)
|