xref: /aosp_15_r20/external/pytorch/torch/quantization/utils.py (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1*da0073e9SAndroid Build Coastguard Worker# flake8: noqa: F401
2*da0073e9SAndroid Build Coastguard Workerr"""
3*da0073e9SAndroid Build Coastguard WorkerUtils shared by different modes of quantization (eager/graph)
4*da0073e9SAndroid Build Coastguard Worker
5*da0073e9SAndroid Build Coastguard WorkerThis file is in the process of migration to `torch/ao/quantization`, and
6*da0073e9SAndroid Build Coastguard Workeris kept here for compatibility while the migration process is ongoing.
7*da0073e9SAndroid Build Coastguard WorkerIf you are adding a new entry/functionality, please, add it to the
8*da0073e9SAndroid Build Coastguard Worker`torch/ao/quantization/utils.py`, while adding an import statement
9*da0073e9SAndroid Build Coastguard Workerhere.
10*da0073e9SAndroid Build Coastguard Worker"""
11*da0073e9SAndroid Build Coastguard Worker
12*da0073e9SAndroid Build Coastguard Workerfrom torch.ao.quantization.utils import (
13*da0073e9SAndroid Build Coastguard Worker    activation_dtype,
14*da0073e9SAndroid Build Coastguard Worker    activation_is_int8_quantized,
15*da0073e9SAndroid Build Coastguard Worker    activation_is_statically_quantized,
16*da0073e9SAndroid Build Coastguard Worker    calculate_qmin_qmax,
17*da0073e9SAndroid Build Coastguard Worker    check_min_max_valid,
18*da0073e9SAndroid Build Coastguard Worker    get_combined_dict,
19*da0073e9SAndroid Build Coastguard Worker    get_qconfig_dtypes,
20*da0073e9SAndroid Build Coastguard Worker    get_qparam_dict,
21*da0073e9SAndroid Build Coastguard Worker    get_quant_type,
22*da0073e9SAndroid Build Coastguard Worker    get_swapped_custom_module_class,
23*da0073e9SAndroid Build Coastguard Worker    getattr_from_fqn,
24*da0073e9SAndroid Build Coastguard Worker    is_per_channel,
25*da0073e9SAndroid Build Coastguard Worker    is_per_tensor,
26*da0073e9SAndroid Build Coastguard Worker    weight_dtype,
27*da0073e9SAndroid Build Coastguard Worker    weight_is_quantized,
28*da0073e9SAndroid Build Coastguard Worker    weight_is_statically_quantized,
29*da0073e9SAndroid Build Coastguard Worker)
30