Skip to content

allow tolerances in transforms consistency checks #6774

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

Merged
merged 1 commit into from
Oct 14, 2022

Conversation

pmeier
Copy link
Collaborator

@pmeier pmeier commented Oct 14, 2022

This PR is a preparation for #6762. We started out with checking exact match between transforms v1 and v2. Thus, we needed no configurable and simply used

assert_equal = functools.partial(assert_close, rtol=0, atol=0)

Now that we are in optimization mode, there are cases where performance changes might also lead to slight numerical changes. This PR enables the option to set them on a ConsistencyConfig basis, while keeping rtol = atol = 0 as the default.

Copy link
Collaborator

@vfdev-5 vfdev-5 left a comment

Choose a reason for hiding this comment

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

Thanks !

@pmeier pmeier merged commit 8ec7a70 into pytorch:main Oct 14, 2022
facebook-github-bot pushed a commit that referenced this pull request Oct 17, 2022
Reviewed By: NicolasHug

Differential Revision: D40427452

fbshipit-source-id: 426284f54d51a996625921c679290145ec2451e7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants