Missing synchronization after asynchronous copies?
This error was found with oclgrind and points to the last asynchronous copies in kernel4 and kernel_gradient:
Work-item finished without waiting for events.
Other kernels might suffer from this too:
- See master ->
- See [debugfastergrad](https://git.esa.informatik.tu- darmstadt.de/docking/ocladock/blob/debugfastergrad/device/kernel4.cl#L311) ->
Keep in mind the following information from the v2.0 standard:
This function does not perform any implicit synchronization of source data such as using a barrier before performing the copy.
The kernel must wait for the completion of all async copies using the wait_group_events built-in function before exiting; otherwise the behavior is undefined.