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.
Add rudimentary NestedTensor.sum(dim) (pytorch#82387)
A first step towards adding dimension-wise reductions to NestedTensor, - Assumes tensors in the nested tensor as well as the buffer of the nested tensor are contiguous - Always enforces `keepdim=True` - Only supports reduction across the last dimension - No support for acctype (`dtype` argument) - No autograd support - CPU only Next steps would be to add support for the above. For now this basic support is for prototyping to make sure `NestedTensor` can be used as an API for segment reductions. Pull Request resolved: pytorch#82387 Approved by: https://github.com/jbschlosser
- Loading branch information
1 parent
2bfae07
commit 89c0123
Showing
3 changed files
with
104 additions
and
0 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