Hi,
I ran into some weird behavior with clAmdFft for
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:
Is it something I may be doing wrong? Will be glad to get any comments.
Thanks.
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.
Btw, my setup: