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] Fix output mismatch in Leaky ReLU #11397

Merged
merged 3 commits into from
Jun 6, 2022

Conversation

lhutton1
Copy link
Contributor

@lhutton1 lhutton1 commented May 20, 2022

All codegen tests have been running with a representative dataset between 0,1 which masked an output mismatch in Leaky ReLU when compared to TFLite kernels. This issue can be replicated by replacing the representative dataset range with something like -1,1.

To fix this mismatch, we use the same implementation for calculating LUT values as Vela which uses arithmetic constrained to quantized values, rather than the previously used floating point calculations.

cc @Mousius @NicolaLancellotti @ekalda @manupa-arm

@github-actions github-actions bot requested review from manupak and Mousius May 20, 2022 16:12
Copy link
Contributor

@NicolaLancellotti NicolaLancellotti 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.

LGTM!

lhutton1 added 2 commits June 1, 2022 15:04
All codegen tests have been running with a representative dataset
between 0,1 which masked an output mismatch in Leaky ReLU when compared
to TFLite kernels. This issue can be replicated by replacing the
representative dataset range with something like -1,1.

To fix this mismatch, we use the same implementation for calculating
LUT values as Vela which uses arithmetic constrained to quantized
values, rather than the previously used floating point calculations.

Change-Id: I0ed52215acd27722873be609271971b6fc4aaef1
Change-Id: Ica7de0c000ee015e79fe10985b2ec7a9b341861f
Change-Id: I005d90ad248bfff7090f99d161eefbdc962cba48
@lhutton1 lhutton1 merged commit 609d6af into apache:main Jun 6, 2022
@lhutton1
Copy link
Contributor Author

lhutton1 commented Jun 6, 2022

Thanks @NicolaLancellotti @manupa-arm

@lhutton1 lhutton1 deleted the fix-leaky-relu branch June 6, 2022 12:29
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