Skip to content

Conversation

@andrula-song
Copy link
Contributor

Use the xtense intrinsic instrunctions directly can save at least 10% cycles for those functions, and save about 0.9mcps for DRC component.

@aiChaoSONG aiChaoSONG changed the title Audio: DRC: DRC math function optimiazation Audio: DRC: DRC math function optimization Jan 18, 2024
@lgirdwood
Copy link
Member

@singalsu pls review

@andrula-song andrula-song marked this pull request as ready for review January 25, 2024 10:40
@andrula-song andrula-song requested a review from a team as a code owner January 25, 2024 10:40
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.

In my check with TGL the improvement was 1.7 MCPS. There's a minimal difference in the steady signal characteristics measured by process_test() in frequency response after this change (less than 0.05 dB in some frequencies) but it's so small that it's insignificant.

@andrula-song andrula-song force-pushed the drc branch 2 times, most recently from a601bdd to beb6553 Compare February 27, 2024 10:02
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 very good, thanks!

@lgirdwood
Copy link
Member

@andrula-song looks like a simple error to fix in build

fdata-sections -mlongcalls -DXTENSA_TOOLCHAIN_VARIANT=2 -std=c99 -std=gnu99 -MD -MT modules/sof/CMakeFiles/modules_sof.dir/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c.obj -MF modules/sof/CMakeFiles/modules_sof.dir/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c.obj.d -o modules/sof/CMakeFiles/modules_sof.dir/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c.obj -c /srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c
/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c: In function ‘drc_asin_fixed’:
/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c:164: error: perhaps a TIE conversion macro (from ae_f32x2 to int32_t) is missing
/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c:164: error: incompatible types in initialization
/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c: In function ‘drc_inv_fixed’:
/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c:234: error: perhaps a TIE conversion macro (from ae_f32x2 to int32_t) is missing
/srv/home/jenkins/workspace/sof_config_build/sof/src/audio/drc/drc_math_hifi3.c:234: error: incompatible types in assignment
[294/355] Building C object modules/sof/CMakeFiles/modules_sof.dir/srv/home/jenkins/workspace/sof_config_build/sof/src/samples/audio/smart_amp_test_ipc4.c.obj

Use the xtense intrinsic instrunctions directly can save
at least 10% cycles for those functions, and save about
0.9mcps for DRC component.

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

hi @wszypelt , can you help to trigger test again? only copy timeout issue
Screenshot from 2024-03-08 15-54-01

@wszypelt
Copy link

wszypelt commented Mar 8, 2024

@andrula-song sure, during 20 min there will be new results

@lgirdwood lgirdwood merged commit e48a171 into thesofproject:main Mar 8, 2024
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