pytorch
1b20eeb1 - fx quant: move output obs logic to QuantizeHandler (#57377)

Commit
3 years ago
fx quant: move output obs logic to QuantizeHandler (#57377) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/57377 Moves the logic which determines 1. whether a pattern instance's output should be observed 2. whether a pattern instance's output should be marked as observed based on its inputs 3. whether to ovverride the activation specified in the qconfig from `quantize.py` to `quantization_patterns.py`. This makes the code easier to read and reduces the coupling between `Quantizer` and `QuantizeHandler` instances. Note: there are some further cleanups which would be good after this one - leaving those for future PRs. Test Plan: ``` python test/test_quantization.py TestQuantizeFxOps ``` Imported from OSS Reviewed By: jerryzh168 Differential Revision: D28126896 fbshipit-source-id: 94c80a9c7307452783348d65b402acc84983e3f6
Author
Parents
Loading