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

Add ops(max_pool3d and max_pool3d_with_indices) | feat(atenlib) #618

Merged
merged 9 commits into from
Apr 11, 2023

Conversation

fatcat-z
Copy link
Contributor

  1. Add max_pool3d and max_pool3d_with_indices ops.
  2. Refactor the code so max_pool2d and max_pool3d could share the same helper function. And move them to nn.py file.
  3. Refactor the code so max_pool2d_with_indices and max_pool3d_indices could share the same helper function. And move them to nn.py file.
  4. Add tests.

@codecov
Copy link

codecov bot commented Apr 11, 2023

Codecov Report

Merging #618 (fc66470) into main (b132176) will increase coverage by 0.04%.
The diff coverage is 95.31%.

@@            Coverage Diff             @@
##             main     #618      +/-   ##
==========================================
+ Coverage   74.49%   74.54%   +0.04%     
==========================================
  Files         107      107              
  Lines       11305    11302       -3     
  Branches     1182     1177       -5     
==========================================
+ Hits         8422     8425       +3     
+ Misses       2561     2557       -4     
+ Partials      322      320       -2     
Impacted Files Coverage Δ
onnxscript/function_libs/torch_aten/ops/nn.py 75.40% <93.87%> (+0.40%) ⬆️
...ipt/tests/function_libs/torch_aten/extra_opinfo.py 100.00% <100.00%> (ø)
...s/function_libs/torch_aten/ops_correctness_test.py 88.81% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

# So indices results to the expected output which is :
# [[0,1],
# [0,1]]
# For more information :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks for the explanation! This makes a lot of sense

"nn.functional.max_pool3d",
matcher=lambda sample: sample.kwargs.get("ceil_mode") is True
and sample.kwargs.get("padding") == 1,
reason="this combinations is not supported.",
Copy link
Collaborator

@justinchuby justinchuby Apr 11, 2023

Choose a reason for hiding this comment

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

Was it not supported or was there a bug?

Suggested change
reason="this combinations is not supported.",
reason="fixme: (what we reported in ORT)",

@justinchuby justinchuby merged commit 5eafe2a into microsoft:main Apr 11, 2023
@fatcat-z fatcat-z deleted the max_pool_3d branch April 12, 2023 00:32
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.

3 participants