llvm
llvm copied to clipboard
[SYCL] Discard events created with enqueue function submission
This patch makes the enqueue free functions create discarded events when they do not return events. This allows calls to the backend to pass nullptr when enqueuing the functions, avoiding the creation of native events. This only happens under certain scenarios and currently only applies to in-order queues.
However, in-order queues relies on knowing the last event when enqueuing host_task commands. To address this case, the host_task will insert a barrier when the last event was discarded and use that event for synchronization instead. This case also applies to discarded events resulting from the use of the sycl_ext_oneapi_discard_queue_events extension.
Since the ABI-breaking window is opening, I took the liberty of removing the unused ctors and have marked this as ABI-breaking.
Since the ABI break will need separate approval, I have decided to roll it back here and do it as a follow-up.