Open
Conversation
5400bb2 to
9768c4f
Compare
petebachant
approved these changes
Apr 14, 2026
Member
petebachant
left a comment
There was a problem hiding this comment.
Overall LGTM with a few inline comments. Additionally:
- Does it make sense to sync the GPU right before each benchmark?
- Should we measure allocations as well?
- Has this latency ever been identified as a problem, i.e., has there ever been a change merged in that blew it up and dropped some simulation's SYPD significantly? Just curious.
| # intentionally benchmark without a sync | ||
| latency = median(@benchmark $scalar_field_1 .= $scalar_field_1 .+ $scalar_field_2).time | ||
| @test latency ≈ 20500 atol = 3000 | ||
| # update this value if the kernel launch time changes significantly and it is expected |
Member
There was a problem hiding this comment.
I would usually expect this comment above the line where it's defined
| lazy_sum_3 = @. lazy(lazy_sum_2 + lazy_sum_2) | ||
| latency = median(@benchmark $scalar_field_1 .= $lazy_sum_3).time | ||
| @test latency ≈ 29000 atol = 3000 | ||
| # update this value if the kernel launch time changes significantly and it is expected |
Member
There was a problem hiding this comment.
Same comment here about being above the definition line
| # basic expression | ||
| # intentionally benchmark without a sync | ||
| latency = median(@benchmark $scalar_field_1 .= $scalar_field_1 .+ $scalar_field_2).time | ||
| @test latency ≈ 20500 atol = 3000 |
Member
There was a problem hiding this comment.
Should we print something here in the logs like the absolute latency, difference from baseline, and percent change, so we'll know if we've made an improvement and by how much, so we can reset the baseline?
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.
Adds a test for kernel latency from the cuda ext. This does not include the time between the end of the CUDA launch api call end the actual start of the kernel.