Skip to content

Commit

Permalink
clarify no implicit dependencies when waiting on or signaling semapho…
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug authored Sep 3, 2024
1 parent d83f47b commit 507f5a3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions api/opencl_runtime_layer.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -13266,6 +13266,16 @@ events in _event_wait_list_ when {clEnqueueWaitSemaphoresKHR} returns.
Waiting on the same binary semaphore twice without an interleaving signal
may lead to undefined behavior.

[NOTE]
====
When _command_queue_ is an out-of-order command-queue there are no implicit
dependencies between the semaphore wait command and commands enqueued into the
command-queue after the semaphore wait command.
If such dependencies are required, applications may enqueue a command-queue
barrier after the semaphore wait command, to explicitly add dependencies between
the semaphore wait command and subsequent commands.
====

// refError

{clEnqueueWaitSemaphoresKHR} returns {CL_SUCCESS} if the function is
Expand Down Expand Up @@ -13355,6 +13365,16 @@ events in _event_wait_list_ when {clEnqueueSignalSemaphoresKHR} returns.
Signaling the same binary semaphore twice without an interleaving wait may
lead to undefined behavior.

[NOTE]
====
When _command_queue_ is an out-of-order command-queue there are no implicit
dependencies between commands enqueued into the command-queue before the
semaphore signal command and the semaphore signal command.
If such dependencies are required, applications may enqueue a command-queue
barrier before the semaphore signal command, to explicitly add dependencies between
the preceding commands and the semaphore signal command.
====

// refError

{clEnqueueSignalSemaphoresKHR} returns {CL_SUCCESS} if the function is
Expand Down

0 comments on commit 507f5a3

Please sign in to comment.