[USMP] adding support for U2 and U3 usecases#10193
Merged
Mousius merged 7 commits intoapache:mainfrom Feb 14, 2022
Merged
Conversation
21 tasks
This commit adds a MemoryPools argument for the compilation flow according to RFC0029. Moreover, it is used to provide support for external pools from the application layer that could be pinned for different memories and/or be reused between multiple inferences of a model. Change-Id: I7faf88e209cae442241e98b2c94e28da52efff92
* fixing black lint errors Change-Id: Ifa96f1b5104f8313bb993cde067bd8f0d74a0c3f
* Fixing cpp tests * Adding more cpp tests for workspace pool struct Change-Id: I557d5f989b06983927fce7dc820ed106967c595a
* fixing python test descriptions Change-Id: I9b9809d75b6c2c1de4ef07a7f5429daf215edf7a
* fix qemu tests Change-Id: Ib534b7f748bf48a100649bf34a46193d79e712e1
* fix aot test utils usages to provide a target Change-Id: I001696fa103444bbcf3af2cb1bb26d9c33e2f9f1
Contributor
Author
Mousius
requested changes
Feb 10, 2022
Member
Mousius
left a comment
There was a problem hiding this comment.
Argh! There's a few typos but after that it looks good, much boilerplate for the nodes 😿
include/tvm/ir/memory_pools.h
Outdated
| */ | ||
|
|
||
| /*! | ||
| * \file tvm/relay/executor.h |
Member
There was a problem hiding this comment.
Suggested change
| * \file tvm/relay/executor.h | |
| * \file tvm/ir/memory_pools.h |
Comment on lines
77
to
84
| # The string parameter to indicate read and write access to a pool | ||
| # This needs to be kept in sync with kTargetPoolReadWriteAccess in | ||
| # include/tvm/tir/usmp/utils.h | ||
| READ_WRITE_ACCESS = "rw" | ||
| # The string parameter to indicate read only access to a pool | ||
| # This needs to be kept in sync with kTargetPoolReadOnlyAccess in | ||
| # include/tvm/tir/usmp/utils.h | ||
| READ_ONLY_ACCESS = "ro" |
Member
There was a problem hiding this comment.
Suggested change
| # The string parameter to indicate read and write access to a pool | |
| # This needs to be kept in sync with kTargetPoolReadWriteAccess in | |
| # include/tvm/tir/usmp/utils.h | |
| READ_WRITE_ACCESS = "rw" | |
| # The string parameter to indicate read only access to a pool | |
| # This needs to be kept in sync with kTargetPoolReadOnlyAccess in | |
| # include/tvm/tir/usmp/utils.h | |
| READ_ONLY_ACCESS = "ro" | |
| # The string parameter to indicate read and write access to a pool | |
| # This needs to be kept in sync with kTargetPoolReadWriteAccess in | |
| # include/tvm/ir/memory_pools.h | |
| READ_WRITE_ACCESS = "rw" | |
| # The string parameter to indicate read only access to a pool | |
| # This needs to be kept in sync with kTargetPoolReadOnlyAccess in | |
| # include/tvm/ir/memory_pools.h | |
| READ_ONLY_ACCESS = "ro" |
Comment on lines
108
to
119
| /*! | ||
| * \brief The string parameter to indicate read and write access to a pool | ||
| * This needs to be kept in sync with PoolInfo.READ_WRITE_ACCESS in | ||
| * python/tvm/tir/usmp/utils.py | ||
| */ | ||
| static constexpr const char* kTargetPoolReadWriteAccess = "rw"; | ||
| /*! | ||
| * \brief The string parameter to indicate read only access to a pool | ||
| * This needs to be kept in sync with PoolInfo.READ_ONLY_ACCESS in | ||
| * python/tvm/tir/usmp/utils.py | ||
| */ | ||
| static constexpr const char* kTargetPoolReadOnlyAccess = "ro"; |
Member
There was a problem hiding this comment.
Suggested change
| /*! | |
| * \brief The string parameter to indicate read and write access to a pool | |
| * This needs to be kept in sync with PoolInfo.READ_WRITE_ACCESS in | |
| * python/tvm/tir/usmp/utils.py | |
| */ | |
| static constexpr const char* kTargetPoolReadWriteAccess = "rw"; | |
| /*! | |
| * \brief The string parameter to indicate read only access to a pool | |
| * This needs to be kept in sync with PoolInfo.READ_ONLY_ACCESS in | |
| * python/tvm/tir/usmp/utils.py | |
| */ | |
| static constexpr const char* kTargetPoolReadOnlyAccess = "ro"; | |
| /*! | |
| * \brief The string parameter to indicate read and write access to a pool | |
| * This needs to be kept in sync with PoolInfo.READ_WRITE_ACCESS in | |
| * python/tvm/ir/memory_pools.py | |
| */ | |
| static constexpr const char* kTargetPoolReadWriteAccess = "rw"; | |
| /*! | |
| * \brief The string parameter to indicate read only access to a pool | |
| * This needs to be kept in sync with PoolInfo.READ_ONLY_ACCESS in | |
| * python/tvm/ir/memory_pools.py | |
| */ | |
| static constexpr const char* kTargetPoolReadOnlyAccess = "ro"; |
* fixing typos Change-Id: Ifd9634983117aba5b7357deaa9c626eee7584de1
Contributor
Author
|
@Mousius I think I've addressed the comments (Thanks! for catching that!). PTAL when you have some time. |
Member
|
Thanks @manupa-arm 😸 |
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Feb 16, 2022
This commit adds a MemoryPools argument for the compilation flow according to RFC0029. Moreover, it is used to provide support for external pools from the application layer that could be pinned for different memories and/or be reused between multiple inferences of a model.
yelite
added a commit
to yelite/tvm
that referenced
this pull request
Feb 16, 2022
This fixes the undefined reference build error again. This was originally fixed in apache#10147 but was accidentally reverted in apache#10193
pfk-beta
pushed a commit
to pfk-beta/tvm
that referenced
this pull request
Apr 11, 2022
This commit adds a MemoryPools argument for the compilation flow according to RFC0029. Moreover, it is used to provide support for external pools from the application layer that could be pinned for different memories and/or be reused between multiple inferences of a model.
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.
This commit adds a MemoryPools argument for
the compilation flow according to RFC0029.
Moreover, it is used to provide support for
external pools from the application layer
that could be pinned for different memories
and/or be reused between multiple inferences.