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

Semaphores and Associated Devices

Open bashbaug opened this issue 1 year ago • 0 comments

The query for clGetSemaphoreInfoKHR(CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR) says:

Returns the list of OpenCL devices the semaphore is associated with.

But, the spec is ambiguous how to "associate" a device with a semaphore, in particular in the cases when there is no explicit device handle list passed when the semaphore is created.

For example, consider:

If CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR is not specified as part of sema_props, the semaphore object created by clCreateSemaphoreWithPropertiesKHR is by default accessible to all devices in the context.

Should this say "is by default associated with" instead of "is by default accessible to"?

Depending how we resolve this we may be able to clean up several error code conditions also. For example, instead of:

We could just say "if the device associated with command_queue is not associated with the semaphore", or similar.

bashbaug avatar Aug 29 '24 16:08 bashbaug