Skip to content
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

fix(torch-frontend): fix test_torch_max_pool2d #28790

Merged
merged 10 commits into from
Jul 15, 2024

Conversation

nicolasb0
Copy link
Contributor

@nicolasb0 nicolasb0 commented Jul 14, 2024

PR Description

  • Max_pool2d for Paddle seems to exhibit a different behavior from other frameworks when handling ceil mode. It was modified in the Paddle backend so that the padding and ceil mode are handled before calling the max_pool2d function.
  • Modifications were done to _padding_ceil_mode function.
  • Modifications were done to the gather function for the torch frontend due to a data type related error.
  • Stop_gradient was added when converting array to numpy in the set_item function.
  • The max(dilation) > 1 was discarded in test_torch_max_pool2d for the Paddle backend.
  • Modifications were made to the torch frontend max_pool_2d function in relation to the "return indices" part.

Related Issue

Close #28764

Checklist

  • Did you add a function?
  • Did you add the tests?
  • Did you run your tests and are your tests passing?
  • Did pre-commit not fail on any check?
  • Did you follow the steps we provided?

Copy link
Contributor

@Sam-Armstrong Sam-Armstrong left a comment

Choose a reason for hiding this comment

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

I've made a couple of minor tweaks, but otherwise this looks good. Thanks for the contribution @nicolasb0! 😁

@Sam-Armstrong Sam-Armstrong merged commit adfd2fc into ivy-llc:main Jul 15, 2024
4 of 5 checks passed
@nicolasb0
Copy link
Contributor Author

Thanks a lot @Sam-Armstrong ! But I am under the impression that both of your commits make the Paddle backend fail. Do you get a different result when running "python -m pytest ivy_tests/test_ivy/test_frontends/test_torch/test_nn/test_functional/test_pooling_functions.py::test_torch_max_pool2d"?
Please don't hesitate to take a second look when you have any time.
Thanks in advance!

@Sam-Armstrong
Copy link
Contributor

@nicolasb0 We've shifted our focus away from paddle frontends and backends, as we're a much smaller team now. So I didn't look into the test for paddle, only the other backends. If you want to work on fixing the test for paddle, you're more than welcome to, but it isn't something that myself or the team will be able to look into right now. Apologies!

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.

Fix Frontend Failing Test: tensorflow - pooling_functions.torch.nn.functional.max_pool2d
2 participants