Skip to content

Commit 443d25b

Browse files
authored
unify the CL_INVALID_COMMAND_QUEUE behavior for semaphore signals and waits (#1256)
1 parent fe6b158 commit 443d25b

2 files changed

Lines changed: 11 additions & 7 deletions

File tree

api/cl_khr_semaphore.asciidoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,3 +255,6 @@ while (true) {
255255
{CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR} (provisional).
256256
* Revision 1.0.0, 2024-03-15
257257
** First non-provisional version.
258+
* Revision 1.0.1, 2024-09-08
259+
** Unified {CL_INVALID_COMMAND_QUEUE} error behavior for
260+
{clEnqueueSignalSemaphoresKHR} and {clEnqueueWaitSemaphoresKHR}.

api/opencl_runtime_layer.asciidoc

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13285,7 +13285,9 @@ Otherwise, it returns one of the following errors:
1328513285
** if _command_queue_ is not a valid command-queue, or
1328613286
** if the device associated with _command_queue_ is not same as one of the
1328713287
devices specified by {CL_SEMAPHORE_DEVICE_HANDLE_LIST_KHR} at the time
13288-
of creating one or more of _sema_objects_.
13288+
of creating one or more of _sema_objects_, or
13289+
** if one or more of _sema_objects_ belong to a context that does not
13290+
contain a device associated with _command_queue_.
1328913291
* {CL_INVALID_VALUE} if _num_sema_objects_ is 0.
1329013292
* {CL_INVALID_SEMAPHORE_KHR} if any of the semaphore objects specified by
1329113293
_sema_objects_ is not valid.
@@ -13398,11 +13400,11 @@ Otherwise, it returns one of the following errors:
1339813400
_sema_objects_ requires a semaphore payload and _sema_payload_list_ is
1339913401
`NULL`.
1340013402
* {CL_INVALID_EVENT_WAIT_LIST}
13401-
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is not
13402-
0, or
13403-
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is
13404-
0, or
13405-
** if event objects in _event_wait_list_ are not valid events.
13403+
** if _event_wait_list_ is `NULL` and _num_events_in_wait_list_ is not 0,
13404+
or
13405+
** if _event_wait_list_ is not `NULL` and _num_events_in_wait_list_ is 0,
13406+
or
13407+
** if event objects in _event_wait_list_ are not valid events.
1340613408
* {CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST} if the execution status
1340713409
of any of the events in _event_wait_list_ is a negative integer value.
1340813410
* {CL_OUT_OF_RESOURCES} if there is a failure to allocate resources
@@ -13411,7 +13413,6 @@ Otherwise, it returns one of the following errors:
1341113413
required by the OpenCL implementation on the host.
1341213414
--
1341313415

13414-
1341513416
=== Retaining and Releasing Semaphores
1341613417

1341713418
[open,refpage='clReleaseSemaphoreKHR',desc='Release a semaphore object',type='protos']

0 commit comments

Comments
 (0)