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.
unfold_backward: Remove stride >= size kernel in favour of copy_ (pyt…
…orch#88061) unfold_backward has a dedicated kernel for `stride >= size` which uses temporary tensors created by `at::arange` to perform the mapping from unfolded to folded. This instead uses `unfold` to view the output, and does a direct copy from the gradient into the view. In benchmarks I see either no difference or a marginal speed benefit from this PR. Pull Request resolved: pytorch#88061 Approved by: https://github.com/albanD
- Loading branch information
1 parent
ceddcf5
commit 3eb3790
Showing
4 changed files
with
61 additions
and
194 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
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