-
Notifications
You must be signed in to change notification settings - Fork 112
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
Finalize the semantics of storage_min
, storage_max
#1406
Comments
storage_min
, storage_max
storage_min
, storage_max
storage_min
, storage_max
storage_min
, storage_max
From the POV of the semantics of an op producing quantized results, the relevance
My personal opinion: The above constraint seems sufficiently general to accommodate the existing implementations (e.g. TFLite) as well as allow the adoption of new or experimental quantization schemes. The op semantics should not add additional constraints unless there is a strong reason to do that. Having said that, The proposal will be almost same as before except that it does not have any additional constraint imposed by the op's semantics on Please let me know your feedback and/or feel free to review the |
## Summary The PR proposes the specification for quantized add op. ## A few details At some point we [decided](#1352 (comment)) to drop the introduction of the specification of this op mainly because we were unsure about the fate of #1406. Please have a look at my revised proposal on #1406 and let me know if I am missing something. Otherwise, let us review this op and let me know your feedback. Side note: For those who are already aware of the context of prior introduction of this op, please note that the current proposal is almost same as before except that it does not have any additional constraint imposed by the op's semantics on `storage_min` or `storage_max`.
Here are some pointers regarding the "narrow_range" INT8 feature in TFLite. Op specs: https://www.tensorflow.org/lite/performance/quantization_spec
Essentially, the symmetric INT8 quantization is designed not to use the value 128 (I heard it was for leveraging some fast ARM instruction to implement the INT8 kernels). The quantizer and TFL dialect MLIR importer also incorporate this feature. |
@jingpu Thanks for your comment and explaining on the narrow range on INT8 quantization feature in TFLite. I note that the current spec expects default values of Having said that, I am wondering, as the default value of Please let me know your feedback! |
Sorry. I am a bit confused by what the proposal is. During the meeting last week, I thought the proposal was to drop |
Hi @jingpu
I agree with you that if the allowed values are only I think the description of the issue is misleading. I have updated the issue description to avoid any confusion. |
Thanks for the clarification. I don't have a strong preference between the two because I don't depend on the TFLite narrow_range feature in my work and don't have the full context about it either. |
The current spec allows the |
The goal of this ticket is to investigate whether or not the quantized type specification should limit the allowed values of
storage_min
andstorage_max
. Currently, the allowed values are limited to[min_value(storage_type, max_value(storage_type]
, but this limit may not be followed by some use cases.Please refer to ref to follow the discussion.
update
The current spec expects default values of
min_value(storage_type)
andmax_value(storage_type)
forstorage_min
andstorage_max
resp., if they are not explicitly provided. Moreover, the specification documents the following general constraint onstorage_min
andstorage_max
The text was updated successfully, but these errors were encountered: