[quant][bug] Fix histogram observer with 0 input (#40191)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/40191
When the first couple of inputs passed to histogram observer are all 0's subsequent non-zero inputs cause a div by 0 error
Test Plan:
python test/test_quantization.py TestHistogramObserver.test_histogram_observer_zero_inputs
Imported from OSS
Differential Revision: D22119422
fbshipit-source-id: 8bbbba914ba7f343121830c768ca0444439f8e03