Warn about floor_divide performing incorrect rounding#50281
Warn about floor_divide performing incorrect rounding#50281peterbell10 wants to merge 35 commits intogh/peterbell10/37/basefrom
Conversation
[ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit cd325b9 (more details on the Dr. CI page):
ci.pytorch.org: 1 failedThis comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Summary: Pull Request resolved: pytorch#50281 Test Plan: Imported from OSS Reviewed By: ngimel Differential Revision: D26257855 Pulled By: mruberry fbshipit-source-id: 3c4a91f97fe99e7f0905212f8a9e188e28130b57
|
Internal updates reflected in: #51745 (comment) |
|
Hey @peterbell10, take a look at the CI on #51745, which is this PR rebased and with a docs fix (deprecated -> warning). It seems like there's some new issue with the ONNX testing where it's being passed a div signature it doesn't understand. I'm going to investigate more now. Update: probably a logical merge conflict with 6d47e2c? Looks like we'll have to add an ONNX export for the new div operation. Luckily that shouldn't be too hard. Ping me about it if you have any questions and we'll get this merged quickly, and then we'll cherrypick it into the 1.8 branch. |
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
ghstack-source-id: 982727f Pull Request resolved: pytorch#50281
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
|
@mruberry PTAL. Rebased and implemented |
|
fyi: the pytorch_doc_test failure was in the base (and has since been addressed). It's not an issue with this PR. |
| } | ||
|
|
||
| Tensor& floor_divide_out(Tensor& result, const Tensor& self, const Tensor& other) { | ||
| TORCH_WARN_ONCE( |
There was a problem hiding this comment.
Take a look at https://github.com/pytorch/pytorch/pull/51745/files. This warning got a slight update and needs to be replicated for floor_divide(). You'll have to verify manually that the warning appears for the function, method, inplace, and out= variants.
| # release on 04/24/19 | ||
|
|
||
|
|
||
| def div(g, self, other, *args): |
There was a problem hiding this comment.
The ONNX changes need a test, too. See here:
The test does not need to be extensive, it just needs to validate that the call works correctly.
mruberry
left a comment
There was a problem hiding this comment.
Thanks for the updates, @peterbell10; I'll start testing this internally. I made two notes:
- check the updated warning message requirements and validate manually that the warning message is thrown as expected (see inline comment)
- add tests sanity checking the ONNX behavior (see inline comment for a code reference)
Differential Revision: [D26257855](https://our.internmc.facebook.com/intern/diff/D26257855) [ghstack-poisoned]
ghstack-source-id: 9065bd9 Pull Request resolved: pytorch#50281
|
@mruberry added onnx tests, ensured warning was included on both overloads and rebased to fix the doc issue (although there seems to be a new ROCm issue now). |
…pytorch#50281) Summary: Pull Request resolved: pytorch#50281 Pull Request resolved: pytorch#51745 Test Plan: Imported from OSS Reviewed By: ngimel Pulled By: mruberry Differential Revision: D26257855 fbshipit-source-id: e5d497cf07b0c746838ed081c5d0e82fb4cb701b
…pytorch#50281) Summary: Pull Request resolved: pytorch#50281 Pull Request resolved: pytorch#51745 Test Plan: Imported from OSS Reviewed By: ngimel Pulled By: mruberry Differential Revision: D26257855 fbshipit-source-id: e5d497cf07b0c746838ed081c5d0e82fb4cb701b
Stack from ghstack:
Differential Revision: D26257855