Fake Quantization Per Tensor Kernel Core Implementation (CPU) (#41029)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/41029
This diff contains the core implementation for the fake quantizer per tensor kernel that supports back propagation on the scale and zero point.
Test Plan:
On a devvm, use:
- `buck test //caffe2/test:quantization -- learnable_forward_per_tensor`
- `buck test //caffe2/test:quantization -- learnable_backward_per_tensor`
Reviewed By: z-a-f
Differential Revision: D22394145
fbshipit-source-id: f6748b635b86679aa9174a8065e6be5e20a95d81