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

ai-soc/ndp120: implement packages loding to NDP120 in chunks #6561

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

abhishek-samsung
Copy link
Contributor

to reduce the memory usage during loading of synpkgs, implement package loading in chunks

to reduce the memory usage during loading of synpkgs, implement
package loading in chunks

Signed-off-by: Abhishek Akkabathula <[email protected]>
Taejun-Kwon
Taejun-Kwon previously approved these changes Dec 6, 2024
Incase we use recorder without Keyword detection, skip the start point
correction we do for Keyword detection case.

Signed-off-by: Abhishek Akkabathula <[email protected]>
Copy link
Collaborator

@r-prabu r-prabu left a comment

Choose a reason for hiding this comment

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

Check the PR title as well.

@@ -78,6 +78,7 @@ struct ndp120_dev_s {
uint32_t extract_size;
bool extclk_inuse;
volatile bool alive;
bool keyword_correction;
Copy link
Collaborator

Choose a reason for hiding this comment

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

on what basis the keyword_correction is enabled and disabled? Do we need to provide this control also to the application?

@@ -446,6 +446,7 @@ static int load_synpkg(struct syntiant_ndp_device_s *ndp, const char *p)
int s = 0;
int pfd;
int rl;
int chunk_size = 1024;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it better to provide this chunk size with config?

@@ -446,6 +446,7 @@ static int load_synpkg(struct syntiant_ndp_device_s *ndp, const char *p)
int s = 0;
int pfd;
int rl;
int chunk_size = 1024;
Copy link
Contributor

Choose a reason for hiding this comment

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

Let us not hardcode this. Let us atleast use a #define instead.

s = syntiant_ndp_extract_data(dev->ndp, SYNTIANT_NDP_EXTRACT_TYPE_INPUT,
if (dev->keyword_correction) {
/* we need not do this if this is resume case, we only need to do it if its recorder start case after keyword detection */
s = syntiant_ndp_extract_data(dev->ndp, SYNTIANT_NDP_EXTRACT_TYPE_INPUT,
SYNTIANT_NDP_EXTRACT_FROM_MATCH, NULL,
Copy link
Contributor

Choose a reason for hiding this comment

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

Too much indentation.

@neel-samsung
Copy link
Contributor

Please change the PR title from loding to loading

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.

5 participants