Skip to content

Add IPP (Intel performance primitives) implementations #3

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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

dgrahelj
Copy link
Contributor

@dgrahelj dgrahelj commented May 7, 2025

  • adds a cargo feature ipp (for use on Intel processors) which requires the IPP framework to be locally installed and the environment variable IPPROOT set (normally done using a script in the Intel OneApi framework - see readme)
  • Uses IPP functions in FFT, FFTConvolver, TwoStageConvolver and CrossfadeConvolver
  • Exposes the head_size and tail_size parameters of the TwoStageConvolver to enable optimal performance tweaking on different platforms

Note: currently points to a fork of the rust ipp-sys crate with the rust bindings, since the original crate does not include the latest bindings. Hopefully this gets merged upstream soon it seems like the upstream crate repository is not maintained anymore. I made a fork on holoplot and am pointing to it

@wiccy46
Copy link
Contributor

wiccy46 commented May 7, 2025

As this is open source, does it have implication to user without such framework ?

@dgrahelj
Copy link
Contributor Author

dgrahelj commented May 7, 2025

As this is open source, does it have implication to user without such framework ?

The ipp feature is optional. By default the old implementations that rely only on rustfft are used. The ipp implementations are used only if the user specifically enables the feature (eg. cargo build --features ipp).

@holopeat
Copy link
Contributor

holopeat commented May 7, 2025

Great stuff! The preferred way would be to use generics or traits to inject the right FFT implementation and reuse as much code as possible. This generalization would also include functions to allocate data and complex number multiplications, as far as I can see.

@dgrahelj dgrahelj force-pushed the add-ipp-implementations branch from 6985bb6 to b68c55f Compare May 20, 2025 08:51
@dgrahelj
Copy link
Contributor Author

Great stuff! The preferred way would be to use generics or traits to inject the right FFT implementation and reuse as much code as possible. This generalization would also include functions to allocate data and complex number multiplications, as far as I can see.

Good point! I now unified the code with two extra traits - FftBackend and ComplexOps. Please take another look @holopeat

@dgrahelj dgrahelj marked this pull request as ready for review May 27, 2025 14:38
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.

3 participants