[microNPU] Adding rounding mode attribute to operators#9514
Merged
Conversation
NicolaLancellotti
requested changes
Nov 16, 2021
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
5f8a19c to
393ac8b
Compare
manupak
approved these changes
Nov 17, 2021
manupak
left a comment
Contributor
There was a problem hiding this comment.
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 ?
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. |
NicolaLancellotti
approved these changes
Nov 17, 2021
NicolaLancellotti
left a comment
Contributor
There was a problem hiding this comment.
LGTM! Thank you @lhutton1
Contributor
|
Thanks @lhutton1 @NicolaLancellotti . This is merged now!. |
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.
This file contains hidden or 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
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.
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