-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[microNPU] Refactor codegen tests #9623
Conversation
cc @ekalda @lhutton1 @NicolaLancellotti @dchauhan-arm - let me know what you think :) |
broadly LGTM! Especially the change to making printing the command stream be optional so it doesn't print a novel in the logs. Just a few minor Q's inline |
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 doing the refactor, looks much better 😅 Other than resolving the test failures and rebasing on top of #9597, looks good!
def _compare_ethosu_with_reference( | ||
mod, input_data, output_data, accel_type, output_tolerance=0, print_cmm=False | ||
): |
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 was wondering if maybe this and the other helper functions could go to some more common location where they would be accessible to other files as well, so that we can make use of them in other tests that follow similar pattern, namely the tests in test_lookup_table.py
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.
Good point, I believe this would also be useful for the tests in #9561 :)
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.
Agreed, I think we should move it to the 'end_to_end' infra when we add that directory.
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.
Can we make these changes so that the tests use the same convention?
Change-Id: I9c08520c9e03eb3fc32bd911b56c95981e851b4b
Change-Id: I8cea69ed3824c3a0417bb67abbabce460c17c4c6
Change-Id: Iadf048e9590e724d73c2adac51bbe303de6f59a8
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.
LGTM! Thanks for the refactor @mbaret
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 @mbaret, a very welcomed refactor :) LGTM modulo others comments!
Change-Id: I56d647d86e3d495abe38b13cca349a71ec81cf4d
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.
LGTM! Thanks @mbaret
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.
LGTM!
Thanks @mbaret @ekalda @lhutton1 @NicolaLancellotti @dchauhan-arm !. This is merged now! |
* [microNPU] Refactor codegen tests Change-Id: I9c08520c9e03eb3fc32bd911b56c95981e851b4b * Fix params Change-Id: I8cea69ed3824c3a0417bb67abbabce460c17c4c6 * Remove prints Change-Id: Iadf048e9590e724d73c2adac51bbe303de6f59a8 * Address review comments Change-Id: I56d647d86e3d495abe38b13cca349a71ec81cf4d
* [microNPU] Refactor codegen tests Change-Id: I9c08520c9e03eb3fc32bd911b56c95981e851b4b * Fix params Change-Id: I8cea69ed3824c3a0417bb67abbabce460c17c4c6 * Remove prints Change-Id: Iadf048e9590e724d73c2adac51bbe303de6f59a8 * Address review comments Change-Id: I56d647d86e3d495abe38b13cca349a71ec81cf4d
* [microNPU] Refactor codegen tests Change-Id: I9c08520c9e03eb3fc32bd911b56c95981e851b4b * Fix params Change-Id: I8cea69ed3824c3a0417bb67abbabce460c17c4c6 * Remove prints Change-Id: Iadf048e9590e724d73c2adac51bbe303de6f59a8 * Address review comments Change-Id: I56d647d86e3d495abe38b13cca349a71ec81cf4d
* [microNPU] Refactor codegen tests Change-Id: I9c08520c9e03eb3fc32bd911b56c95981e851b4b * Fix params Change-Id: I8cea69ed3824c3a0417bb67abbabce460c17c4c6 * Remove prints Change-Id: Iadf048e9590e724d73c2adac51bbe303de6f59a8 * Address review comments Change-Id: I56d647d86e3d495abe38b13cca349a71ec81cf4d
* [microNPU] Refactor codegen tests Change-Id: I9c08520c9e03eb3fc32bd911b56c95981e851b4b * Fix params Change-Id: I8cea69ed3824c3a0417bb67abbabce460c17c4c6 * Remove prints Change-Id: Iadf048e9590e724d73c2adac51bbe303de6f59a8 * Address review comments Change-Id: I56d647d86e3d495abe38b13cca349a71ec81cf4d
The codegen tests had a lot of replicated functionality due to them being developed concurrently. This refactor consolidates those commonalities.