Skip to content

Conversation

@lslusarczyk
Copy link
Contributor

@lslusarczyk lslusarczyk commented Dec 9, 2025

The optimization results in moving shared_pointer inside createSyclObjFromImpl instead of copying and thanks to it we save two atomic operations (see e.g. this SO thread).

I've applied it to all possible places in the code, leaving only these where copying is indeed needed (mostly for context_impl use).

Results summary

overhead over UR reduced by ~8% in scenarios using events. Other benchmarks also show visible improvements in many cases, including new pytorch multiqueue benchmarks which improved overall by 2.7%

Results Examples

The new result is expressed by dots on the right sides of plots.

SubmitKernel out of order using events long kernel, CPU count(1) old = 134.6, new = 132.8, UR baseline = 113, overhead over UR reduced by 8.3% SubmitKernel out of order with completion using events, CPU count(4)

old = 140, new = 138.2, UR baseline = 118.1, overhead over UR reduced by 8.1%

SubmitKernel in order, CPU count(5)

old = 122.3, new = 121.3, UR baseline = 108.1, overhead over UR reduced by 7.0%

SubmitKernel in order using events(2)

old time = 13.91, new time = 13.58, whole stack reduced by 2.4%

And finally new pytorch microbenchmarks:

KernelSubmitMultiQueue small

old time = 1.81, new time = 1.76, L0 baseline = 1.44
whole stack reduced by 2.8%, overhead over L0 reduced by 13.5%

@lslusarczyk lslusarczyk marked this pull request as ready for review December 9, 2025 15:21
@lslusarczyk lslusarczyk requested a review from a team as a code owner December 9, 2025 15:21
@lslusarczyk lslusarczyk requested a review from againull December 9, 2025 15:21
@againull againull merged commit 4a245b8 into intel:sycl Dec 9, 2025
102 of 107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants