#4 A possible bug in kernel.hpp

closed-fixed
nobody
5
2012-02-13
2010-09-22
Anonymous
No

Hi,

Thank you for this great piece of code!

If you take a look at this code inside kernel.hpp, around line 118:

while (err != CL_SUCCESS && tmp_local > 1)

{

//std::cout << "Flushing queue, then enqueuing again with half the size..." << std::endl;

tmp_global /= 2;

tmp_local /= 2;

err = clEnqueueNDRangeKernel(device().queue().get(), h.get(), 1, NULL, &tmp_global, &tmp_local, 0, NULL, NULL);

}

You try to find the biggest work group size that lets your kernel run. If an error occurs, you try lowering the group size, but the code above also lowers global work size, by a factor of two. Is this what you want?

Best regards,
Farshid Mossaiby

Discussion

  • Karl Rupp

    Karl Rupp - 2010-10-02

    Hi!
    Thanks for reporting that. For the upcoming release 1.1.0, we intend to have a fixed global size and adjust the local size appropriately. The current behavior as posted in your code is intended. I agree that this is not the optimal solution, but runs on a large number of different GPUs.
    Best regards,
    Karli

     
  • Karl Rupp

    Karl Rupp - 2010-10-02
    • status: open --> closed
     
  • Karl Rupp

    Karl Rupp - 2012-02-13
    • status: closed --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks