-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[fix] max_pool1d: composite compliance #70900
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] max_pool1d: composite compliance #70900
Conversation
CI Flow Status⚛️ CI FlowRuleset - Version:
You can add a comment to the PR and tag @pytorchbot with the following commands: # ciflow rerun, "ciflow/default" will always be added automatically
@pytorchbot ciflow rerun
# ciflow rerun with additional labels "-l <ciflow/label_name>", which is equivalent to adding these labels manually and trigger the rerun
@pytorchbot ciflow rerun -l ciflow/scheduled -l ciflow/slowFor more information, please take a look at the CI Flow Wiki. |
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit 79ce393 (more details on the Dr. CI page):
🕵️ 1 new failure recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
aten/src/ATen/native/MaxPooling.cpp
Outdated
| #include <ATen/native/DispatchStub.h> | ||
| #include <ATen/native/MaxPooling.h> | ||
| #include <ATen/native/Pool.h> | ||
| #include <iostream> |
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.
nit: probably we don't need it, (might have lost after debugging locally).
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.
Oops. Thanks!
|
|
||
| Tensor result = [&]() { |
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.
TODO(rzou): check history
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.
Motivation for special kernel on CPU.
PR #43745 description has the relevant benchmark.
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 finding it. It seems fine to me that we are turning this into an operator
aten/src/ATen/native/MaxPooling.cpp
Outdated
|
|
||
| Tensor result = [&]() { | ||
| NoNamesGuard guard; | ||
| return at::_max_pool1d_forward( |
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.
"_max_pool1d_forward_cpu_special" or something to make it clearer that it's a special case
zou3519
left a comment
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.
This LGTM -- as discussed offline we should change the naming of the new operator to make it clearer that it's on CPU and an optimization. I also had a suggestion for the dispatch string in native_functions
| dispatch: | ||
| CompositeExplicitAutograd: _max_pool1d_forward |
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.
Because this is CPU-only, can we do "dispatch: -cpu: _max_pool1d_forward"?
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.
Have updated the dispatch to CPU-only and also updated the name to _max_pool1d_cpu_forward.
|
|
||
| Tensor result = [&]() { |
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 finding it. It seems fine to me that we are turning this into an operator
|
@zou3519 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests [ghstack-poisoned]
This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests ghstack-source-id: 041c985 Pull Request resolved: #71992
…ance (#70900)"" This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests [ghstack-poisoned]
This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests ghstack-source-id: e65ed77 Pull Request resolved: #71992
This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests [ghstack-poisoned]
…ance (#70900)"" This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests Differential Revision: [D33882918](https://our.internmc.facebook.com/intern/diff/D33882918) [ghstack-poisoned]
This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests Differential Revision: [D33882918](https://our.internmc.facebook.com/intern/diff/D33882918) [ghstack-poisoned]
This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests ghstack-source-id: 40a34bb Pull Request resolved: #71992
Summary: Pull Request resolved: #71992 This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests Reviewed By: jbschlosser, VitalyFedyunin Differential Revision: D33882918 Pulled By: zou3519 fbshipit-source-id: f146e82e6b46690376b3d8825dc7f7da62e2c7de
Summary: Pull Request resolved: #71992 This reverts commit b7222e1. We are conservatively reverting this because it broke a test in functorch. The original PR added a `_max_pool1d_cpu` operator. I'm not sure if it is actually safe to revert this due to the addition of the new operator (someone may have serialized it between now and then) but because it has only been two weeks this should be fine. Test Plan: - wait for tests Reviewed By: jbschlosser, VitalyFedyunin Differential Revision: D33882918 Pulled By: zou3519 fbshipit-source-id: f146e82e6b46690376b3d8825dc7f7da62e2c7de (cherry picked from commit 1606333)
Reference: #69991
Not sure if this is a good idea as this increases the number of operators.