title: cuFFT and streams
body: <p>I'm trying to launch multiple CUDA FFT kernels asynchronously using streams. 
  For that, I'm creating my streams, cuFFT forward and inverse plans as follows:</p>
  
  <pre><code>streams = (cudaStream_t*) malloc(sizeof(cudaStream_t)*streamNum);
  plansF = (cufftHandle *) malloc(sizeof(cufftHandle)*streamNum);
  plansI = (cufftHandle *) malloc(sizeof(cufftHandle)*streamNum);
  for(int i=0; i&lt;streamNum; i++)  
  {
      cudaStreamCreate(&amp;streams[i]);
      CHECK_ERROR(5)
      cufftPlan1d(&amp;plansF[i], ticks, CUFFT_R2C,1);
      CHECK_ERROR(5)
      cufftPlan1d(&amp;plansI[i], ticks, CUFFT_C2R,1);
      CHECK_ERROR(5)
      cufftSetStream(plansF[i],streams[i]);
      CHECK_ERROR(5)
      cufftSetStream(plansI[i],streams[i]);
      CHECK_ERROR(5)
  }
  </code></pre>
  
  <p>In the <code>main</code> function, I'm launching forward FFTs as follows:</p>
  
  <pre><code>for(w=1;w&lt;q;w++)
    {
      cufftExecR2C(plansF[w], gpuMem1+k,gpuMem2+j);
      CHECK_ERROR(8)
      k += rect_small_real;
      j += rect_small_complex;
    }
  </code></pre>
  
  <p>I also have other kernels that I launch asynchronously with the same streams.</p>
  
  <p>When I profile my application using Visual Profiler 5.0, I see that all kernels except the CUDA FFT (both forward and inverse) run in parallel and overlap. FFT kernels do run in different streams, but they do not overlap, as they actually run sequentially. 
  Can anyone tell me what is my problem?</p>
  
  <p>My environment is VS 2008, 64 bit, Windows 7.  </p>
  
  <p>Thanks.</p>