forked from pytorch/pytorch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fx2trt] fix a bug in conversion from negative dim to positive dim (p…
…ytorch#68360) Summary: Pull Request resolved: pytorch#68360 Added a helper function to do this. Only use `mod` to convert negative dim to positive. Do nothing when it's already positive. Previously in `getitem` if we are slicing to the very end, we will get the dimension wrong. Test Plan: Add a unit test Reviewed By: yinghai, wushirong Differential Revision: D32432893 fbshipit-source-id: 3c5d6a578d92a15207a5e52802750f9ea7f272a9
- Loading branch information
1 parent
549e014
commit 0cf46fb
Showing
3 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters