Skip to content

Adding streaming_conv reference code. #2521

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

Merged
merged 9 commits into from
Apr 23, 2024

Conversation

cad-audio
Copy link
Contributor

@cad-audio cad-audio commented Mar 26, 2024

BUG=b/327502734

@cad-audio cad-audio requested a review from a team as a code owner March 26, 2024 16:01
Copy link
Contributor

@rascani rascani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, just a few minor comments.

@@ -120,9 +120,11 @@ TFLMRegistration Register_CONV_2D() {
return tflite::micro::RegisterOp(ConvInitXtensa, ConvPrepareXtensa, Eval);
}

#if 0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we go ahead and remove this function now?

/* TODO(b/277112516): Dilation is currently not supported on HiFi 4 NN Library
*/
bool inputs_and_bias_ok = bias != nullptr;
#if defined(HIFI3) || defined(HIFI4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include HIFI5?

(input->type == kTfLiteInt8 ||
(input->type == kTfLiteInt16 && bias->type == kTfLiteInt64));
#else
inputs_and_bias_ok = inputs_and_bias_ok && (input->type == kTfLiteInt8);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is this supposed to be for HIFI5?


switch (input->type) {
case kTfLiteInt16: {
#if defined(HIFI3) || defined(HIFI4)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HIFI5?

// http://b/262003750). As such, while we have a fallback to the reference
// implementation, production use-cases should only have int64 bias.
if (bias->type == kTfLiteInt32) {
return ConvReferenceEvalInt16(context, node);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be StreamingConvReferenceEvalInt16?

bias, output);
}
#else
return ConvReferenceEvalInt16(context, node);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be StreamingConvReferenceEvalInt16?

Copy link
Contributor

@rascani rascani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, just a few minor comments.

@rascani rascani self-requested a review April 3, 2024 18:18
@cad-audio
Copy link
Contributor Author

Generally LGTM, just a few minor comments.

@rascani, current changes are related to HiFi 4 only. we are planning to add HiFi 5 changes as well.

@cad-audio
Copy link
Contributor Author

@rascani, added HiFi 5 changes as well.

@rascani
Copy link
Contributor

rascani commented Apr 19, 2024

@vnileshdaiict can you sign the CLA?

@vnileshdaiict
Copy link

vnileshdaiict commented Apr 20, 2024 via email

@rascani
Copy link
Contributor

rascani commented Apr 20, 2024

This is the PR from cad-audio, but the CLA is required to be signed by all accounts that have a commit on the PR. Since you have a commit on the PR, the change cannot be merged until you sign the CLA.

@rascani
Copy link
Contributor

rascani commented Apr 23, 2024

@Mergifyio refresh

Copy link
Contributor

mergify bot commented Apr 23, 2024

refresh

✅ Pull request refreshed

@rascani rascani merged commit 258cf48 into tensorflow:streaming_conv Apr 23, 2024
35 checks passed
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.

4 participants