Files
pytorch/torch/quantization/quantize_jit.py
Kimish Patel 9189edb3b3 [Quantization][Pytorch] On device quantization support part 1 (#83568)
Summary:
TO support on device quantization this diff introduces observer
insertion. Specifically observers are inserted by adding new method with
prefix observ_.

Intent is that post training, this method will be run to record
statistics

Test Plan:
test_ondevice_quantization.py

Reviewers:

Subscribers:

Tasks:

Tags:

Differential Revision: [D38771417](https://our.internmc.facebook.com/intern/diff/D38771417)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/83568
Approved by: https://github.com/jerryzh168
2022-08-29 17:22:30 +00:00

27 lines
713 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/quantization/quantize_jit.py`, while adding an import statement
here.
"""
from torch.ao.quantization.quantize_jit import (
_check_is_script_module,
_check_forward_method,
script_qconfig,
script_qconfig_dict,
fuse_conv_bn_jit,
_prepare_jit,
prepare_jit,
prepare_dynamic_jit,
_prepare_ondevice_dynamic_jit,
_convert_jit,
convert_jit,
convert_dynamic_jit,
_quantize_jit,
quantize_jit,
quantize_dynamic_jit
)