-
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] Fixed MergeConstants pass on striped networks #13281
[microNPU] Fixed MergeConstants pass on striped networks #13281
Conversation
Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment. Generated by tvm-bot |
d651284
to
fd1f6d7
Compare
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 @sergey-grovety looks great! LGTM providing CI passes. Also cc @ekalda, @NicolaLancellotti who might have more context on this
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!
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 @sergey-grovety @NicolaLancellotti! |
This PR fixes the bug in MergeConstants pass on striped networks on Ethos-U NPU. The issue was caused by _DivideConstants_ pass which is introducing new mod parameters and changing their order. So ethosu_write parameter in some cases is moved from the end of the list to the middle. E.g. from: `[ethos-u_0_i0, p1, p2, p3, p4, p5, p6, ethosu_write]` To: `[ethos-u_0_i0, p1, p2, ethosu_write, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder]` Updated version of the _GetArgsToMergeWithoutArgsNotInConstDict_ and _MakeNewConstDict_ methods in passes.cc can now correctly modify const_dict according to the new parameter list.
This PR fixes the bug in MergeConstants pass on striped networks on Ethos-U NPU. The issue was caused by _DivideConstants_ pass which is introducing new mod parameters and changing their order. So ethosu_write parameter in some cases is moved from the end of the list to the middle. E.g. from: `[ethos-u_0_i0, p1, p2, p3, p4, p5, p6, ethosu_write]` To: `[ethos-u_0_i0, p1, p2, ethosu_write, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder]` Updated version of the _GetArgsToMergeWithoutArgsNotInConstDict_ and _MakeNewConstDict_ methods in passes.cc can now correctly modify const_dict according to the new parameter list.
This PR fixes the bug in MergeConstants pass on striped networks on Ethos-U NPU.
The issue was caused by DivideConstants pass which is introducing new mod parameters and changing their order. So ethosu_write parameter in some cases is moved from the end of the list to the middle.
E.g. from:
[ethos-u_0_i0, p1, p2, p3, p4, p5, p6, ethosu_write]
To:
[ethos-u_0_i0, p1, p2, ethosu_write, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder, placeholder]
Updated version of the GetArgsToMergeWithoutArgsNotInConstDict and MakeNewConstDict methods in passes.cc can now correctly modify const_dict according to the new parameter list.
cc @leandron