Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add check to ensure that there is enough room in permuted_indices (py…
…torch#3403) Summary: In scope of the MTIA IG Sprint we encountered a crash (T208229934) that turned out to be an incorrectly provided argument for `permuted_lengths_sum` argument. This argument suppose to speed the operation, but actually, the true value it suppose to substitute is computed every time anyway. One radical solution would be to drop the argument entirely, but it requires more thoughtful analysis. This diff just prevent clearly faulty case of allocated `permuted_indices` being less than required by the function logic. Exactly this case was spotted in case of T208229934. Differential Revision: D66274522
- Loading branch information