Forum Discussion
Altera_Forum
Honored Contributor
8 years agoHere is the part of the code where deploys the opencl kernel onto the device:
Event evKernel (alg.name);
err = clEnqueueNDRangeKernel (queue, kernel, 1, NULL,
globalWorkSize, localWorkSize,
0, NULL, &evKernel.CLEvent());
CL_CHECK_ERROR (err);
err = clWaitForEvents (1, &evKernel.CLEvent());
CL_CHECK_ERROR (err); I feel like I already wait for the kernel to finish. So, do I still need clFlush and clFinish? BTW, I have fixed the issue you have mentioned earlier, and I've seen the effect on the GPU at least. The performance has dropped which seems to be reasonable. I will go on and try them on the FPGA too and see how it'll behave.