opencl - Workgroup Bound Check not working -
in opencl kernel i'm checking if global_id inside global problem size not working.
if global problem size dividable workgroupsize fine. if not, kernel doing nothing.
__kernel void move_points(const unsigned int points, const unsigned int floors, const unsigned int gridwidth, const unsigned int gridheight, __global const graphdata *graph, __global const float *pin_x, __global const float *pin_y, __global const float *pin_z, __global float *pout_x, __global float *pout_y, __global float *pout_z, __global clrngmrg31k3phoststream *streams) { int id = get_global_id(0); if (id < points) { kernel things... } }
do know problem is?
thanks lot. robin.
if global size not divisible local size (workgroup size), kernel not run @ all.
the enqueuendrangekernel()
call return cl_invalid_work_group_size error specified here.
if want follow cuda mode, may have unused work items. put check in kernel (as have), , use bigger global size, multiple of local size.
Comments
Post a Comment