-
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
[microNPU] Add support for pack and unpack #9960
Merged
Merged
Conversation
This file contains 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
lhutton1
requested review from
anijain2305,
areusch,
comaniac,
icemelon,
jroesch,
junrushao,
jwfromm,
MarisaKirisame,
mbrookhart,
merrymercy,
slyubomirsky,
tqchen,
vinx13,
wweic,
yzhliu,
zhiics and
ZihengJiang
as code owners
January 18, 2022 14:53
11 tasks
lhutton1
force-pushed
the
pack-and-unpack
branch
2 times, most recently
from
January 24, 2022 14:22
7f44e4e
to
aa32918
Compare
lhutton1
force-pushed
the
pack-and-unpack
branch
4 times, most recently
from
January 31, 2022 21:04
0f81893
to
05acc0c
Compare
NicolaLancellotti
approved these changes
Feb 4, 2022
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!
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
lhutton1
force-pushed
the
pack-and-unpack
branch
from
February 7, 2022 10:19
05acc0c
to
722f482
Compare
Change-Id: Ic6a9fd77b61368720328bfe82032490bcc66152c
lhutton1
force-pushed
the
pack-and-unpack
branch
from
February 8, 2022 10:44
722f482
to
9adacaa
Compare
manupak
approved these changes
Feb 9, 2022
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 @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
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_dims
operations followed by aconcatenate
in Relay. Unpack is represented by asplit
followed by a series ofsqueeze
operations in Relay. This PR legalizesexpand_dims
andsqueeze
to reshape operations while making use of existing legalization techniques forsplit
andconcatenate
so that pack and unpack can be offloaded to the NPU.cc @manupa-arm @ekalda @jacobbohlin @NicolaLancellotti @dchauhan-arm @mbaret