llvm icon indicating copy to clipboard operation
llvm copied to clipboard

[SYCL] Discard events created with enqueue function submission

Open steffenlarsen opened this issue 1 year 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

Since the ABI-breaking window is opening, I took the liberty of removing the unused ctors and have marked this as ABI-breaking.

steffenlarsen avatar Jun 28 '24 07:06 steffenlarsen

Since the ABI break will need separate approval, I have decided to roll it back here and do it as a follow-up.

steffenlarsen avatar Jun 28 '24 08:06 steffenlarsen