Skip to content

[SYCL][host_task] Align host_task event submission clock with start/end clock #18377

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 12, 2025

Conversation

Nuullll
Copy link
Contributor

@Nuullll Nuullll commented May 9, 2025

The submission time for host_task events was previously obtained using std::chrono::steady_clock, while the command start and end times were derived from high_resolution_clock. This discrepancy in clock epochs led to meaningless duration calculations when users used submission time as a reference.

This update standardizes the clock source by switching the submission time to use high_resolution_clock, ensuring consistent and meaningful timing results for host_task events.

Note: steady_clock is not related to wall clock. See https://en.cppreference.com/w/cpp/chrono/steady_clock

…d time

The submission time for host_task events was previously obtained using
`std::chrono::steady_clock`, while the command start and end times were
derived from `high_resolution_clock`. This discrepancy in clock epochs led to
meaningless duration calculations when users used submission time as a
reference.

This update standardizes the clock source by switching the submission time to
use `high_resolution_clock`, ensuring consistent and meaningful timing results
for host_task events.

Note: `steady_clock` is not related to wall clock. See https://en.cppreference.com/w/cpp/chrono/steady_clock
@Nuullll Nuullll requested a review from a team as a code owner May 9, 2025 07:47
@Nuullll Nuullll requested a review from aelovikov-intel May 9, 2025 07:47
@Nuullll Nuullll temporarily deployed to WindowsCILock May 9, 2025 07:48 — with GitHub Actions Inactive
@Nuullll
Copy link
Contributor Author

Nuullll commented May 9, 2025

The updated test would fail without this change:

# executed command: env ONEAPI_DEVICE_SELECTOR=opencl:cpu /export/users/yilonggu/ws/intel-llvm/build/tools/sycl/test-e2e/Basic/Output/profile_host_task.cpp.tmp.out
# .---command stderr------------
# | Invalid latency between command_submit and command_start: 1731374010026546613 ns
# `-----------------------------
# error: command failed with exit status: 1

@Nuullll Nuullll changed the title [SYCL][host_task] Aligh host_task event submission clock with start/end clock [SYCL][host_task] Align host_task event submission clock with start/end clock May 9, 2025
@Nuullll Nuullll temporarily deployed to WindowsCILock May 9, 2025 08:10 — with GitHub Actions Inactive
@Nuullll Nuullll temporarily deployed to WindowsCILock May 9, 2025 08:10 — with GitHub Actions Inactive
@aelovikov-intel
Copy link
Contributor

host tasks need to be reviewed by @KseniyaTikhomirova

Copy link
Contributor

@KseniyaTikhomirova KseniyaTikhomirova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Nuullll
Copy link
Contributor Author

Nuullll commented May 12, 2025

@intel/llvm-gatekeepers this is ready to merge, thanks!

@steffenlarsen steffenlarsen merged commit 51e8d95 into intel:sycl May 12, 2025
20 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.

4 participants