Quantization

若API未标明支持情况,则代表该API的支持情况待验证。

API名称

是否支持

限制与说明

torch.quantization.quantize

     

torch.quantization.quantize_dynamic

     

torch.quantization.quantize_qat

     

torch.quantization.prepare

     

torch.quantization.prepare_qat

     

torch.quantization.convert

     

torch.quantization.fuse_modules

     

torch.quantization.QuantStub

     

torch.quantization.DeQuantStub

     

torch.quantization.QuantWrapper

     

torch.quantization.add_quant_dequant

     

torch.quantization.add_observer_

     

torch.quantization.swap_module

     

torch.quantization.propagate_qconfig_

     

torch.quantization.default_eval_fn

     

torch.quantization.get_observer_dict

     

torch.quantization.quantize_fx.prepare_fx

     

torch.quantization.quantize_fx.prepare_qat_fx

     

torch.quantization.quantize_fx.convert_fx

     

torch.quantization.quantize_fx.fuse_fx

     

torch.quantization.observer.ObserverBase

     

torch.quantization.observer.ObserverBase.with_args

     

torch.quantization.observer.ObserverBase.with_callable_args

     

torch.quantization.observer.MinMaxObserver

     

torch.quantization.observer.MinMaxObserver.calculate_qparams

     

torch.quantization.observer.MinMaxObserver.forward

     

torch.quantization.observer.MinMaxObserver.reset_min_max_vals

     

torch.quantization.observer.MovingAverageMinMaxObserver

     

torch.quantization.observer.PerChannelMinMaxObserver

     

torch.quantization.observer.PerChannelMinMaxObserver.reset_min_max_vals

     

torch.quantization.observer.MovingAveragePerChannelMinMaxObserver

     

torch.quantization.observer.HistogramObserver

     

torch.quantization.observer.PlaceholderObserver

     

torch.quantization.observer.RecordingObserver

     

torch.quantization.observer.NoopObserver

     

torch.quantization.observer.get_observer_state_dict

     

torch.quantization.observer.load_observer_state_dict

     

torch.quantization.observer.default_observer

     

torch.quantization.observer.default_placeholder_observer

     

torch.quantization.observer.default_debug_observer

     

torch.quantization.observer.default_weight_observer

     

torch.quantization.observer.default_histogram_observer

     

torch.quantization.observer.default_per_channel_weight_observer

     

torch.quantization.observer.default_dynamic_quant_observer

     

torch.quantization.observer.default_float_qparams_observer

     

torch.quantization.fake_quantize.FakeQuantizeBase

     

torch.quantization.fake_quantize.FakeQuantizeBase.with_args

     

torch.quantization.fake_quantize.FakeQuantize

     

torch.quantization.fake_quantize.FixedQParamsFakeQuantize

     

torch.quantization.fake_quantize.FusedMovingAvgObsFakeQuantize

     

torch.quantization.fake_quantize.default_fake_quant

     

torch.quantization.fake_quantize.default_weight_fake_quant

     

torch.quantization.fake_quantize.default_per_channel_weight_fake_quant

     

torch.quantization.fake_quantize.default_histogram_fake_quant

     

torch.quantization.fake_quantize.default_fused_act_fake_quant

     

torch.quantization.fake_quantize.default_fused_wt_fake_quant

     

torch.quantization.fake_quantize.default_fused_per_channel_wt_fake_quant

     

torch.quantization.fake_quantize.disable_fake_quant

     

torch.quantization.fake_quantize.enable_fake_quant

     

torch.quantization.fake_quantize.disable_observer

     

torch.quantization.fake_quantize.enable_observer

     

torch.quantization.qconfig.QConfig

     

torch.quantization.qconfig.default_qconfig

     

torch.quantization.qconfig.default_debug_qconfig

     

torch.quantization.qconfig.default_per_channel_qconfig

     

torch.quantization.qconfig.default_dynamic_qconfig

     

torch.quantization.qconfig.float16_dynamic_qconfig

     

torch.quantization.qconfig.float16_static_qconfig

     

