resubmit polish up overloads on free functions (#31014)
Summary:
Resubmitting https://github.com/pytorch/pytorch/pull/30356
Second commit has reintroduces deleted function which caused revert previously.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/31014
Differential Revision: D18899127
Pulled By: eellison
fbshipit-source-id: 9049b8718926c329d9cb46bb96eac6c278e9b866