Handle the corner case when min == max in L2 search (#70207)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/70207
In corner case when min == max, adjust_hist_to_include_zero() function used in L2 search will cause additional_nbins = -2147483648 and initialize bins_f with negative size.
Test Plan:
Before fix:
f315187213
After fix:
f315471862
Reviewed By: jspark1105
Differential Revision: D33227717
fbshipit-source-id: 7e8a455e51a0703a3a9c5eb7595d9b4d43966001