Skip to content

[microNPU] Add support for nearest neighbor and bilinear upsampling#9841

Merged
manupak merged 2 commits into
apache:mainfrom
lhutton1:initial-upsampling-support
Jan 31, 2022
Merged

[microNPU] Add support for nearest neighbor and bilinear upsampling#9841
manupak merged 2 commits into
apache:mainfrom
lhutton1:initial-upsampling-support

Conversation

@lhutton1

@lhutton1 lhutton1 commented Jan 5, 2022

Copy link
Copy Markdown
Contributor

Adds support for 2x2 nearest neighbor and bilinear upsampling. In the case of bilinear upsampling with align_corners set to true, the upsampling size must be 2*input_size - 1 (as opposed to 2*input_size).

cc @ekalda @mbaret @jacobbohlin @NicolaLancellotti @dchauhan-arm @manupa-arm

@ekalda ekalda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, @lhutton1! I know that there are bits that might still change, but in general LGTM, just some clarifying questions!

Comment thread python/tvm/relay/op/contrib/ethosu.py
Comment thread python/tvm/relay/backend/contrib/ethosu/util.py Outdated
Comment thread python/tvm/relay/backend/contrib/ethosu/legalize.py Outdated
Comment thread python/tvm/relay/op/contrib/ethosu.py

@lhutton1 lhutton1 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review @ekalda, as mentioned there will be a follow up which makes a lot of improvement on the first attempt.

Comment thread python/tvm/relay/backend/contrib/ethosu/legalize.py Outdated
Comment thread python/tvm/relay/backend/contrib/ethosu/util.py Outdated
Comment thread python/tvm/relay/op/contrib/ethosu.py
Comment thread python/tvm/relay/op/contrib/ethosu.py
@lhutton1 lhutton1 force-pushed the initial-upsampling-support branch from a8fecc9 to 038b4a7 Compare January 17, 2022 16:34
@lhutton1

Copy link
Copy Markdown
Contributor Author

As mentioned previously, a revised implementation has been pushed which removes the need for upscale_height and upscale_width to be passed to operator definitions, as well as correctly modeling the data dependency of upscaling in TE (previously not done), PTAL!

Adds support for 2x2 nearest neighbor and bilinear upsampling. In the
case of bilinear upsampling with align_corners set to true, the
upsampling size must be `2*input_size - 1` (as opposed to `2*input_size`).

Change-Id: I95d215eabfaac983629dcdedcda2b90efb8e0ddf
Change-Id: I840d8ee3671a40c5c99f22119442c349dbed39cf
@lhutton1 lhutton1 force-pushed the initial-upsampling-support branch from 038b4a7 to 5b41a6b Compare January 26, 2022 10:44
@github-actions github-actions Bot requested review from manupak and mbaret January 26, 2022 10:44

@manupak manupak left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@manupak manupak merged commit 02a7a41 into apache:main Jan 31, 2022
@manupak

manupak commented Jan 31, 2022

Copy link
Copy Markdown
Contributor

Thanks all! this is merged!.

@lhutton1 lhutton1 deleted the initial-upsampling-support branch January 31, 2022 16:25
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
…pache#9841)

* [microNPU] Add support for nearest neighbor and bilinear upsampling

Adds support for 2x2 nearest neighbor and bilinear upsampling. In the
case of bilinear upsampling with align_corners set to true, the
upsampling size must be `2*input_size - 1` (as opposed to `2*input_size`).

Change-Id: I95d215eabfaac983629dcdedcda2b90efb8e0ddf

* rebase and add support for no-upsampling case.

Change-Id: I840d8ee3671a40c5c99f22119442c349dbed39cf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants