-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[TIR][USMP] Integrating USMP to AoT Executor #9565
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
6c1eb12 to
3b04e8e
Compare
|
Putting this to draft as it contains the contents of the dependent PRs (See above) |
3b04e8e to
b029fbe
Compare
b029fbe to
581f50b
Compare
dfa7c93 to
51c0816
Compare
This commit intergrates USMP with the AoT executor codegen. Additionally, this commit introduces two PassContext options to disable_usmp and disable_storage_rewrite. Change-Id: I98d905fab7f49c2de52e126115953a40b0821e21
* This commit breaks out the USMP related tests to test_crt_aot_usmp.py. * Switched the polarity of the pass config option to explicitly enable USMP rather than disable. Change-Id: Id4bf35b18479b70924ec24e6bb7ba2682b05326e
* Swap pool var and output var ordering in the main function Change-Id: Id03748e6f3528399a0ddd9cc2d011adfcee8d554
* Improving comments * Changing the usage of tir Bool to just plain bool Change-Id: I907cf9a0befa172183ae488bb3b94660aad39807
* fixing unit tests to scope With<Target> * removing global sanitization of var names Change-Id: Ifa8934f94744eeaac13e4b4ddcd671842c3dcb21
* changing unpacked_api to accept PrimFunc without buffer_maps. Change-Id: I97e8df5272df7f1f8313f184aa660924989940e3
* Restoring the conditional behaviour as we are getting PrimFuncs without buffer maps. Change-Id: Icd374353e0947515c523d506c1e7c02cf5d930b4
* Adds tir includes to source_module.cc Change-Id: I8ad5654ea32abb3aabc0fcc9ef8157a609e9d2dc
* fixing c device api tests Change-Id: I47ac38b5664a00f36b293a0d9d96330d4206173d
* moving algo/algo.h to algorithms.h * creating two functions for USMP and StorageRewrite * expanding codegen variable names to more descriptive * removing unncessary print functions and print statements * re-using relay::backend::SanitizeName Change-Id: I890caa0104c07a4883eb0c34d3bfcfb8bb56653f
Moving PrintType from codegen_c.cc to codegen_source_base.cc to be accessible by source_module.cc Change-Id: Icb6a85de4c26110d2fea370fbd75e02a3639de59
Moving runtime::metadata to be ExecutorCodegeMetadata as it contains metadata produced by ExecutorCodegen for actual codegeneration (not a runtime component). Change-Id: I13e95573ef331fb995281dbe220db01a7aa91add
Remove unused function declaration Change-Id: Ib274553938eb5c82fe2b30cecc982481cff3937d
* Remove unncessary header file inclusion Change-Id: I5575d6226baa74fe09dce1c71176e557d84f669a
51c0816 to
526f307
Compare
|
This is now green! and I think I've addresses your comments. Could you take another look when you have some time ? |
Mousius
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.
Just minor comments from me, I think the rest of my comments were dealt with 😸
* fixed a typo * Improved consistenty with arg names for type printers Change-Id: I25263831c8bbfa11e6e0d6f8f8dd998d254294ff
areusch
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 @manupa-arm!
| os << "float"; | ||
| return; | ||
| } | ||
| if (type.bits() == 64) { |
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.
should this have an else CHECK(false)? same question elsewhere
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 just moving the already existing implementation to the base class :).
Moreover, there was a LOG(FATAL) at the bottom that should cover this case anyway.
|
@Mousius do you think we could merge this one ? |
Mousius
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.
@Mousius do you think we could merge this one ?
Definitely @manupa-arm! Thanks for the reviews from @mbs-octoml and @areusch!
This commit integrates USMP with the AoT executor codegen. Additionally, this commit introduces two PassContext options to disable_usmp and disable_storage_rewrite. Moved PrintType from codegen_c.cc to codegen_source_base.cc to be accessible by source_module.cc Moved runtime::metadata to be ExecutorCodegeMetadata as it contains metadata produced by ExecutorCodegen for actual code generation (not a runtime component).
This commit integrates USMP with the AoT executor codegen. Additionally, this commit introduces two PassContext options to disable_usmp and disable_storage_rewrite. Moved PrintType from codegen_c.cc to codegen_source_base.cc to be accessible by source_module.cc Moved runtime::metadata to be ExecutorCodegeMetadata as it contains metadata produced by ExecutorCodegen for actual code generation (not a runtime component).
This commit integrates USMP with the AoT executor codegen. Additionally, this commit introduces two PassContext options to disable_usmp and disable_storage_rewrite. Moved PrintType from codegen_c.cc to codegen_source_base.cc to be accessible by source_module.cc Moved runtime::metadata to be ExecutorCodegeMetadata as it contains metadata produced by ExecutorCodegen for actual code generation (not a runtime component).
RFC : https://github.com/apache/tvm-rfcs/blob/main/rfcs/0009_Unified_Static_Memory_Planning.md
This commit integrates the USMP to AoT executor codegen as a Pass.
It also introduces two PassContext options to disable USMP as well as
StorageRewrite passes. Currently it will only support U1 usecase where
TVM internally generates a workspace buffer. The creation of constant
buffers will be added when we have tir.allocate_const support.