-
Notifications
You must be signed in to change notification settings - Fork 25.2k
[Reland] Added reference tests to ReductionOpInfo #64273
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
[Reland] Added reference tests to ReductionOpInfo #64273
Conversation
This reverts commit e4fd2ab. [ghstack-poisoned]
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit c06c0e6 (more details on the Dr. CI page):
🕵️ 2 new failures recognized by patternsThe following CI failures do not appear to be due to upstream breakages:
|
@heitorschueroff has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Reintroduced sample_inputs_prod and constrained the range of values for large reference tests. This reverts commit e4fd2ab. Differential Revision: [D30672097](https://our.internmc.facebook.com/intern/diff/D30672097) [ghstack-poisoned]
@heitorschueroff has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
fyi paralleltbb failure is unrelated and now resolved |
@albanD you're shepherding this, right? |
@mruberry yes I can take a look. |
Reintroduced sample_inputs_prod and constrained the range of values for large reference tests. This reverts commit e4fd2ab. Differential Revision: [D30672097](https://our.internmc.facebook.com/intern/diff/D30672097) [ghstack-poisoned]
@albanD This should be ready for another review |
@heitorschueroff has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Reintroduced sample_inputs_prod and constrained the range of values for large reference tests. This reverts commit e4fd2ab. Differential Revision: [D30672097](https://our.internmc.facebook.com/intern/diff/D30672097) [ghstack-poisoned]
@heitorschueroff has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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.
I'm not super happy with all the tolerance overrides but I think the PR is good :)
@@ -188,6 +188,8 @@ def _np(t): | |||
return tuple(map(to_numpy, x)) | |||
elif isinstance(x, dict): | |||
return {k: to_numpy(v) for k, v in x.items()} | |||
elif isinstance(x, torch.dtype): | |||
return torch.empty(0, dtype=x).numpy().dtype |
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.
Interesting move :D
Maybe we can re-use:
numpy_to_torch_dtype_dict = { |
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.
I'm not super happy with all the tolerance overrides but I think the PR is good :)
Could you elaborate more on your concerns about the tolerance overrides? Do you think we should skip the tests instead? Or if it a concern with the numerical instability they expose?
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.
If so many functions need to override the default value, maybe the default is not good?
Or we want to run these in double to make sure they are correct (like we do for gradcheck)?
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.
The problem is mostly with sum and prod for float16. I changed the decorator to override the tolerance for float16 for all tests. Some tests are specifically testing numerical stability so it's expected we need to override the tolerance, this is also a way to document numerical instability.
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.
I changed the large reference tests from float32 to float64
Reintroduced sample_inputs_prod and constrained the range of values for large reference tests. This reverts commit e4fd2ab. Differential Revision: [D30672097](https://our.internmc.facebook.com/intern/diff/D30672097) [ghstack-poisoned]
Reintroduced sample_inputs_prod and constrained the range of values for large reference tests. This reverts commit e4fd2ab. Differential Revision: [D30672097](https://our.internmc.facebook.com/intern/diff/D30672097) [ghstack-poisoned]
@albanD What else is this PR missing to get accepted? |
@heitorschueroff has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Reintroduced sample_inputs_prod and constrained the range of values for large reference tests. This reverts commit e4fd2ab. Differential Revision: [D30672097](https://our.internmc.facebook.com/intern/diff/D30672097) [ghstack-poisoned]
@heitorschueroff has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
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 the update!
@heitorschueroff merged this pull request in 8535418. |
Stack from ghstack:
Reintroduced sample_inputs_prod and constrained the range of values for large reference tests.
This reverts commit e4fd2ab.
Differential Revision: D30672097