-
Notifications
You must be signed in to change notification settings - Fork 836
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
feat(compression): implement tensor decompression in op concatenation #3014
Conversation
Implement tensor decompression in op concatenation. Extend tests to validate operation on compressed tensors. BUG=part of tensorflow#2636
output_tensor->params.zero_point); | ||
} else if (input_type == kTfLiteInt16) { | ||
// Make sure that all Int16 inputs have a null zero-point. | ||
TF_LITE_ENSURE_EQ(context, input->params.zero_point, 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why the scale is not checked in the int16 case? AFAICS the (at least the reference) concatenation kernel does not take into account any scaling/quantization at all.
inline void Concatenation(const ConcatenationParams& params, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with your conclusion, however this is a copy-paste of the TfLite code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, also is there are reason why it has to be zero? Seems that concatenation in general shouldn't care about quantization parameters, as long as they match in and out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tinskip This same check is performed by the LiteRT (TfLite) reference implementation.
Implement tensor decompression in op concatenation. Extend
tests to validate operation on compressed tensors.
BUG=part of #2636