[Fix] Raise error when empty index tensor is passed (gather) (#65006)
Summary:
See https://github.com/pytorch/pytorch/pull/63312#issuecomment-919330081 for context.
cc: ezyang ysiraichi
Pull Request resolved: https://github.com/pytorch/pytorch/pull/65006
Reviewed By: mruberry
Differential Revision: D30937730
Pulled By: ezyang
fbshipit-source-id: a8f77b1f40d07e7e3bef6caaafa119685f297638