Skip to content

Commit

Permalink
clarify no implicit dependencies when waiting on or signaling semaphores
Browse files Browse the repository at this point in the history
  • Loading branch information
bashbaug committed Aug 18, 2024
1 parent cf1c656 commit aca1247
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 @@ -13229,6 +13229,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 @@ -13318,6 +13328,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 aca1247

Please sign in to comment.