[xplat] add static_cast where missing (#76756)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/76756
Add `static_cast` to implicit int -> float conversions.
Test Plan: CI
Reviewed By: yfeldblum
Differential Revision: D35857046
fbshipit-source-id: 0560125fed19e74eff85e22cfab971893515f4dc
(cherry picked from commit 7cd5b2347d0e95938c73e39b20e59e647c74de69)