pytorch
b059f035 - Fix bug preventing optimization from firing (#65573)

Commit
4 years ago
Fix bug preventing optimization from firing (#65573) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/65573 When we remove mutation on ``` x = [0, 1, 3, 4] x[-2] = 4 ``` we have a safety check that the new index will be in bounds of the old index. in practice, this should always be the case otherwise you would have a runtime error. Within that check (not within the actual adjustment) we were using the wrong length of inputs preventing the optimization from firing. Test Plan: Imported from OSS Reviewed By: navahgar Differential Revision: D31797469 Pulled By: eellison fbshipit-source-id: 02a1686b9f6016eb5aeb87ed342c043c203dcd0e
Author
Elias Ellison
Parents
Loading