Stop using an unnecessary scalar_to_tensor(..., device) call. (#50114)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/50114
In this case, the function only dispatches on cpu anyway.
Test Plan: Imported from OSS
Reviewed By: mruberry
Differential Revision: D25790155
Pulled By: gchanan
fbshipit-source-id: 799dc9a3a38328a531ced9e85ad2b4655533e86a