Skip to content

[VK] Support event profiling - #2149

Open
EwanC wants to merge 2 commits into
AdaptiveCpp:developfrom
EwanC:vk/profiling
Open

[VK] Support event profiling#2149
EwanC wants to merge 2 commits into
AdaptiveCpp:developfrom
EwanC:vk/profiling

Conversation

@EwanC

@EwanC EwanC commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

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::event object.

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

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
EwanC marked this pull request as ready for review July 13, 2026 06:16
Comment thread tests/sycl/profiler.cpp Outdated
@EwanC EwanC added vulkan Issue relating to the Vulkan backend and removed vulkan Issue relating to the Vulkan backend labels Jul 16, 2026
@illuhad
illuhad requested a review from sbalint98 July 23, 2026 14:51
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.

[VK] Implement SYCL event profiling

1 participant