Skip to content

Commit cdfeea8

Browse files
authored
revert clGetEventInfo returning CL_COMPLETE is a sync point (#1558)
1 parent 2a92a43 commit cdfeea8

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

api/opencl_architecture.asciidoc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1976,11 +1976,6 @@ following:
19761976
wait-for-events function on *E* (e.g. the {clWaitForEvents} function
19771977
called from a host thread), then *E* global-synchronizes-with that
19781978
wait-for-events function call.
1979-
** Additionally, for OpenCL 3.1 and newer, *E* global-synchronizes-with an
1980-
API call *X* that observes that the status of *E* is complete.
1981-
For example, if a host thread queries the execution status of *E* using
1982-
{clGetEventInfo}, and the execution status is {CL_COMPLETE}, then *E*
1983-
global-synchronizes-with that call to {clGetEventInfo}.
19841979
. If commands *C* and *C1* are enqueued in that sequence onto an in-order
19851980
command-queue, then the event (including the event implied between *C*
19861981
and *C1* due to the in-order queue) signaling *C*'s completion

api/opencl_runtime_layer.asciidoc

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12946,13 +12946,16 @@ endif::cl_khr_semaphore[]
1294612946

1294712947
|====
1294812948

12949-
Prior to OpenCL 3.1, using {clGetEventInfo} to determine if a command identified
12950-
by _event_ has finished execution (i.e. whether
12951-
{CL_EVENT_COMMAND_EXECUTION_STATUS} returns {CL_COMPLETE}) is not a
12952-
synchronization point.
12953-
For OpenCL 3.1 and newer, if a call to {clGetEventInfo} to determine the
12954-
execution status of a command identified by _event_ returns {CL_COMPLETE}, then
12955-
the call to {clGetEventInfo} is a synchronization point.
12949+
[NOTE]
12950+
====
12951+
Calling {clGetEventInfo} with {CL_EVENT_COMMAND_EXECUTION_STATUS} is intended to
12952+
be a lightweight query, therefore it is not a host synchronization point.
12953+
This means that _event_ does not global-synchronize-with the call to
12954+
{clGetEventInfo}, even if the returned execution status is {CL_COMPLETE}.
12955+
When a host synchronization point is needed, call a function that waits on the
12956+
event instead, such as {clWaitForEvents}.
12957+
Refer to the <<memory-consistency-model, memory consistency model>> for details.
12958+
====
1295612959

1295712960
// refError
1295812961

0 commit comments

Comments
 (0)