Fix native ctc_loss gradient indexing bug for large target sizes (#27460)
Summary:
Fixes: https://github.com/pytorch/pytorch/issues/27442
Thank you Mohamed Yousef (ASDen) for the report with minimal
reproducing example and detailed analysis!
Pull Request resolved: https://github.com/pytorch/pytorch/pull/27460
Differential Revision: D17789378
Pulled By: soumith
fbshipit-source-id: dc01a31b998cced4462e933d4b32e09b331f7e41