[uTVM][AOT] Adding workspace byte alignment#8019
Merged
areusch merged 5 commits intoapache:mainfrom May 14, 2021
Merged
Conversation
* This commit adds byte alignment support for workspaces * Updating AoT tests to use calculate workspaces Change-Id: I88380d875269e1ffa4a51a9cceefd51b3042f1a7
* fixed aot_memory cpp tests * add new error type for stack allocator bad frees Change-Id: Iadb4770ac761ef5edb80308e18120443d269c83d
areusch
reviewed
May 13, 2021
Contributor
|
@manupa-arm thanks for putting this up! did an initial pass and left some comments |
* addressing comments + LIFO change Change-Id: I1e8ad47e11e220f879bf936da2abb3d111db89f0
* addressing comments further Change-Id: Idb07d28b55520d8897d7dbcb9ef4aad5e3e7b35c
areusch
requested changes
May 13, 2021
Contributor
areusch
left a comment
There was a problem hiding this comment.
okay did a final pass, just found one other thing, looks good otherwise.
* addressing comments - add a default constant to alignment Change-Id: Id3f486bfdc0bd57d54b3c4097885cb54675196ca
Contributor
Author
|
I think I've addressed all of you comments |
trevor-m
pushed a commit
to trevor-m/tvm
that referenced
this pull request
Jun 17, 2021
* Adding workspace byte alignment * This commit adds byte alignment support for workspaces * Updating AoT tests to use calculate workspaces Change-Id: I88380d875269e1ffa4a51a9cceefd51b3042f1a7 * Adding workspace byte alignment * fixed aot_memory cpp tests * add new error type for stack allocator bad frees Change-Id: Iadb4770ac761ef5edb80308e18120443d269c83d * Adding workspace byte alignment * addressing comments + LIFO change Change-Id: I1e8ad47e11e220f879bf936da2abb3d111db89f0 * Adding workspace byte alignment * addressing comments further Change-Id: Idb07d28b55520d8897d7dbcb9ef4aad5e3e7b35c * Adding workspace byte alignment * addressing comments - add a default constant to alignment Change-Id: Id3f486bfdc0bd57d54b3c4097885cb54675196ca
trevor-m
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Jun 17, 2021
* Adding workspace byte alignment * This commit adds byte alignment support for workspaces * Updating AoT tests to use calculate workspaces Change-Id: I88380d875269e1ffa4a51a9cceefd51b3042f1a7 * Adding workspace byte alignment * fixed aot_memory cpp tests * add new error type for stack allocator bad frees Change-Id: Iadb4770ac761ef5edb80308e18120443d269c83d * Adding workspace byte alignment * addressing comments + LIFO change Change-Id: I1e8ad47e11e220f879bf936da2abb3d111db89f0 * Adding workspace byte alignment * addressing comments further Change-Id: Idb07d28b55520d8897d7dbcb9ef4aad5e3e7b35c * Adding workspace byte alignment * addressing comments - add a default constant to alignment Change-Id: Id3f486bfdc0bd57d54b3c4097885cb54675196ca
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the AoT executor uses the stack-based allocator to allocate tensors within the provided workspace buffer. This bit of work ties up the calculated workspace size to create the correctly sized buffer to be used with stack-based allocator + AoT executor. Moreover, certain hardware platforms require the addresses of tensors to be byte aligned, thus this PR adds support for optional workspace-byte-alignment option to states that while defaulting to 1.
cc: @giuseros @Mousius @areusch