The NVIDIA CUDA Fast Fourier Transform library (cuFFT) provides a simple interface for computing FFTs up to 10x faster.  By using hundreds of processor cores inside NVIDIA GPUs, cuFFT delivers the floating‐point performance of a GPU without having to develop your own custom GPU FFT implementation.

     

Widely used in applications ranging from computational physics to image processing and general signal processing, the Fast Fourier Transform is an efficient algorithm for computing discrete Fourier transforms of complex or real‐valued data sets.  cuFFT uses algorithms based on the well-known Cooley-Tukey and Bluestein algorithms, so you can be confident that you’re getting accurate results faster than ever.

For cuFFT features which require a license, please complete this short form. Once completed, you will receive a free evaluation license valid until 12/31/2020. This requires membership of the CUDA Registered Developer Program. Your feedback will be used to improve cuFFT. The current license restrictions will be removed in an upcoming release of CUDA.

Key Features

  
  • 1D, 2D, 3D transforms of complex and real data types
  • 1D transform sizes up to 128 million elements
  • Flexible data layouts by allowing arbitrary strides between individual elements and array dimensions
  • FFT algorithms based on Cooley-Tukey and Bluestein
  • Familiar API similar to FFTW Advanced Interface
  • Streamed asynchronous execution
  • Single and double precision transforms
  • Batch execution for doing multiple transforms
  • In-place and out-of-place transforms
  • Flexible input & output data layouts, similar tp FFTW  "Advanced Interface"
  • Thread-safe & callable from multiple host threads

Performance

Review the latest CUDA 6.5 performance report to learn how much you could accelerate your code.

Source Code Example

3D Complex-to-Complex Transforms

        

#define NX 64
#define NY 64
#define NZ 128

cufftHandle plan;
cufftComplex *data1, *data2;
cudaMalloc((void**)&data1, sizeof(cufftComplex)*NX*NY*NZ);
cudaMalloc((void**)&data2, sizeof(cufftComplex)*NX*NY*NZ);
/* Create a 3D FFT plan. */
cufftPlan3d(&plan, NX, NY, NZ, CUFFT_C2C);

/* Transform the first signal in place. */
cufftExecC2C(plan, data1, data1, CUFFT_FORWARD);

/* Transform the second signal using the same plan. */
cufftExecC2C(plan, data2, data2, CUFFT_FORWARD);

/* Destroy the cuFFT plan. */
cufftDestroy(plan);
cudaFree(data1); cudaFree(data2);

Availability

The cuFFT library is freely available as part of the CUDA Toolkit.

For more information on cuFFT and other CUDA math libraries: