forked from pytorch/FBGEMM
-
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.
Fix pack_segments backward when grad is non-contig (pytorch#3006)
Summary: Pull Request resolved: pytorch#3006 X-link: facebookresearch/FBGEMM#99 `pack_segments` backward ops works incorrectly, i.e., the input's gradient will be incorrect when the backward input grad_out is not contiguous. https://fb.workplace.com/groups/2126278550786248/posts/8368626576551383/ Error from unit test without the change: P1531843067 This diff ensures the gradients are contiguous. Unit test is also added. Reviewed By: sryap Differential Revision: D61314676 fbshipit-source-id: b76a34bb72f0b8f728a8cfb930ea0d150c3f25a9
- Loading branch information
1 parent
6bd8cd7
commit 81efd37
Showing
3 changed files
with
192 additions
and
8 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