cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

gouse
Journeyman III

clAmdFft inconsistent results for Real to Hermitian Interleaved

Hi,

I ran into some weird behavior with clAmdFft for

  • CLFFT_OUTOFPLACE
  • CLFFT_REAL to CLFFT_HERMITIAN_INTERLEAVED

case (which should be supported according to documentation).

I create two buffers cl_mem bufA_in & bufB_in and write there the same input data. Then (after baking FFT plan) perform FFT transform, first on bufA_in, and, second, on bufB_in:

     status = clAmdFftEnqueueTransform( plHandle, CLFFT_FORWARD, 1, &queue, 0, NULL, NULL, &bufA_in, &bufA_out, tmp_buf);

     status = clAmdFftEnqueueTransform( plHandle, CLFFT_FORWARD, 1, &queue, 0, NULL, NULL, &bufB_in, &bufB_out, tmp_buf);

The results received:

  1. Different for A & B
  2. Inconsistent between different runs.
  3. A_out[1] after reading to host != 0 (which I think should be)

Is it something I may be doing wrong? Will be glad to get any comments.

Thanks.

0 Likes
3 Replies

The problem is using the same temporary buffer (tmp_buf) for both the calls. Please either use a clFinish() after the first clAmdFftEnqueueTransform call or use different plan handles/temporary buffers.

Hi bragadeesh,

I actually do call clFinish(queue); after every clAmdFftEnqueueTransform(). This is exactly how this block looks in my code:

     status = clAmdFftEnqueueTransform( plHandle, CLFFT_FORWARD, 1, &queue, 0, NULL, NULL, &bufA_in, &bufA_out, tmp_buf);

     CHECK_ASSERT(status == 0, "clAmdFftEnqueueTransform failed");

     clFinish(queue);

     status = clAmdFftEnqueueTransform( plHandle, CLFFT_FORWARD, 1, &queue, 0, NULL, NULL, &bufB_in, &bufB_out, tmp_buf);

     CHECK_ASSERT(status == 0, "clAmdFftEnqueueTransform failed");

     clFinish(queue);

So, this code should in theory run properly.

Creating plan for every clAmdFftEnqueueTransform() just doesn't make sense for me. Still, I did the attempt, it didn't help.

What do you think?

Thanks.

0 Likes

Btw, my setup:

  • Win7 32-bit
  • AMD FirePro V7900 (ATI FireGL) --> Cayman
  • OpenCL 1.1 AMD-APP (831.4)
  • SDK 2.6
0 Likes