Revert 107846 and 109695 (#111099)
https://github.com/pytorch/pytorch/pull/107846 caused Meta-internal S369412
https://github.com/pytorch/pytorch/pull/109695 depends on 107846 so also needs to be reverted
Pull Request resolved: https://github.com/pytorch/pytorch/pull/111099
Approved by: https://github.com/malfet