Hello,
I am running into a strange problem with the 0.9 release of CUDA, which I haven’t seen in 0.8. I am using a GeForce 8800 GTX and driver version 162.01 with VS03 under Windows XP.
I am timing a number of FFT and IFFT’s from the CUFFT library with the code below. With the use of a simple batchfile, this is performed for several data sizes (2x2, …, 1024x1024) to compare CUFFT with the FFTW library.
In the 0.8 release of CUDA and CUFFT everything worked fine, but in the 0.9 release I occasionally get negative timing values! Could this be a bug in the new CUDA release or am I doing something wrong?
//start actual calculation
CUT_SAFE_CALL(cutStartTimer(timer));
// Allocate device memory for signal
float* d_signal;
float* d_signal_f;
CUDA_SAFE_CALL(cudaMalloc((void**)&d_signal, mem_size));
CUDA_SAFE_CALL(cudaMalloc((void**)&d_signal_f, mem_size));
// Copy host memory to device
CUDA_SAFE_CALL(cudaMemcpy(d_signal_f, h_signal, mem_size_f, cudaMemcpyHostToDevice));
if (number >= 1)
{
for (unsigned int i = 0; i < number; ++i)
{
// Transform signal and kernel
CUFFT_SAFE_CALL(cufftExecR2C(plan_r2c, (cufftReal *)d_signal_f, (cufftComplex *)d_signal));
// Transform signal back
CUFFT_SAFE_CALL(cufftExecC2R(plan_c2r, (cufftComplex *)d_signal, (cufftReal *)d_signal_f));
}
}
// Copy device memory to host
CUDA_SAFE_CALL(cudaMemcpy(h_signal, d_signal_f, mem_size, cudaMemcpyDeviceToHost));
CUT_SAFE_CALL(cutStopTimer(timer));
printf("%d FFT of %d processing time : %f (ms)\n", number, usedw, cutGetTimerValue(timer));
Thanks for the help,
Arno
Edit: added type of videocard, driver version, development environment and OS