torch.quantization.qconfig.per_channel_dynamic_qconfig

     

torch.quantization.qconfig.float_qparams_weight_only_qconfig

     

torch.quantization.qconfig.default_qat_qconfig

     

torch.quantization.qconfig.default_weight_only_qconfig

     

torch.quantization.qconfig.default_activation_only_qconfig

     

torch.quantization.qconfig.default_qat_qconfig_v2

     

torch.nn.intrinsic.ConvReLU1d

     

torch.nn.intrinsic.ConvReLU2d

     

torch.nn.intrinsic.ConvReLU3d

     

torch.nn.intrinsic.LinearReLU

     

torch.nn.intrinsic.ConvBn1d

     

torch.nn.intrinsic.ConvBn2d

     

torch.nn.intrinsic.ConvBn3d

     

torch.nn.intrinsic.ConvBnReLU1d

     

torch.nn.intrinsic.ConvBnReLU2d

     

torch.nn.intrinsic.ConvBnReLU3d

     

torch.nn.intrinsic.BNReLU2d

     

torch.nn.intrinsic.BNReLU3d

     

torch.nn.intrinsic.qat.LinearReLU

     

torch.nn.intrinsic.qat.ConvBn1d

     

torch.nn.intrinsic.qat.ConvBnReLU1d

     

torch.nn.intrinsic.qat.ConvBn2d

     

torch.nn.intrinsic.qat.ConvBnReLU2d

     

torch.nn.intrinsic.qat.ConvReLU2d

     

torch.nn.intrinsic.qat.ConvBn3d

     

torch.nn.intrinsic.qat.ConvBnReLU3d

     

torch.nn.intrinsic.qat.ConvReLU3d

     

torch.nn.intrinsic.qat.update_bn_stats

     

torch.nn.intrinsic.qat.freeze_bn_stats

     

torch.nn.intrinsic.quantized.BNReLU2d

     

torch.nn.intrinsic.quantized.BNReLU3d

     

torch.nn.intrinsic.quantized.ConvReLU1d

     

torch.nn.intrinsic.quantized.ConvReLU2d

     

torch.nn.intrinsic.quantized.ConvReLU3d

     

torch.nn.intrinsic.quantized.LinearReLU

     

torch.nn.intrinsic.quantized.dynamic.LinearReLU

     

torch.nn.qat.Conv2d

     

torch.nn.qat.Conv2d.from_float

     

torch.nn.qat.Conv3d

     

torch.nn.qat.Conv3d.from_float

     

torch.nn.qat.Linear

     

torch.nn.qat.Linear.from_float

     

torch.nn.qat.dynamic.Linear

     

torch.nn.quantized.ReLU6

     

torch.nn.quantized.Hardswish

     

torch.nn.quantized.ELU

     

torch.nn.quantized.LeakyReLU

     

torch.nn.quantized.Sigmoid

     

torch.nn.quantized.BatchNorm2d

     

torch.nn.quantized.BatchNorm3d

     

torch.nn.quantized.Conv1d

     

torch.nn.quantized.Conv1d.from_float

     

torch.nn.quantized.Conv2d

     

torch.nn.quantized.Conv2d.from_float

     

torch.nn.quantized.Conv3d

     

torch.nn.quantized.Conv3d.from_float

     

torch.nn.quantized.ConvTranspose1d

     

torch.nn.quantized.ConvTranspose2d

     

torch.nn.quantized.ConvTranspose3d

     

torch.nn.quantized.Embedding

     

torch.nn.quantized.Embedding.from_float

     

torch.nn.quantized.EmbeddingBag

     

torch.nn.quantized.EmbeddingBag.from_float

     

torch.nn.quantized.FloatFunctional

     

torch.nn.quantized.FXFloatFunctional

     

torch.nn.quantized.QFunctional

     

torch.nn.quantized.Linear

     

torch.nn.quantized.Linear.from_float

     

torch.nn.quantized.Linear.from_reference

     

torch.nn.quantized.LayerNorm

     

torch.nn.quantized.GroupNorm

     

torch.nn.quantized.InstanceNorm1d

     

