clEnqueueNDRangeKernel, error code -54

hey guys
i’m a new boy in opencl , when i run my program i take “clEnqueueNDRangeKernel, error code -54” i check “clSetKernelArg” out, and everything seems right, i don’t know what else to do??
this is some of my relevant code:

    error  = clSetKernelArg(kernel, 0, sizeof(cl_mem),  &cl_buffer);
error |= clSetKernelArg(kernel, 1, sizeof(cl_ulong),  &blocks);
error |= clSetKernelArg(kernel, 2, sizeof(cl_uint),  &mode);
error |= clSetKernelArg(kernel, 3, sizeof(cl_mem),  &cl_round_key);
cl_uint rounds = get_rounds_number(key_size_bits);
error |= clSetKernelArg(kernel, 4, sizeof(cl_uint),  &rounds);
    error |= clSetKernelArg(kernel, 5, sizeof(cl_uint), &round);

__kernel
void kernel_aes(__global uchar * buffer,const ulong blocks, const uint mode, __constant const uchar * round_key,const uint rounds,const uint round)

any ideas??

What you do is look up the error code in the opencl header file, i.e. in CL/cl.h. e.g. -54 is CL_INVALID_WORK_GROUP_SIZE

Then once you know the name of the error code, you go to the manual page of (or specification section for) the function that is returning it (i.e. clEnqueueNDRangeKernel), and see what conditions will cause that error. The error codes are exhaustively documented and in many cases (such as this one) self explanatory.

thanks
:smiley: