Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limit on number of kernel arguments in OpenCL

Tags:

opencl

I wanted to know if there is any limit on the number of arguments that are set to kernel function in OpenCL. I am getting the error as INVALID_ARG_INDEX while setting arguments. I am setting 9 arguments in the kernel function. Please help me in this regard.

like image 844
Rakesh K Avatar asked Mar 23 '10 07:03

Rakesh K


1 Answers

You might try calling the following function: www.khronos.org/registry/cl/sdk/1.1/docs/man/xhtml/clGetDeviceInfo.html

The only argument limits seem to concern: -CL_DEVICE_MAX_CONSTANT_ARGS (arguments which are pointers to the __constant memory space) -CL_DEVICE_MAX_READ_IMAGE_ARGS -CL_DEVICE_MAX_WRITE_IMAGE_ARGS

Max read image arguments count should not be a problem, however max constant arguments count and max write image arguments count should be at least 8 on all devices. I might be that you are passing 9 write images on a device that only accepts 8, for example...

like image 61
FelixCQ Avatar answered Oct 12 '22 03:10

FelixCQ