Port index_select to ATen (CUDA) (#39946)
Summary:
Fixes https://github.com/pytorch/pytorch/issues/24578
Pull Request resolved: https://github.com/pytorch/pytorch/pull/39946
Reviewed By: ngimel
Differential Revision: D22520160
Pulled By: mruberry
fbshipit-source-id: 7eb3029e3917e793f3c020359acb0989d5deb61e