error - clEnqueueNDRangeKernel( -52)

Hello forum,

I have just started with OpenCL and trying out with the basic matrix multiplication and while running i am having the following error:


Using platform vendor: NVIDIA Corporation
ERROR: clEnqueueNDRangeKernel( -52)

I am creating the context, device , queue and other necessary information needed before initializing the buffer, and i also believe that i am missing something in the process. A glimpse of it as follows:


const int ORDER = 1000;

................................
.................................


      Ndim = ORDER;
      Mdim = ORDER;
      Pdim = ORDER;

      szA = Ndim * Pdim;
      szB = Pdim * Mdim;
      szC = Ndim * Mdim;


      //create the program queue
      CommandQueue queue(context,devices[0],0);

      queue.enqueueNDRangeKernel(
	 kernel,
	 cl::NullRange,
	 cl::NDRange(szA),
	 cl::NullRange);



Any hint to debug this issue will be very helpful.

Thanks

sajis997

Look at CL/cl.h

Error -52 is “invalid kernel args” - probably haven’t set the kernel arguments properly.

Also look at the man-page for enqueue kernel (search on-line for the function name), which will list when and why that error will be returned.