pytorch
94ed26d1 - [quant][pt2e] prepare_pt2e use quantization spec directly (#102054)

Commit
1 year ago
[quant][pt2e] prepare_pt2e use quantization spec directly (#102054) Summary: In this PR we aligned with the design of annotation API and uses quantization spec directly for annotation. main change is in prepare, we consume quantization_spec object directly instead of the observer or fake quant constructor, we create the constructor inside prepare, and annotation api users only need to interact with quantization spec object after this PR Test Plan: ``` buck2 test mode/opt caffe2/test:quantization_pt2e -- --exact 'caffe2/test:quantization_pt2e - test_resnet18_with_quantizer_api (quantization.pt2e.test_quantize_pt2e.TestQuantizePT2EModels)' ``` Reviewed By: kimishpatel Differential Revision: D45934088 Pull Request resolved: https://github.com/pytorch/pytorch/pull/102054 Approved by: https://github.com/kimishpatel
Author
Committer
Parents
Loading