Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mlir][Linalg] Introduce linalg.pooling_min/max/sum op.
Summary: Performs an N-D pooling operation similarly to the description in the TF documentation: https://www.tensorflow.org/api_docs/python/tf/nn/pool Different from the description, this operation doesn't perform on batch and channel. It only takes tensors of rank `N`. ``` output[x[0], ..., x[N-1]] = REDUCE_{z[0], ..., z[N-1]} input[ x[0] * strides[0] - pad_before[0] + dilation_rate[0]*z[0], ... x[N-1]*strides[N-1] - pad_before[N-1] + dilation_rate[N-1]*z[N-1] ], ``` The required optional arguments are: - strides: an i64 array specifying the stride (i.e. step) for window loops. - dilations: an i64 array specifying the filter upsampling/input downsampling rate - padding: an i64 array of pairs (low, high) specifying the number of elements to pad along a dimension. If strides or dilations attributes are missing then the default value is one for each of the input dimensions. Similarly, padding values are zero for both low and high in each of the dimensions, if not specified. Differential Revision: https://reviews.llvm.org/D76414
- Loading branch information
Showing
9 changed files
with
444 additions
and
45 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
Oops, something went wrong.