Skip to content

improve device performance timing for kernels only - #478

Merged
bashbaug merged 5 commits into
intel:mainfrom
bashbaug:improve-device-performance-timing-kernels-only
Aug 27, 2026
Merged

improve device performance timing for kernels only#478
bashbaug merged 5 commits into
intel:mainfrom
bashbaug:improve-device-performance-timing-kernels-only

Conversation

@bashbaug

Copy link
Copy Markdown
Contributor

Description of Changes

If we are only collecting device performance timing for kernels, there is no need to attach an event to non-kernel commands when no event is requested by the application, which saves unnecessary event creation and immediate destruction.

Also adds a cliloader command-line option to collect device performance timing for kernels only.

Also fixes an issue preventing device performance timing information from being collected for buffer and image map commands. Unlike other enqueue commands, buffer and image map commands return the pointer being mapped rather than an OpenCL error code.

Testing Done

Tested with a simple test app. Verified that all device performance timing information is reported (including for maps and unmaps) when no additional controls are set, and that only kernel device performance timing is reported when the control to collect device performance timing for kernels only is set.

If we do not care about device performance timing for non-kernel
commands, skip creating an event for these commands if one is not
requested by the application.
Since we've already checked for DevicePerformanceTimingKernelsOnly
when determining whether to do device performance timing, we do not
need to check for it again to determine whether to add the timing
event.
It's a lot easier to always have the correct error code available
for map commands.
@bashbaug
bashbaug merged commit 7b1fb9e into intel:main Aug 27, 2026
8 checks passed
@bashbaug
bashbaug deleted the improve-device-performance-timing-kernels-only branch August 27, 2026 14:49
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.

1 participant