You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To support the SYCL-Graph extension on an OpenCL backend, we currently
only require the presence of the `cl_khr_command_buffer` extension. This
PR introduces an extra requirement on the
[CL_COMMAND_BUFFER_SIMULTANEOUS_USE_KHR](https://registry.khronos.org/OpenCL/specs/3.0-unified/html/OpenCL_API.html#CL_COMMAND_BUFFER_SIMULTANEOUS_USE_KHR)
capability being present.
This is based on the [graph execution
wording](https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/experimental/sycl_ext_oneapi_graph.asciidoc#765-new-handler-member-functions)
on the definition of `handler::ext_oneapi_graph()` that:
> Only one instance of graph will execute at any time. If graph is
submitted multiple times, dependencies are automatically added by the
runtime to prevent concurrent executions of an identical graph.
Such usage results in multiple calls by the SYCL runtime to
`urEnqueueCommandBufferExp` with the same UR command-buffer and event
dependencies to prevent concurrent execution. Without support for
simultaneous-use the OpenCL adapter code cannot guarantee that the first
command-buffer submission has finished execution before it makes
following `clEnqueueCommandBufferKHR` calls with the `cl_event`
decencies. If the first submission is still executing, then an error
will be reported.
Workarounds like adding blocking host waits to the OpenCL UR adapter are
possible, but requiring simultaneous use reflects the vendor
requirements as they are for the currently implementation. I've tried to
document this all in the UR spec and SYCL-Graph design docs, which also
includes a couple of cleanups I found along the way.
Note that the new CTS test fails for Level-Zero adapter, which I've
created intel/llvm#17734 to resolve.
---------
Co-authored-by: Mikołaj Komar <[email protected]>
0 commit comments