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] Adding rounding mode attribute to operators #9514

Merged
merged 2 commits into from
Nov 17, 2021

Conversation

lhutton1
Copy link
Contributor

Allows rounding mode to be specified for each supported operator. By default "TFL" is used, which matches that of the behavior of TFLite. Other rounding mode options include "NATURAL" which rounds to the nearest value and "TRUNCATE" which rounds towards zero.

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

Allows rounding mode to be specified for each supported operator.
By default "TFL" is used, which matches that of the behavior of TFLite.
Other rounding mode options include "NATURAL" which rounds to the
nearest value and "TRUNCATE" which rounds towards zero.

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

Looks great to me! Thanks @lhutton1 .

I see that the PR adds functionality to successfully convey the round mode to Vela APIs. However, I assume it would be hard to test it ? In that case, will there be a subsequent PR that uses this feature E2E ?

@lhutton1
Copy link
Contributor Author

Thanks @NicolaLancellotti, @manupa-arm for the reviews! Yes, I think it would be quite difficult to test each rounding scheme fully. The implementation of MEAN would rely on all three schemes being used, so this would be a good E2E test.

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! Thank you @lhutton1

@manupak manupak merged commit e9b6845 into apache:main Nov 17, 2021
@manupak
Copy link
Contributor

manupak commented Nov 17, 2021

Thanks @lhutton1 @NicolaLancellotti . This is merged now!.

@lhutton1 lhutton1 deleted the add-rounding-mode-attribute branch November 17, 2021 12:51
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* [microNPU] Adding rounding mode attribute to operators

Allows rounding mode to be specified for each supported operator.
By default "TFL" is used, which matches that of the behavior of TFLite.
Other rounding mode options include "NATURAL" which rounds to the
nearest value and "TRUNCATE" which rounds towards zero.
mehrdadh pushed a commit to mehrdadh/tvm that referenced this pull request Dec 1, 2021
* [microNPU] Adding rounding mode attribute to operators

Allows rounding mode to be specified for each supported operator.
By default "TFL" is used, which matches that of the behavior of TFLite.
Other rounding mode options include "NATURAL" which rounds to the
nearest value and "TRUNCATE" which rounds towards zero.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 7, 2022
* [microNPU] Adding rounding mode attribute to operators

Allows rounding mode to be specified for each supported operator.
By default "TFL" is used, which matches that of the behavior of TFLite.
Other rounding mode options include "NATURAL" which rounds to the
nearest value and "TRUNCATE" which rounds towards zero.
yangulei pushed a commit to yangulei/tvm that referenced this pull request Jan 11, 2022
* [microNPU] Adding rounding mode attribute to operators

Allows rounding mode to be specified for each supported operator.
By default "TFL" is used, which matches that of the behavior of TFLite.
Other rounding mode options include "NATURAL" which rounds to the
nearest value and "TRUNCATE" which rounds towards zero.
ylc pushed a commit to ylc/tvm that referenced this pull request Jan 13, 2022
* [microNPU] Adding rounding mode attribute to operators

Allows rounding mode to be specified for each supported operator.
By default "TFL" is used, which matches that of the behavior of TFLite.
Other rounding mode options include "NATURAL" which rounds to the
nearest value and "TRUNCATE" which rounds towards zero.
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.

None yet

3 participants