pytorch
c4e08387 - [quant][fx] Support producing reference quantized patterns for dynamic quantization (#89248)

Commit
2 years ago
[quant][fx] Support producing reference quantized patterns for dynamic quantization (#89248) Summary: split the is_decomposed logic for `_replace_observer_with_quantize_dequantize_node` in a separate function and added support for dynamic quantization in the decomposed version of this function. In case of dynamic quantization, we'll produce the following reference quantized pattern in decomposed mode: ``` x -> choose_qparams -> quantize_per_tensor -> dequantize_per_tensor -> linear ``` Test Plan: python test/test_quantization.py -k test__convert_to_reference_decomposed_fx_dynamic_quant Reviewers: Subscribers: Tasks: Tags: Pull Request resolved: https://github.com/pytorch/pytorch/pull/89248 Approved by: https://github.com/vkuzo
Author
Committer
Parents
Loading