Implement C++ API version of torch.nn.functional.one_hot (#27081) (#27177)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27177
Add support for F::one_hot C++ function.
Test Plan:
Added 3 new tests to verify API is working
Imported from OSS
Differential Revision: D17697934
fbshipit-source-id: a8127fb87c00daa119bb92a5702bc4bbba48290d