Fix uniform returning end point for BFloat16 and Half (#96962)
Fixes #96947
If we generate `1.0 - float_eps`, the BFloat16 and Half constructors will round this to 1.0 which is outside of the half-open range. Instead, we delay the bounds change until after the value has been rounded.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96962
Approved by: https://github.com/lezcano, https://github.com/ngimel