nvbench::cpu_timer changed to use steady_clock - #371
Merged
oleksandr-pavlyk merged 1 commit intoMay 20, 2026
Conversation
Using steady_clock is more appropriate for timing measurements. It guarantees that duration computed from two time-points will not contain correction deltas.
Collaborator
Author
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbitBug Fixes
WalkthroughThe PR modifies ChangesSteady clock for CPU timing
Assessment against linked issues
Comment |
oleksandr-pavlyk
requested review from
NaderAlAwar,
alliepiper and
bernhardmgruber
May 19, 2026 21:34
NaderAlAwar
approved these changes
May 20, 2026
oleksandr-pavlyk
added a commit
that referenced
this pull request
Jul 20, 2026
Use `device_clock = cuda::std::chrono::high_resolution_clock;` for readability improvement, and a chance for comment to state that using it in device code for timing purposes is correct and intentional. I looked at this as a follow-up to #371, which replaced std::chrono::high_resolution_clock with std::chrono::steady_clock. Per https://nvidia.github.io/cccl/unstable/libcudacxx/standard_api/time_library.html type cuda::std::chrono::steady_clock is not provided, and while high_resolution_clock is not heterogeneously steady, but is steady within device code and suitable for device-side performance measurement.
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.
Closes #370
Using
std::chrono::steady_clockis more appropriate for timing measurements. It guarantees that duration computed from two time-points will not contain correction deltas (positive or negative).