accuracy of cuFFT

dear all:

I write a simple program to test accuracy of cuFFT

for each dimension N, I test L2-norm( x - ifft(fft(x)) )/L2-norm(x)

, x is chosen as basis vector, say x(j) = cos(2pikj/N) or sin(2pikj/N) for k = 0, 1,2,…,N-1

and pick up maximum error over all possible basis vectors.

experiment result is shown in figure 1

figure 1

however [url=“3.0 GHz Intel Core Duo, Intel compilers, 64-bit mode”]http://www.fftw.org/accuracy/CoreDuo-3.0GHz-icc64[/url] shows
evaluation of FFT in figure 2

figure 2

if one foucs on result of fftpack and fftw, then

it is clear that cuFFT has large variation on error distribution.

Does anyone know what happens ?

Well, from the graph it is obvious they have measured error only for some “special” N. If you look at x-axis you can see they have chosen numbers that can be unscrambled into relatively small primes which is crucial for both speed and accuracy. If you measure speed and accuracy of FFT, the results for large prime N (let’s say 991) will be much worse than for e.g. N = 1000 = 2[sup]3[/sup] 5[sup]3[/sup]

Thanks a lot, I retrieve such special N and plot again

the result is good

This is completely off-topic: I’m glad to see my little kissfft library managed to score third place for accuracy out of all those fft routines!

Actually, it is more like a 12-way tie for second place.