-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spec consistency around param_value_size parameter for many OpenCL procedures #1216
Comments
Discussed in the August 6th teleconference:
We'll file an additional issue to possibly de-duplicate this information, or to add stricter error checking. |
As part of creating #1220, I noticed that we should consider clGetSemaphoreHandleForTypeKHR too when resolving this issue. The name of the affected parameters are |
Need to clarify exactly what should be updated for:
These APIs have a slightly different pattern: they return an array of objects and/or the number of objects in the array. For example: cl_int clCreateKernelsInProgram(
cl_program program,
cl_uint num_kernels, // this is the allocated size of the array
cl_kernel* kernels, // this is the array itself, which stores the output from the function
cl_uint* num_kernels_ret); // this is the number of objects in the array Do we want to say that the allocated size of the array ("num_kernels" in the esample above) is ignored if the array is Regardless, I would prefer to resolve this with a separate PR. |
#1254 fixes most of these issues. Moving to "Needs WG Discussion" to answer the question above regarding clCreateSubDevices, clGetsupportedImageFormats, and clCreateKernelsInProgram. |
Indeed, pattern is not reflected exactly in mentioned cases and it may need a different description. |
In few cases of OpenCL API spec mentioned that
param_value_size
is ignored if relatedpara_value
is NULL, eg. :param_value_size specifies the size in bytes of memory pointed to by param_value. This size must be ≥ size of return type as described in the table below. If param_value is NULL, it is ignored.
This is the case for
clGetCommandBufferInfoKHR
andclGetCommandQueueInfo
.For below, similar cases this information is missing.
clGetPlatformInfo, clGetDeviceInfo, clCreateSubDevices, clGetContextInfo, clGetSupportedImageFormats, clGetImageInfo, clGetPipeInfo, clGetMemObjectInfo, clGetGLTextureInfo, clGetSamplerInfo, clGetProgramInfo, clGetProgramBuildInfo, clCreateKernelsInProgram, clGetKernelInfo, clGetKernelWorkGroupInfo, clGetKernelSubGroupInfo, clGetKernelArgInfo, clGetEventInfo, clGetSemaphoreHandleForTypeKHR, clGetSemaphoreInfoKHR, clGetEventProfilingInfo, clGetMutableCommandInfoKHR, clGetGLContextInfoKHR
The text was updated successfully, but these errors were encountered: