[VK] Support event profiling - #2149
Open
EwanC wants to merge 2 commits into
Open
Conversation
Implements Vulkan backend support for profiling SYCL events. Based on the approach taken in clvk, every command creates a single element query pool object per async instrumentation counter. This query pool element then a timestamp written to it by the device as part of command-buffer execution. I decided against a design with a single large query pool because the choice of query pool size would have been arbitrary, it is not possible to dynamically resize the pool if this limit is exceeded, and we don't free the instrumentation counters that often to allow the timestamps to return to the pool because a rt DAG node needs to outlive the user facing `sycl::event` object. Requires device support for the [VK_KHR_calibrated_timestamps](https://docs.vulkan.org/refpages/latest/refpages/source/VK_KHR_calibrated_timestamps.html) or [VK_EXT_calibrated_timestamps](https://docs.vulkan.org/refpages/latest/refpages/source/VK_EXT_calibrated_timestamps.html) extension to align device and host side counters. Closes AdaptiveCpp#2135
EwanC
marked this pull request as ready for review
July 13, 2026 06:16
EwanC
commented
Jul 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements Vulkan backend support for profiling SYCL events.
Every command creates a single element query pool object per async instrumentation counter. This query pool element then a timestamp written to it by the device as part of command-buffer execution. Either
VK_KHR_calibrated_timestamps or VK_EXT_calibrated_timestamps extension is then used to to align device counter with the host side timepoint expected by SYCL.
I decided against a design with a single large query pool because the choice of query pool size would have been arbitrary, it is not possible to dynamically resize the pool if this limit is exceeded, and we don't free the instrumentation counters that often to allow the timestamps to return to the pool because a rt DAG node needs to outlive the user facing
sycl::eventobject.There is a change to the SYCL profiling test to use device USM rather than shared USM, as shared USM isn't supported by the Vulkan backend and it's semantics over device USM aren't required for the test.
Closes #2135