v1.5.0: [v.1.5.0] Ensure linearIndex of advanced indexing backwards is contig…
…… (#36962) * [v.1.5.0] Ensure linearIndex of advanced indexing backwards is contiguous. This is a more straightforward solution to the problem than https://github.com/pytorch/pytorch/pull/36957; I don't know about the relative performance. Fixes: #36956 ghstack-source-id: 43c48eaee7232cd3ed2b108edbbee24c11e8321a Pull Request resolved: https://github.com/pytorch/pytorch/pull/36959 * Fix test.