/cufft_examples

cuFFT and cuFFTDx example

Primary LanguageC++

NOTE

At the moment, C2C examples require https://github.com/mnicely/cub.

Getting Started

These examples utilize the following toolsets:

Hardware

Volta+

cuFFT_vs_cuFFTDx

This code runs three scenarios

  1. cuFFT using cudaMalloc
  2. cuFFT using cudaMallocManaged
  3. cuFFTDx using cudaMalloc

Objectives

  1. Compare coding styles between cuFFT, using cudaMalloc and cudaMallocManaged
  2. Compare performance between cuFFT, using cudaMalloc and cudaMallocManaged
  3. Compare performance and results between cuFFT and cuFFTDx

Execution

For float

make
./cuFFT_vs_cuFFTDx

For double

export USE_DOUBLE=1
make
./cuFFT_vs_cuFFTDx

To compare results (cuFFT and cuFFTDx are not expected to be exact)

export PRINT=1
make
./cuFFT_vs_cuFFTDx

Output

export PRINT=1
exportUSE_DOUBLE=1
make
./cuFFT_vs_cuFFTDx

FFT Size: 2048 -- Batch: 16384 -- FFT Per Block: 1 -- EPT: 16
cufftExecC2C - FFT/IFFT - Malloc        XX.XX ms
cufftExecC2C - FFT/IFFT - Managed       XX.XX ms

Compare results
All values match!

cufftExecC2C - FFT/IFFT - Dx            XX.XX ms

Compare results
All values match!

Notes

  1. This code utilizes cuFFT Callbacks
  1. This code utilizes separate compilation and linking