Skip to content

[TOSA] Fix output size calculation for pool ops #4125

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

justin-ngo-arm
Copy link
Contributor

TOSA requires (inputDim + padBefore + padAfter - kernel) to be fully divisible by stride. This update adds pad and input size modifications for pooling ops (AvgPool2d and MaxPool2d) to satisfy that requirement by TOSA.

@sjarus sjarus requested a review from sahas3 April 14, 2025 17:49
@justin-ngo-arm
Copy link
Contributor Author

@sahas3, I have updated my code according to your comments as well as added some e2e tests.

Copy link
Member

@sahas3 sahas3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

TOSA requires (inputDim + padBefore + padAfter - kernel) to be fully
divisible by stride. This update adds pad and input size modifications
for pooling ops (AvgPool2d and MaxPool2d) to satisfy that requirement
by TOSA.

Signed-off-by: Justin Ngo <[email protected]>
Change-Id: Iab4021f2dda87cb87e54e4e9ca20bd3688dc1c50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants