Skip to content

[AOT][Testing] Improve output mismatch information on test failure - #16765

Merged
lhutton1 merged 4 commits into
apache:mainfrom
Anndrey24:aot-print-index
Mar 25, 2024
Merged

lhutton1 merged 4 commits into
apache:mainfrom
Anndrey24:aot-print-index

Conversation

@Anndrey24

Copy link
Copy Markdown
Contributor

Enhanced AOT test harness to include overall mismatch percentage and the individual mismatch positions from the output tensor for debugging test failures. Both of these are still gated behind print_output_on_mismatch == True.
I also added tests to check for the presence and correctness of this new debug information.

Sample output:

Element [Position]: Actual, Reference
-------------------------------------
Element [0, 8, 8, 7]: 521.846313, 521.847412
Element [0, 9, 8, 51]: 478.874359, 478.875549
Element [0, 9, 9, 6]: 462.901001, 462.899658

Mismatched elements: 3 / 16384 (0.02%)
...

cc @lhutton1 @ekalda

Enhanced AOT test harness to include overall mismatch percentage and the individual mismatch positions from the output tensor for debugging test failures. Both of these are still gated behind `print_output_on_mismatch == True`.
I also added tests to check for the presence and correctness of this new debug information.
Sample output:

```
Element [Position]: Actual, Reference
-------------------------------------
Element [0, 8, 8, 7]: 521.846313, 521.847412
Element [0, 9, 8, 51]: 478.874359, 478.875549
Element [0, 9, 9, 6]: 462.901001, 462.899658

Mismatched elements: 3 / 16384 (0.02%)
...
```
@github-actions
github-actions Bot requested review from ekalda and lhutton1 March 21, 2024 17:11

@lhutton1 lhutton1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Very nice improvement, thanks @Anndrey24 :)

Comment thread python/tvm/testing/aot.py Outdated

@ekalda ekalda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @Anndrey24, LGTM!

@lhutton1
lhutton1 merged commit 9899f9c into apache:main Mar 25, 2024
@lhutton1

Copy link
Copy Markdown
Contributor

Thanks @Anndrey24 @ekalda!

@Anndrey24
Anndrey24 deleted the aot-print-index branch March 25, 2024 10:13
thaisacs pushed a commit to thaisacs/tvm that referenced this pull request Apr 3, 2024
…pache#16765)

Enhanced AOT test harness to include overall mismatch percentage and the individual mismatch positions from the output tensor for debugging test failures. Both of these are still gated behind `print_output_on_mismatch == True`.
I also added tests to check for the presence and correctness of this new debug information.
Sample output:

```
Element [Position]: Actual, Reference
-------------------------------------
Element [0, 8, 8, 7]: 521.846313, 521.847412
Element [0, 9, 8, 51]: 478.874359, 478.875549
Element [0, 9, 9, 6]: 462.901001, 462.899658

Mismatched elements: 3 / 16384 (0.02%)
...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants