llvm
95ed2199 - [SYCL] Scheduler-bypass path for the handler overloads of async alloc/free (#23353)

Commit
11 days ago
[SYCL] Scheduler-bypass path for the handler overloads of async alloc/free (#23353) Asynchronous allocations and frees submitted through a handler always went through the scheduler, even though they carry no requirements and map to a single backend command each: the allocation is enqueued eagerly by `async_malloc()`, so its command group is a no-op which only carries the resulting event, and a free is a single `urEnqueueUSMFree` call. Extend the existing scheduler bypass in `handler::finalize()` to both command group types, reusing the entry points added for the queue overloads, and rename `KernelSchedulerBypass` to `SchedulerBypass`, as it is no longer kernel specific. The event of the allocation is not requested from the backend any more when the submission does not create an event to take its ownership, which fixes a leak: 100 allocations submitted with `submit()` on an in-order queue reported 200 `zeEventCreate` against 100 `zeEventDestroy` calls under `UR_L0_LEAKS_DEBUG`. The E2E test covers that case under the leak checker now. Assisted-By: Claude
Author
Parents
Loading