-
Notifications
You must be signed in to change notification settings - Fork 557
Generalize the PyTorch avg_pool linalg lowering algorithm for the case where count_include_pad = false. #4010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…e where count_include_pad = false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for making the changes @ivangarcia44. Looks much cleaner now. Some minor comments. I'll leave the approval to other reviewers.
Hi @rsuderman @AmosLewis , would it be ok to merge this change? |
Closing merge request. Will create a new one to avoid the merge issue. |
@AmosLewis @rsuderman @sahas3 @dixinzhou Please review the new merge request here: #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