torch.nn.quantized.InstanceNorm2d

     

torch.nn.quantized.InstanceNorm3d

     

torch.nn.quantized.functional.avg_pool2d

     

torch.nn.quantized.functional.avg_pool3d

     

torch.nn.quantized.functional.adaptive_avg_pool2d

     

torch.nn.quantized.functional.adaptive_avg_pool3d

     

torch.nn.quantized.functional.conv1d

     

torch.nn.quantized.functional.conv2d

     

torch.nn.quantized.functional.conv3d

     

torch.nn.quantized.functional.interpolate

     

torch.nn.quantized.functional.linear

     

torch.nn.quantized.functional.max_pool1d

     

torch.nn.quantized.functional.max_pool2d

     

torch.nn.quantized.functional.celu

     

torch.nn.quantized.functional.leaky_relu

     

torch.nn.quantized.functional.hardtanh

     

torch.nn.quantized.functional.hardswish

     

torch.nn.quantized.functional.threshold

     

torch.nn.quantized.functional.elu

     

torch.nn.quantized.functional.hardsigmoid

     

torch.nn.quantized.functional.clamp

     

torch.nn.quantized.functional.upsample

     

torch.nn.quantized.functional.upsample_bilinear

     

torch.nn.quantized.functional.upsample_nearest

     

torch.nn.quantized.dynamic.Linear

     

torch.nn.quantized.dynamic.Linear.from_float

     

torch.nn.quantized.dynamic.LSTM

     

torch.nn.quantized.dynamic.GRU

     

torch.nn.quantized.dynamic.RNNCell

     

torch.nn.quantized.dynamic.LSTMCell

     

torch.nn.quantized.dynamic.GRUCell

     

torch.ao.ns._numeric_suite.compare_weights

     

torch.ao.ns._numeric_suite.get_logger_dict

     

torch.ao.ns._numeric_suite.Logger

     

torch.ao.ns._numeric_suite.Logger.forward

     

torch.ao.ns._numeric_suite.ShadowLogger

     

torch.ao.ns._numeric_suite.ShadowLogger.forward

     

torch.ao.ns._numeric_suite.OutputLogger

     

torch.ao.ns._numeric_suite.OutputLogger.forward

     

torch.ao.ns._numeric_suite.Shadow

     

torch.ao.ns._numeric_suite.Shadow.forward

     

torch.ao.ns._numeric_suite.Shadow.add

     

torch.ao.ns._numeric_suite.Shadow.add_scalar

     

torch.ao.ns._numeric_suite.Shadow.mul

     

torch.ao.ns._numeric_suite.Shadow.mul_scalar

     

torch.ao.ns._numeric_suite.Shadow.cat

     

torch.ao.ns._numeric_suite.Shadow.add_relu

     

torch.ao.ns._numeric_suite.prepare_model_with_stubs

     

torch.ao.ns._numeric_suite.compare_model_stub

     

torch.ao.ns._numeric_suite.get_matching_activations

     

torch.ao.ns._numeric_suite.prepare_model_outputs

     

torch.ao.ns._numeric_suite.compare_model_outputs

     

torch.ao.ns._numeric_suite_fx.OutputLogger

     

torch.ao.ns._numeric_suite_fx.OutputLogger.forward

     

torch.ao.ns._numeric_suite_fx.NSTracer

     

torch.ao.ns._numeric_suite_fx.NSTracer.is_leaf_module

     

torch.ao.ns._numeric_suite_fx.extract_weights

     

torch.ao.ns._numeric_suite_fx.add_loggers

     

torch.ao.ns._numeric_suite_fx.extract_logger_info

     

torch.ao.ns._numeric_suite_fx.add_shadow_loggers

     

torch.ao.ns._numeric_suite_fx.extract_shadow_logger_info

     

torch.ao.ns._numeric_suite_fx.extend_logger_results_with_comparison

     

torch.ao.ns.fx.utils.compute_sqnr

     

torch.ao.ns.fx.utils.compute_normalized_l2_error

     

torch.ao.ns.fx.utils.compute_cosine_similarity