pytorch
36acad58 - [quant][pt2e][refactor] Move the annotation for observer sharing ops into separate util (#99384)

Commit
1 year ago
[quant][pt2e][refactor] Move the annotation for observer sharing ops into separate util (#99384) Summary: In order to keep quantizer simple, we want to move the annotation code for operators like flatten, hardtanh etc. to a separate utility function that is called after the quantizer annotation is done, this makes these ops (operator list) not configurable by user, and also makes prepare_pt2e operator aware instead of operator agnostic, this design is not final, we may change it in the future if we find there are use cases that need these to be configurable or if we feel it is important for prepare_pt2e to stay agnostic to operator/operator patterns Test Plan: python test/test_quantization.py TestQuantizePT2E.test_qnnpack_quantizer_obs_sharing_ops Reviewers: Subscribers: Tasks: Tags: Differential Revision: [D45071006](https://our.internmc.facebook.com/intern/diff/D45071006) Pull Request resolved: https://github.com/pytorch/pytorch/pull/99384 Approved by: https://github.com/kimishpatel
Author
Committer
Parents
Loading