Skip to content

Comments

Audio: TDFB: Optimize the circular buffer usage#7700

Merged
kv2019i merged 2 commits intothesofproject:mainfrom
andrula-song:tdfb
Jun 27, 2023
Merged

Audio: TDFB: Optimize the circular buffer usage#7700
kv2019i merged 2 commits intothesofproject:mainfrom
andrula-song:tdfb

Conversation

@andrula-song
Copy link
Contributor

@andrula-song andrula-song commented May 29, 2023

Optimize the tdfb_fir_sx functions by remove the duplicated usage of circular buffer.
the performance I got by xt-testbench is here:

Format original(mcps) optimized(mcps) saving mcps
16/16 17.42 17.23 0.19
24/32 17.59 17.32 0.27
32/32 17.30 17.12 0.18

Copy link
Collaborator

Choose a reason for hiding this comment

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

these loops could also be optimised a bit further by using some form of ffs()

@btian1
Copy link
Contributor

btian1 commented May 31, 2023

shall we expect same code change on generic c code? c code should be always same with optimized code in case one day hifi version have bugs.

Copy link
Collaborator

@singalsu singalsu left a comment

Choose a reason for hiding this comment

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

Looks good to me plus, the small saving is nice. Thank you!

@singalsu
Copy link
Collaborator

singalsu commented Jun 2, 2023

You should add to commit message "Fixes #5273"

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

@andrula-song Can you split the hifi4 change to a different commit (can be in same PR)? Otherwise looks good to go.

Optimize the tdfb_fir_sx functions by remove the duplicated
usage of circular buffer.

Fixes: thesofproject#5273.

Signed-off-by: Andrula Song <andrula.song@intel.com>
Since there is not any intrinsic on HiFi4 can get better
performance, thus share the implementation code for HiFi3
and HiFi4.

Signed-off-by: Andrula Song <andrula.song@intel.com>
@kv2019i
Copy link
Collaborator

kv2019i commented Jun 27, 2023

The fails in https://sof-ci.01.org/sofpr/PR7700/build10102/devicetest/index.html are worrying, but I can't figure out how it could be related to this PR. I'll proceed with merge based on earlier CI results for this PR and CI results for other PRs today.

@kv2019i kv2019i merged commit db8da43 into thesofproject:main Jun 27, 2023
@fredoh9
Copy link
Contributor

fredoh9 commented Jun 27, 2023

This causes DSP exception on boot and runtime pm test.
After I reverted this, there is no DSP exception. Tested with MTL NOCODEC.

@keqiaozhang
Copy link
Collaborator

This PR brings a regression thesofproject/linux#4442

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.

7 participants