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.