-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Ethos-U] Replace ethos-u.constants with AllocateConst #15300
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
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 |
|
This change originated while debugging #14985, but ended up being unnecessary for it, and is therefore kept as a separate PR. |
3af8087 to
35ddc1a
Compare
ekalda
left a comment
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 these improvements @Lunderberg! Looks like it needs a rebase and I'm not sure the changes to codegen_c_host.cc and split_host_device.cc were intentional for this this patch, but otherwise looks all good to me!
|
Thank you for catching the extra changes in this PR. The |
5133f46 to
77a50e9
Compare
Previously, constants for ethos-u were tracked using a function attribute `"ethos-u.constants"`. This predates the introduction of `AllocateConst`, and had comments indicating that it should be replaced with `AllocateConst` when possible. To minimize impact to existing passes, this commit preserves the `"ethos-u.constants"` attribute during ethosu-specific lowering passes. The attribute is converted to `AllocateConst` at the end of the `lower_ethosu` pass, just prior to lowering with the usual TIR passes.
2c8b757 to
f1a16c8
Compare
Previously, constants for ethos-u were tracked using a function attribute
"ethos-u.constants". This predates the introduction ofAllocateConst, and had comments indicating that it should be replaced withAllocateConstwhen possible.To minimize impact to existing passes, this commit preserves the
"ethos-u.constants"attribute during ethosu-specific lowering passes. The attribute is converted toAllocateConstat the end of thelower_ethosupass, just prior to lowering with the usual TIR passes.