dikobraz

clGetKernelWorkGroupInfo fails with no device specified

Discussion created by dikobraz on Nov 19, 2012

The following call fails with CL_INVALID_DEVICE:

 

cl_kernel kernel = <create kernel somehow>

size_t     size;

clGetKernelWorkGroupInfo(kernel,

                         0, // if device is specified, everything is fine

                         CL_KERNEL_WORK_GROUP_SIZE,

                         sizeof(size_t),

                         &size,

                         0);

 

Even though associated program is build only for one device. Specifying device solves the probleb. Hope that helps.

Outcomes