KhronosGroup / OpenCL-Docs

OpenCL API, OpenCL C, Extensions, SPIR-V Environment Specs, Ref page, and C++ for OpenCL doc sources.
Other
360 stars 114 forks source link

Behaivor of failed events in nonblocking host side enqueues #483

Open raunraun opened 4 years ago

raunraun commented 4 years ago

In clWaitForEvents CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST is returned for an event with a negative integer value. clEnqueueCopyBuffer does not have any language describing what happens if such an event appears in its wait list (the same applies to all non-blocking enqueue APIs - I think).

What is the expected behaviour for a failed event in a nonblocking enqueue's event wait list?

kpet commented 4 years ago

As per the execution model, the one thing that is guaranteed is that the command will not run since pre-requisites are not satisfied:

The second source of prerequisites is dependencies between commands expressed through events. A command may include an optional list of events. The command will wait and not launch until all the events in the list are in the state CL COMPLETE. By this mechanism, event objects define order constraints between commands and coordinate execution between the host and one or more devices.

What is not currently defined is the exact error propagation behaviour. I should we should define that better. I touched on this issue in this presentation: https://members.khronos.org/wg/OpenCL/document/24141