Skip to content

Commit

Permalink
Extend to 1D and 3D the torch to linalg lowering of the average pool …
Browse files Browse the repository at this point in the history
…operator with count_include_pad = false (#4035)

Currently the avg_pool2d PyTorch operation supports the cases where
count_include_pad is true and false, but the avg_pool1d and avg_pool3d
only the true case is supported (which is simpler).

The count_include_pad = false support for avg_pool2d was added by
@AmosLewis in this change (reviewed by @rsuderman and @nirvedhmeshram) :
#3235

In this change I generalized the logic added above. I also did some
refactoring to the original code to reduce the size of the functions and
to avoid redundancy when possible.

@sahas3 @dixinzhou @rafaelubal

---------

Co-authored-by: Ivan Garcia <[email protected]>
  • Loading branch information
ivangarcia44 and Ivan Garcia authored Mar 5, 2025
1 parent 2787ea0 commit 7b23a1f
Show file tree
Hide file tree
Showing 4 changed files with 553 additions and 205 deletions.
Loading

0 comments on commit 7b23a1f

Please sign in to comment.