migrating the take() fn from TH to ATen (#45283)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/45283
Test Plan: Imported from OSS
Reviewed By: mrshenli
Differential Revision: D24037298
Pulled By: bdhirsh
fbshipit-source-id: 088ce39e55ee8b5a79fa501395fa9eec08d1d396