Hi everybody,
to debug my program I try to get some information from the gpu. Unfortunately I get an error when I try to find out [font=“Courier New”]CL_DEVICE_MAX_WORK_ITEM_SIZES[/font]. The error# is 30, which means [font=“Courier New”]CL_INVALID_VALUE[/font]
This is my code:
[codebox]size_t workgroupsize;
cl_uint devicedata;
size_t maxitems[1];
clGetKernelWorkGroupInfo(*cl_forward1,GPUDevices[0], CL_KERNEL_WORK_GROUP_SIZE, sizeof(size_t), &workgroupsize, NULL);
printf(“\nCL_KERNEL_WORK_GROUP_SIZE:%i\n”,workgroupsize);
clGetDeviceInfo(GPUDevices[0], CL_DEVICE_ADDRESS_BITS, sizeof(cl_uint), &devicedata, NULL);
printf(“\nCL_DEVICE_ADDRESS_BITS:%i\n”,devicedata);
_err= clGetDeviceInfo(GPUDevices[0], CL_DEVICE_MAX_WORK_ITEM_SIZES, sizeof( maxitems), &maxitems, NULL);
printf(“\nCL_DEVICE_MAX_WORK_ITEM_SIZES:%i + error=%i\n”,maxitems[0],_err);
_err= clGetDeviceInfo(GPUDevices[0], CL_DEVICE_MAX_WORK_GROUP_SIZE, sizeof( maxitems), &maxitems, NULL);
printf(“\nCL_DEVICE_MAX_WORK_GROUP_SIZE:%i + error=%i\n”,maxitems[0],_err); [/codebox]
And this is the output:
[codebox]CL_KERNEL_WORK_GROUP_SIZE:512
CL_DEVICE_ADDRESS_BITS:32
CL_DEVICE_MAX_WORK_ITEM_SIZES:42331 + error=-30
CL_DEVICE_MAX_WORK_GROUP_SIZE:512 + error=0
[/codebox]
What could be the cause of this error?
Thank you