Skip to content
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

More info in assert all close #58

Closed
pommedeterresautee opened this issue Sep 19, 2022 · 0 comments · Fixed by #74
Closed

More info in assert all close #58

pommedeterresautee opened this issue Sep 19, 2022 · 0 comments · Fixed by #74
Labels
benchmark Measure, measure, measure unit test Add, fix, remove UT

Comments

@pommedeterresautee
Copy link
Member

pommedeterresautee commented Sep 19, 2022

To check outputs are similar to reference implementation we use torch all close function.
To help in debugging we may want to add more info, like what is done in Triton project:

  • max diff
  • max relative diff
  • nb mismatch elements

Example from Triton:

E       AssertionError: 
E       Arrays are not almost equal to 1 decimals
E       
E       Mismatched elements: 700185 / 786432 (89%)
E       Max absolute difference: 6.9219756
E       Max relative difference: 12265.675
E        x: array([[[[ 8.0e-02, -4.7e-01, -4.6e-02, ...,  8.7e-01,  7.6e-01,
E                 -2.5e-01],
E                [ 7.6e-02, -3.2e-01,  2.3e-01, ...,  2.1e-01,  2.3e-01,...
E        y: array([[[[ 8.0e-02, -4.7e-01, -4.6e-02, ...,  8.7e-01,  7.6e-01,
E                 -2.5e-01],
E                [ 7.3e-02, -2.3e-01,  4.0e-01, ..., -2.0e-01, -9.3e-02,...


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
benchmark Measure, measure, measure unit test Add, fix, remove UT
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant