[FR] Add IPP support for FFT

Please add Intel IPP support for FFT.

See:

Thanks,

Rail

This will be added in JUCE 6, and is currently available for preview:

1 Like

Great!
Can you also close the topic like was done for DrawableText::replaceColour so that the votes go back to the users? So far I’ve manually removed my votes so I can vote for other things but if everyone does it then it would make the list weird (i.e “why did FRs with no votes got implemented while etc”)

3 Likes

Looks like there’s now support for IPP’s FFT since https://github.com/juce-framework/JUCE/commit/9fa6c195ee419c0be6e7c9c123db70faba795334, however:

iiuc IPP usage is enabled by the “Use IPP Library” option, which is only available for the Visual Studio exporters. How should one enable it for “Xcode (macOS)” and “Linux Makefile” targets?

Support for linking against IPP’s FFT in the Projucer has only been implemented on Windows. Until now we’ve not had any demand for it on the other platforms.

[Edited]

Using Intel’s IPP FFT on MacOS is just a matter of including some paths and lib files to link in your .jucer file.

Thanks for editing Tom!

Apologies, my post wasn’t very clear and I’ve edited it.

We can add support for the other platforms in the Projucer, but, as you’ve said, using IPP on those platforms is pretty straightforward so there hasn’t been much demand.

1 Like

I think it should be consistent for both

Rail

1 Like

I think that you’re mixing two separate things:

  • User-code using IPP. I’ve used IPP long before JUCE supported it via the Visual Studio Exporter option. This isn’t what I’m talking about
  • JUCE’s FFT choosing to use the IPP-based implementation

I already use IPP on all platforms (directly in user code). How to I make JUCE’s FFT use it too?

I use the flag DEFINE _IPP_SEQUENTIAL_STATIC 1 in my Extra Preprocessor definitions (Projucer) and make sure that I also add the correct IPP header path(s) and link the IPP libs I need (like you probably also do).

Check the juce_FFT source file and see how it will use Intel’s IPP FFT.

BTW I would not get used to Mac IPP, because its incompatible with ARM-Macs, instead use Apple Accelerate framework, it has almost anything you need.

3 Likes

Yeah, I know and that’s new for me. Thanks

I am working on a project that I picked up again from 2 years ago (with IPP on Mac). I still need to read into this new Apple move…

1 Like

Note that the user code doesn’t really depends on which of these modes was defined. Why not make JUCE’s IPP-based FFT work if you defined JUCE_IPP_AVAILABLE?

Yes, I’m actually asking for this so that I could gradually transition to Apple’s FFT implementation on macOS.

Plan:

  • Make JUCE’s FFT wrap IPP’s FFT when available
  • Transition from using IPP’s FFT directly in my code to use JUCE’s FFT (which should now just be a wrapper for it)
  • Check that everything still works
  • Transition to Apple’s vDSP FFT by simply removing the JUCE_IPP_AVAILABLE=1 preprocessor setting on macOS builds
  • Check that everything still works and compare the performance
  • If it turns out that IPP’s FFT is faster on Intel CPUs, possibly keep using it on macOS but not on the Apple Silicon architecture

Update: the missing piece for this was very small. Using our JUCE repo IPP appears to be working fine on macOS (will also test on Linux later and report)

Well, regarding the Define I mentioned, it works for me :slight_smile:
I can have another look at the other defines.

I can imagine that if you build a universal binary, you can still use Intel IPP on Mac for the x86_64 slice and use vDSP for the ARM slice.

I have not yet Googled for comparisons between vDSP and IPP in the “old” x86_64 mode.

What do you think? Would that be tricky to configure?

See my comment just above. It works for me now after minor tweaks and Xcode compilation error fixes. And no I don’t think this should be tricky. I’ll update when I transition my code to JUCE’s FFT and then I could easily benchmark using either of them in my actual code.

1 Like

That is cool news, thanks!

The results are in!

My process is 20% faster using IPP’s FFT than using Apple’s vDSP FFT.

Hence, we’ll keep using IPP for macOS Intel targets.

2 Likes

Thanks for this quick result!
So linking the x86-64 slice with IPP in a universal binary is easy?
Top!