[microNPU] Add support for pack and unpack#9960
Merged
Merged
Conversation
11 tasks
7f44e4e to
aa32918
Compare
0f81893 to
05acc0c
Compare
Pack is represented by a series of `expand_dims` operations followed by a `concatenate` in Relay. Unpack is represented by a `split` followed by a series of `squeeze` operations in Relay. This commit legalizes `expand_dims` and `squeeze` to reshape operations while making use of existing legalization techniques for `split` and `concatenate` so that pack and unpack can be offloaded to the NPU. Change-Id: I3fbebb4ece5ca04598f8e587b9e6c0ddf280266d
05acc0c to
722f482
Compare
Change-Id: Ic6a9fd77b61368720328bfe82032490bcc66152c
722f482 to
9adacaa
Compare
Contributor
|
Thanks @lhutton1 . this is merged now! |
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Feb 16, 2022
* [microNPU] Add support for pack and unpack Pack is represented by a series of `expand_dims` operations followed by a `concatenate` in Relay. Unpack is represented by a `split` followed by a series of `squeeze` operations in Relay. This commit legalizes `expand_dims` and `squeeze` to reshape operations while making use of existing legalization techniques for `split` and `concatenate` so that pack and unpack can be offloaded to the NPU. Change-Id: I3fbebb4ece5ca04598f8e587b9e6c0ddf280266d * rebase and add tests for expand dims and squeeze Change-Id: Ic6a9fd77b61368720328bfe82032490bcc66152c
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.
Pack is represented by a series of
expand_dimsoperations followed by aconcatenatein Relay. Unpack is represented by asplitfollowed by a series ofsqueezeoperations in Relay. This PR legalizesexpand_dimsandsqueezeto reshape operations while making use of existing legalization techniques forsplitandconcatenateso that pack and unpack can be offloaded to the NPU.cc @manupa-arm @ekalda @jacobbohlin @NicolaLancellotti @dchauhan-arm @mbaret