OpenCL-Registry icon indicating copy to clipboard operation
OpenCL-Registry copied to clipboard

Adding a clEnqueueSetKernelArg() method?

Open sanguinariojoe opened this issue 2 months ago • 0 comments

It would be highly beneficial to implement a clEnqueueSetKernelArg() method, particularly for setting scalars or vectors allocated in host memory.

This need arises, for example, during a reduction operation where the resulting scalar must be used in a subsequent kernel. Currently, it's not possible to call clEnqueueNDRangeKernel() until the final value is computed. However, since the address of the host memory is already known, introducing a clEnqueueSetKernelArg() function would eliminate this syncing point, thereby significantly reducing overhead.

What do you think guys? Is there any technical limitation that I do not understand?

sanguinariojoe avatar Oct 18 '25 07:10 sanguinariojoe