-
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 U4 usecase #10785
Conversation
cc : @Mousius @areusch @grant-arm |
f370571
to
1da8837
Compare
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.
here are some early comments on this one
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 @areusch for reviews -- sorry took me a while to get back to this.
addressed most of the comments, need a bit more clarification on one.
a friendly ping for reviews... |
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 !
This commit adds support for placing I/O tensors within the workspace buffer. This is enabled using PassConfig option tir.usmp.use_workspace_io. Once it is enabled, it will remove the I/O tensors from the TIR main PrimFunc and replace them with Allocate nodes that is annotated to contain Input and Output tensors. The USMP will plan memory for them accordingly. (i.e. it will re-use space used by them for intermediaries depending on the liveness). This will only be supported with C Interface API. Thus, this commit produces two functions to the metadata sources to obtain input and output structs that points to location inside the workspace struct. Change-Id: I4c7e750ead9a880ba900602c17f53a125f97dbf9
Change-Id: I78f03d36b12b4a5e8eae8d11701f51019489defc
Change-Id: I857f3d0ba7bc192d56d750c44b232998b2876e7a
Thanks @areusch! I've addressed the comments. |
* [USMP] Adding support for U4 usecase This commit adds support for placing I/O tensors within the workspace buffer. This is enabled using PassConfig option tir.usmp.use_workspace_io. Once it is enabled, it will remove the I/O tensors from the TIR main PrimFunc and replace them with Allocate nodes that is annotated to contain Input and Output tensors. The USMP will plan memory for them accordingly. (i.e. it will re-use space used by them for intermediaries depending on the liveness). This will only be supported with C Interface API. Thus, this commit produces two functions to the metadata sources to obtain input and output structs that points to location inside the workspace struct. Change-Id: I4c7e750ead9a880ba900602c17f53a125f97dbf9 * fixup! [USMP] Adding support for U4 usecase Change-Id: I78f03d36b12b4a5e8eae8d11701f51019489defc * fixup! [USMP] Adding support for U4 usecase Change-Id: I857f3d0ba7bc192d56d750c44b232998b2876e7a
This commit adds support for placing I/O
tensors within the workspace buffer.
This is enabled using PassConfig option
tir.usmp.use_workspace_io. Once it is enabled,
it will remove the I/O tensors from the TIR
main PrimFunc and replace them with Allocate
nodes that is annotated to contain Input and
Output tensors.
The USMP will plan memory for them accordingly.
(i.e. it will re-use space used by them for
intermediaries depending on the liveness).
This will only be supported with C Interface API.
Thus, this commit produces two functions to the
metadata sources to obtain input and output structs
that points to location inside the workspace struct.
RFC PR : apache/tvm-rfcs#65