Fix test_ldexp on Windows (#48335)
Summary:
Force `torch.randint` to generate tensor of int32 rather than tensor of int64
Delete unneeded copies
Pull Request resolved: https://github.com/pytorch/pytorch/pull/48335
Reviewed By: ranman
Differential Revision: D25133312
Pulled By: malfet
fbshipit-source-id: 70bfcb6b7ff3bea611c4277e6634dc7473541288