I have a collection of thousands of SYCL kernels to execute. Once each of these kernels has finished, I need to execute a function on a cl::sycl::buffer
written to by said kernel.
The methods I'm aware of for achieving this are:
- by using RAII; the requisite global memory is copied back to the host upon destruction of the
cl::sycl::buffer
- by constructing a host
cl::sycl::accessor
(withcl::sycl::access::target::host_buffer
)
Both of these methods are synchronous and blocking. Is it possible to instead attach an asynchronous callback/continuation when submitting kernels to a cl::sycl::queue
that executes as soon as the kernel has finished? Or even better, can the same functionality be achieved with C++2a coroutines? If not, is such a feature planned for SYCL?