[AOT] Introducing AOT in TVM#7785
Conversation
|
Thanks for this awesome contribution @giuseros, its definitely a big milestone for the project. I looked through your changes and didn't find any docs or tutorials on how to use the AOT. Although there are some tests that show it being used, I think a doc would go a long way for encouraging others to use this approach. |
areusch
left a comment
There was a problem hiding this comment.
great work @giuseros and thanks for your contribution! I left a bunch of comments, many for my understanding--so please don't take them as an over-critique of the code. I think this is definitely going in the right direction and I think most of the things to debate here are specifics.
it looks like there are a couple of renames that have landed since you've been working on this:
- DLDevice rename
- GraphExecutor rename
would be great if you could update the PR to include those changes too.
|
Hi @areusch , just back from holidays. First of all, thank you so much to be so thorough in the review. I appreciate this. Instead of a big single reply, I will gradually reply to your comments |
|
Hi @jwfromm , Thanks! |
|
Hi all,
|
areusch
left a comment
There was a problem hiding this comment.
@giuseros did another pass. GH decided that many of my previous comments are now outdated--I know best practice is to force-push iterations on your PR, but can you use git merge to sync it rather than force-pushing? I think there's enough open comments here I won't be able to keep track of them otherwise.
cc @tqchen -- we need to address this limitation with our code review tool.
|
@giuseros sorry for the delay, lots to review and stuff. I commented on our codegen thread, let's agree on a path forward for this PR, then we can launch some separate discussions about the pieces we're deferring. |
|
Hi @areusch ,
|
d5f2e81 to
218760b
Compare
|
Hi @manupa-arm , @areusch ,
Please, let me know what you think! |
areusch
left a comment
There was a problem hiding this comment.
here's another review pass, I think this is looking good. couldn't reply to your executor param comment thread while doing this review, will try after I hit submit review.
|
Hi @areusch ,
|
areusch
left a comment
There was a problem hiding this comment.
@giuseros great! took another look here. here's my thoughts:
- maybe we could just move the constants in
meta_data.hinto theincludetree? the bar for what should be there is "is it user-facing?" I think those two constants are definitely user-facing but nothing in this change promotes the other structs/classes declared there. - I left some comments about when to enable but the impl looks fine.
- merging the two seems fine. left some comments on the top-level ExecutorFactory interface.
- I sort of think the final problem could be fixed by just turning the check on all the time. alternatively, you could create a
crt_config.hfor testing and update the test include path
|
Hi @areusch , |
|
Hi @areusch , |
Change-Id: I90bced4e18259a6d42e6a406d93958e204f3859e
Change-Id: I06c9f280de0a9bf0ca5545bbbbfcc70cb66831b3
Change-Id: I739f29779862f05def36e5f3e0722019596d17f8
Change-Id: Ie736f40a5225f4e56e79006753d7732127da5408
Change-Id: I83e16068b93aaccc7a86b79d42f13328bc76b53d
Change-Id: I443d72f53913849f3c28fd6e416162d1ca99e647
Change-Id: I7fefbd0076949b9c38d0abbf2759ebf1502de330
Change-Id: Iad028144d7b394b2dd2fce41a35ca689d1680200
Change-Id: I14286e665dcdba1e9bc10bb5a27dd6ced50372b0
Change-Id: I7b4c966da9680870ceda1704c749ee3bdc751926
Change-Id: Icf62128a604998ed1b7d5af4cbeadf7d39196d0b
|
@manupa-arm please take another look and explicitly approve if you're okay with this! |
|
thanks @giuseros for your hard work on this effort and for bearing with me through a long review! and thanks @manupa-arm @jroesch @tqchen @tkonolige @jwfromm for helping to review the PR! |
This change adds the code generation and minimal runtime API to use the
Ahead Of Time (AOT) compilation flow. The main logic is contained in:
Which produces a TIR PrimFunc traversing the Relay graph
The runtime interface (authored by @Mousius) leaves a gap for future
iterations using platform-specific features from RTOS.
Currently AOT runs successfully on x86 in a host OS, running these
tests on micro is coming soon.
This PR is based on the RFC described here: https://discuss.tvm.apache.org/t/implementing-aot-in-tvm/9206
Co-authored-by: Christopher Sidebottom Christopher.Sidebottom@arm.com