Finished the high-priority functions (#21127)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21127
ghimport-source-id: 609021958e76ea01299f62b9491038005e6b4f27
Differential Revision: D15563189
Pulled By: Chillee
fbshipit-source-id: 5c6155a69fff7447689ef012ea303dc358d50486