Intel® MKL and Intel® IPP: Choosing a High Performance FFT

ID 659937
Updated 9/22/2021
Version Latest
Public

author-image

By

Note: This document applies to Intel® MKL 2018.0 or later and Intel® IPP 2018.0 or later.

Objective

The purpose of this document is to help developers determine which FFT, Intel® MKL or Intel® IPP is best suited for their application.

Overview

Fourier transforms are used in signal processing, image processing, physics, statistics, finance, cryptography, and many other areas. The Discrete Fourier transform (DFT) mathematical operation converts a signal from the time domain to the frequency domain and back.

DFT processing time can dominate a software application. Using a fast algorithm, Fast Fourier transform (FFT), reduces the number of arithmetic operations from O(N2) to O(N log2 N) operations. Intel® MKL FFT and Intel® IPP FFT are highly optimized for Intel® architecture-based multi-core processors using the latest instruction sets, parallelism and algorithms.

Read further to decide which FFT is best for your application.

Below is a brief summary of the Intel® MKL and Intel® IPP libraries. For additional details on these products, visit the Intel® MKL website and the Intel® IPP website.

Table 1: Comparison of Intel® MKL and Intel® IPP Functionality

 

 Intel MKL

Intel IPP

Target Applications

Mathematical applications for engineering, scientific and financial applications

Speed performance for imaging, vision, signal, security, and storage applications

Library Structure

  • BLAS
  • Sparse BLAS
  • LAPACK
  • ScaLAPACK
  • Fast Fourier Transforms
  • Vector Math
  • Vector Statistics
  • Random Number Generators
  • Partial Differential Equations
  • Optimization Solvers
  • Sparse Solvers
  • Deep Neural Network (*)
  • Signal Processing
  • Image Processing
  • Cryptography
  • Data compression

Linkage Models

Static, dynamic, custom dynamic

Static, dynamic, custom dynamic

Operating Systems

Windows*, Linux*, macOS*

Windows, Linux, Android (**), macOS

Processor Support

IA-32 and Intel® 64 architecture-based and compatible platforms

IA-32 and Intel® 64 architecture-based and compatible platforms

Both libraries contain the generic code optimized for processors with Intel® Streaming SIMD Extensions (Intel® SSE) and code optimized for processors with Intel® SSE2, SSE3, SSE4.1, SSE4,2, AVX, AVX2 and AVX-512 instruction sets

* - Deep Neural Network is not part of MKL package since version 2020

** - Android is not supported since IPP version 2020

Intel® MKL and Intel® IPP Fourier Transform Feature

The Fourier Transforms provided by MKL and IPP are respectively targeted for the types of applications targeted by MKL (engineering and scientific) and IPP (media and communications). In the table below, we highlight specifics of the MKL and IPP Fourier Transforms that will help you decide which may be best for your application.

Table 2: Comparison of Intel® MKL and Intel® IPP DFT Features

Feature

Intel MKL

Intel IPP

API

DFT
Cluster FFT
FFTW 2.x and 3.x

FFT
DFT

Interfaces

C, Fortran and DPC++ API (*)

LP64 (64-bit long and pointer)
ILP64 (64-bit int, long, and pointer)

C

LP64 only

Dimensions

1-D up to 7-D

1-D (Signal Processing)
2-D (Image Processing)

Transform Sizes

32-bit platforms - maximum size is 2^31-1
64-bit platforms - 264 maximum size

FFT - Powers of 2 only (**)

DFT -232 maximum size (**)

Mixed Radix Support

2,3,5,7,11,13 and several larger kernels (***)

DFT - 2,3,5,7,11,13 kernels (***)

Data Types

(See Table 3 for detail)

Real & Complex
Single- & Double-Precision

Real & Complex
Single- & Double-Precision

Scaling

Transforms can be scaled by an arbitrary floating-point number (with precision the same as input data)

Integer ("fixed") scaling

  • Forward 1/N
  • Inverse 1/N
  • Forward + Inverse  SQRT (1/N)

Threading

Platform dependent

  • IA-32: All (except 1D when performing a single transform and sizes are not power of two)
  • Intel® 64: All (except in-place power of two)

1D and 2D (****)

* - (DPC++) APIs available since version 2021

** - the Max Size Limits:

  • for double precision complex DFT (64fc) the length upper bound is 67108863 (2^26 - 1).
  • for single precision complex DFT (32fc) the length upper bound is 134217727 (2^27 - 1).
  • for double precision complex FFT (64fc) the length upper bound is 2^27.
  • for single precision complex FFT (32fc) the length upper bound is 2^28.

*** - Both libraries support arbitrary radix in optimized manner, that is O(N*log(N)), but these specific radixes are better optimized than others.

**** - since IPP v.2021 the non-threaded version available only.

Data Types and Formats

The Intel® MKL and Intel® IPP Fourier transform functions support a variety of data types and formats for storing signal values. Mixed types interfaces are also supported. Please see the product documentation for details.

Table 3: Comparison of Intel® MKL and Intel® IPP Data Types and Formats

 

Feature

Intel MKL

Intel IPP

Real FFTs

Precision

Single, Double

Single, Double

1D Data Types

Real for all dimensions

Signed short, signed int, float, double

2D Data Types

Real for all dimensions

Unsigned char, signed int, float

1D Packed Formats

CCS, Pack, Perm, CCE

CCS, Pack, Perm

2D Packed Formats

CCS, Pack, Perm, CCE

RCPack2D

3D Packed Formats

CCE

n/a

Format Conversion Functions

 n/a

 n/a

Complex FFTs

Precision

Single, Double

Single, Double

1D Data Types

Complex for all dimensions

Signed short, complex short, signed int, complex integer, complex float, complex double

2D Data Types

Complex for all dimensions

Complex float

Formats Legend
CCE - stores the values of the first half of the output complex conjugate-even signal
CCS - same format as CCE format for 1D, is slightly different for multi-dimensional real transforms for 2D transforms. CCS, Pack, Perm are not supported for 3D and higher rank
Pack - compact representation of a complex conjugate-symmetric sequence
Perm - same as Pack format for odd lengths, arbitrary permutation of the Pack format for even lengths
RCPack2D - exploits the complex conjugate symmetry of the transformed data to store only half of the resulting Fourier coefficients

Performance

The Intel® MKL and Intel® IPP are optimized for current and future Intel® processors, and are specifically tuned for two different usage areas:

  • Intel® MKL is suitable for large problem sizes typical to FORTRAN and C/C++ high-performance computing software such as engineering, scientific, and financial applications.
  • Intel® IPP is specifically designed for smaller problem sizes including those used in multimedia, data processing, communications, and embedded C/C++ applications 

Choosing the Best FFT for Your Application

Before making a decision, developers must understand the specific requirements and constraints of the application. Developers should consider these questions:

  • What are the performance requirements for the application? How performance is measured and what is the measurement criteria? Is a specific benchmark being used? What are the known performance bottlenecks?
  • What type of application is being developed? What are the main operations being performed and on what kind of data?
  • What API is currently being used in the application for transforms? What programming language(s) is the application code written in?
  • Does the FFT output data need to be scaled (normalized)? What type of scaling is required?
  • What kind of input and output data does the transform process? What are the valid and invalid values? What type of precision is required?

Summary

Intel® MKL and Intel® IPP both provide optimized Fourier Transform functions. For more detailed information on the FFT APIs, parameters and formats, please refer to the following documents:

Get Intel® Performance Libraries for free: /content/www/us/en/develop/tools/performance-libraries.html

Other Resources