Reland: Make `torch.empty*` deterministic by filling with NaN or max int (#104995)
Relands #101849 after #104302 reverted it.
torchrec PR https://github.com/pytorch/torchrec/pull/1269 fixes the torchrec failure that caused #101849 to be reverted
Part of #82004
Pull Request resolved: https://github.com/pytorch/pytorch/pull/104995
Approved by: https://github.com/albanD