Add some named tensor helper functions (#21636)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21636
ghimport-source-id: 5eff5744cd3c80f75bdb02576be1407a64e0434d
Differential Revision: D15780269
Pulled By: zou3519
fbshipit-source-id: 87ff40ffbe0ebd5fc4d105709c9f6f8dda5f9952