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
[ONNX] Fix dtype for NonMaxSuppression #7056
Conversation
…ch eager execution " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
…on " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
Should we do this in |
That's a good point. I will see how it can be done |
…ch eager execution " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
…on " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
@BowenBao I think this change is a much more efficient one. Can we resurrect this change? |
@datumbox please take a look. |
@justinchuby I'm no longer in the maintainer group to offer a stamp and help you merge. Not sure if any of the remaining folks from EU are online now. Perhaps @malfet @atalman could stamp? |
Also it seems that one of the tests is failing? Could be related. |
@datumbox I can send you an invite, if you need one. |
Thanks for the PR @justinchuby
Any chance we could revert this change? It makes the diff a little difficult to review |
Thanks for the PR @justinchuby. Could you clarify what review you need from us? Happy to help get this merged before our branch cut on Feb 17. As @datumbox mentioned, we have a (previously undetected) ONNX failure: #7247. @NicolasHug I think we need to prioritize getting this landed and CI green over potential style nits given that our branch cut is looming ahead. Happy to revisit afterwards. |
thanks! I will work on this today. We need the "Fix dtype for NonMaxSuppression" fix to allow pytorch/pytorch#86146 to land because otherwise a vision test would fail. |
@pmeier @NicolasHug I changed this PR to be minimal and found the cause for the test failure. We need pytorch/pytorch#94870 then this then pytorch/pytorch#86146, in this order. Thanks a lot! |
The assert statement blocks tensors with unknown ranks. This change unblocks those cases. Needed for pytorch/vision#7056 Verified against pytorch/vision#7056 Pull Request resolved: #94870 Approved by: https://github.com/BowenBao
Since pytorch/pytorch#94870 is already merged, we should have access to it with todays nightly release in roughly a couple of hours. Will merge then if CI is green. Just so I understand correctly, #7249 is not strictly needed but improves code quality, right? Meaning, it would be good to merge soon, but can wait until after the branch cut? |
Hey @pmeier! You merged this PR, but no labels were added. The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py |
That's accurate |
…ch eager execution " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
…on " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
…ch eager execution " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
…on " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
…ch eager execution " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
…on " - Fixes #78442 - Change floor_divide to round down to match eager. The old behavior for floor_divide (which was actually trunc divide) is deprecated and removed in eager mode. (See #78442) - Remove division logic in opset 10 because it is duplicated from opset 9. - Add tests to `remainder`, `div`, `floor_divide` and `true_divide` ### Blocked by - pytorch/vision#7056 [ghstack-poisoned]
Summary: Reviewed By: vmoens Differential Revision: D44416637 fbshipit-source-id: c06807ab7d9d71f2272761bf366411268ed5b462 Co-authored-by: Nikita Shulga <nshulga@fb.com> Co-authored-by: Philip Meier <github.pmeier@posteo.de>
Explicitly cast inputs to NonMaxSuppression to
float32
to accommodatefloat64
inputs becauseNonMaxSuppression
only supports float32 coordinates. This is necessary to unblock pytorch/pytorch#78442 and pytorch/pytorch#86146._cast_Long
.cc @neginraoof @BowenBao @mruberry