Question

Is there any general FFT lib available for running on the GPU using OpenCL? As far as my knowledge goes, Apple sample code for power-of-two OpenCL FFT is the only such code available?

Does any such library exist for non-power-of-two transform sizes? If not, how easy or difficult is it to modify the Apple OpenCL sample?

I am looking at image processing applications, with non-power-of-two transform sizes, and I will have to do a whole bunch of FFTs, a batched FFT.

Was it helpful?

Solution

I know of an OpenCL FFT library that is currently under development, but they don't plan on having non-power-of-two transform sizes in the first release.

Can you provide any information about your application? It might help to get the priority for that feature raised if it's something a lot of people can use.

OTHER TIPS

Try clFFT developed by AMD. It is aimed at AMD graphic cards, but should work on nVidia GPU's too. It can transform arrays with a radix of 2, 3 and 5 (and combinations there off).

https://github.com/clMathLibraries/clFFT

There are python bindings available

https://github.com/geggo/gpyfft

You can download some OpenCL code samples including FFT from the SHOC benchmark suite.

Null-padding can be used to make arbitrary-length data fit for a power-of-two FFT algorithm. Consider if that would suit your application. Increasing the number of samples decreases the "step size" in the output domain, which means higher output resolution.

OpenMM (https://simtk.org/home/openmm) contains a 3D FFT for OpenCL. It may not work for you directly, since it's designed for a specific case: 3D FFTs where each dimension is small enough to be stored in local memory (e.g. a 100x100x100 grid). But it does support non-power-of-two sizes (radix 2, 3, 4, and 5), so you might be able to adapt it.

VexCL provides an implementation of FFT for OpenCL that accepts arbitrary vector expressions as input, allows one to perform multidimensional transforms (of any number of dimensions), and supports arbitrary sized vectors. Here is a link to the relevant part of its README.

Have a look at APPML-FFT library. Though its still for power of two transforms.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top