-
Notifications
You must be signed in to change notification settings - Fork 646
[Backend Tester] Add tensor error statistic reporting #12809
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
base: main
Are you sure you want to change the base?
Conversation
ghstack-source-id: 63819cb ghstack-comment-id: 3112003831 Pull-Request: pytorch#12809
actual = actual.to(torch.float64) | ||
reference = reference.to(torch.float64) | ||
|
||
if actual.shape != reference.shape: |
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.
Why is this not an error?
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.
There are some cases where in-place ops get functionalized and alter the graph outputs. This is an issue with the defunctionalization logic in ET (there's a separate issue I filed). It's not technically the backend's fault but is a real issue. I should probably just disable the affected tests for now and treat this as an error. I'll do that.
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.
Filed #13336 as a follow-up. Will stack this change on top.
Report various error statistics for the test outputs, including SQNR, mean absolute error (MAE), and L2 norm. These are saved in the detail report per test case.
As an example, here is the output from Core ML running MobileNet V2 (roughly formatted from csv -> sheets -> markdown):