[fix] torch.frac : Handle inf correctly (#52678)
Summary:
Fixes : https://github.com/pytorch/pytorch/issues/51948
Fixes : https://github.com/pytorch/pytorch/issues/52027
Depends On: https://github.com/pytorch/pytorch/issues/52660
TODO
* [x] Benchmark
Pull Request resolved: https://github.com/pytorch/pytorch/pull/52678
Reviewed By: anjali411
Differential Revision: D27566407
Pulled By: heitorschueroff
fbshipit-source-id: 92c7309558ee41f8b9c641f791e8f84819c333e2