Skip to content
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 requantize #9910

Merged
merged 4 commits into from
Jan 24, 2022
Merged

Conversation

lhutton1
Copy link
Contributor

Adds support for stand-alone requantize operation which is legalized to an identity operation on the NPU.

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

Copy link
Contributor

@jacobbohlin jacobbohlin left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

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

Mostly looks good!.
One question and a request to add a further test.

Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

Some nits, but otherwise looks good! :)

tests/python/contrib/test_ethosu/test_codegen.py Outdated Show resolved Hide resolved
tests/python/contrib/test_ethosu/test_legalize.py Outdated Show resolved Hide resolved
@lhutton1 lhutton1 force-pushed the requantize branch 2 times, most recently from 057e998 to 4a151cd Compare January 21, 2022 09:31
Copy link
Contributor

@manupak manupak left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@ekalda ekalda left a comment

Choose a reason for hiding this comment

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

LGTM! :)

Adds support for stand-alone requantize operation which is legalized to
an identity operation on the NPU.

Change-Id: Ie2450c5fc72f405eddf517593236074aa4716c3b
Since requantize is now offloaded, concatenate tests were failing
due a reference not being used.

Change-Id: I44b26b5daecfefb776ca19e6646f3690f5570f52
Change-Id: I60a3283461a7a7083c05289e84f570698388077b
Change-Id: I7196a0fa468eb7c6a96f2b8a68f3a2dcf5a5693c
@lhutton1
Copy link
Contributor Author

lhutton1 commented Jan 21, 2022

Failure in test_autotune seems unrelated...

>           assert tuner.best_flops > 0
E           assert 0 > 0
E            +  where 0 = <tvm.autotvm.tuner.ga_tuner.GATuner object at 0x7fea7f3f2400>.best_flops

Retriggering.

@github-actions github-actions bot requested a review from manupak January 21, 2022 16:46
@masahi masahi merged commit 74a2fa8 into apache:main Jan 24, 2022
@lhutton1 lhutton1 deleted the requantize branch January 24, 2022 09:06
yuanfz98 pushed a commit to yuanfz98/tvm that referenced this pull request Jan 24, 2022
* [microNPU] Add support for requantize

Adds support for stand-alone requantize operation which is legalized to
an identity operation on the NPU.

Change-Id: Ie2450c5fc72f405eddf517593236074aa4716c3b

* fix concatenate tests failing due to not being bit exact

Since requantize is now offloaded, concatenate tests were failing
due a reference not being used.

Change-Id: I44b26b5daecfefb776ca19e6646f3690f5570f52

* test multiple requantize offload

Change-Id: I60a3283461a7a7083c05289e84f570698388077b

* address comments

Change-Id: I7196a0fa468eb7c6a96f2b8a68f3a2dcf5a5693c
ylc pushed a commit to ylc/tvm that referenced this pull request Feb 16, 2022
* [microNPU] Add support for requantize

Adds support for stand-alone requantize operation which is legalized to
an identity operation on the NPU.

Change-Id: Ie2450c5fc72f405eddf517593236074aa4716c3b

* fix concatenate tests failing due to not being bit exact

Since requantize is now offloaded, concatenate tests were failing
due a reference not being used.

Change-Id: I44b26b5daecfefb776ca19e6646f3690f5570f52

* test multiple requantize offload

Change-Id: I60a3283461a7a7083c05289e84f570698388077b

* address comments

Change-Id: I7196a0fa468eb7c6a96f2b8a68f3a2dcf5a5693c
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.

5 participants