llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL] Discard events created with enqueue function submission

Open steffenlarsen opened this issue 8 months ago • 2 comments

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.

steffenlarsen avatar Jun 19 '24 13:06 steffenlarsen