-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[USMP] adding support for U2 and U3 usecases #10193
Conversation
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
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.
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 |
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.
* \file tvm/relay/executor.h | |
* \file tvm/ir/memory_pools.h |
python/tvm/ir/memory_pools.py
Outdated
# 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" |
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.
# 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" |
include/tvm/ir/memory_pools.h
Outdated
/*! | ||
* \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"; |
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.
/*! | |
* \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
@Mousius I think I've addressed the comments (Thanks! for catching that!). PTAL when you have some time. |
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.
LGTM!
Thanks @manupa-arm 😸 |
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 fixes the undefined reference build error again. This was originally fixed in apache#10147 but was accidentally reverted in apache#10193
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 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.