-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend support to varying block sizes on middle dimension of 3D tenso…
…rs for sum operator Summary: Add varying block sizes on the middle dimension, `N`, for `sum` Triton kernels which reduce a 3-dimensional input tensor of shape `(M, N, K)` to a 2-dimensional output along the middle dimension (`dim == 1`). This diff adds functionality for the `sum_then_buffer` approach, which proved to be faster than the `buffer_then_sum` approach, and is primarily beneficial for reducing 3-dimensional tensors with large middle dimensions, on the order of 2^12 and above. As seen below, Triton outperforms PyTorch for the large middle dimensions in the mid range of large inputs, on the order of approximately 2^16. Reviewed By: jbschlosser Differential Revision: D58892972 fbshipit-source-id: ddd8e051dfec13e61bd29fc6ea99fa00c32ee8cf
- Loading branch information
1 parent
2643d15
commit 2f6ea58
Showing
2 changed files
with
190 additions
and
12 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