Rspress

# #qconfig

horizon_plugin_pytorch.quantization.get_qconfig (observer: ~typing.Type[~horizon_plugin_pytorch.quantization.observer_v2.ObserverBase] = <class 'horizon_plugin_pytorch.quantization.observer_v2.MinMaxObserver'>, in_dtype: ~torch.dtype | ~horizon_plugin_pytorch.dtype.QuantDType | None = None, weight_dtype: ~torch.dtype | ~horizon_plugin_pytorch.dtype.QuantDType | None = 'qint8', out_dtype: ~torch.dtype | ~horizon_plugin_pytorch.dtype.QuantDType | None = 'qint8', fix_scale: bool = False)

Get qconfig.

Parameters:

observer (Type[ObserverBase]) – observer type for input and output. Support MinMaxObserver and MSEObserver

in_dtype (Union[dtype, QuantDType, None]) – input dtype.

weight_dtype (Union[dtype, QuantDType, None]) – weight dtype.

out_dtype (Union[dtype, QuantDType, None]) – output dtype.

fix_scale (bool) – Whether fix input/output scale.

On This Page