-
Notifications
You must be signed in to change notification settings - Fork 544
[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
Conversation
d2ef123
to
63ab68e
Compare
@sahas3, I have updated my code according to your comments as well as added some e2e tests. |
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.
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
63ab68e
to
1c9c78c
Compare
@vivekkhandelwal1, can you help me retrigger the CI for this PR please? CI failed because of time out due to unavailable resources. |
Done |
@vivekkhandelwal1 can you help me check the CI please? I'm not sure what's wrong with it.
|
@justin-ngo-arm, this change caused a LIT failure in Windows CI https://github.com/llvm/torch-mlir/actions/runs/14649870432/job/41112829976#step:8:5957 likely because |
After this PR was merged, the Windows build started failing https://github.com/llvm/torch-mlir/actions/runs/14649870432/job/41112829976. @justin-ngo-arm can you please take a look? |
@sahas3, @vivekkhandelwal1, I'm working on a PR to fix this. I will submit it ASAP. |
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.