Skip to content

Commit e2f9d3f

Browse files
dennisYatuninclaude
andcommitted
Widen kernel launch latency tolerance to cover scheduler variance
The latency benchmarks measure identical launch code at values that differ by a uniform ~3.5 microseconds depending on which GPU and CPU cgroups SLURM assigns to the job: builds 7080 and 7081 ran the same host launch path on the same node and measured 16990 vs 20530 ns (GPU index 3 with CPU 3 vs GPU index 0 with CPU 0). An atol of 2000 ns cannot distinguish this assignment variance from a real regression, so raise it to 4000 ns, shared by all three benchmarks. A genuine per-launch regression like the one caught in round 17 (+7000 ns) would still fail. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 45db370 commit e2f9d3f

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

test/gpu/latency_benchmarks.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ import LazyBroadcast: lazy
3131
latency = median(@benchmark $scalar_field_1 .= $scalar_field_1 .+ $scalar_field_2).time
3232
# update this value if the kernel launch time changes significantly and it is expected
3333
baseline_latency = 18000
34-
@test latency baseline_latency atol = 2000
34+
# The tolerance must cover scheduler-assignment variance: identical code
35+
# measures launch latencies that differ by up to ~3.5 μs depending on which
36+
# GPU and CPU cgroups SLURM assigns to the job (builds 7080 and 7081 ran on
37+
# the same node with different GPU indices and measured 16990 and 20530 ns).
38+
latency_atol = 4000
39+
@test latency baseline_latency atol = latency_atol
3540
percent_change_latency =
3641
round(Int, (latency - baseline_latency) / baseline_latency * 100)
3742
@info "Latency: $latency ns, Percent change from baseline: $percent_change_latency%"
@@ -45,7 +50,7 @@ import LazyBroadcast: lazy
4550
).time
4651
# update this value if the kernel launch time changes significantly and it is expected
4752
baseline_latency = 28500
48-
@test latency baseline_latency atol = 2000
53+
@test latency baseline_latency atol = latency_atol
4954
percent_change_latency =
5055
round(Int, (latency - baseline_latency) / baseline_latency * 100)
5156
@info "Latency: $latency ns, Percent change from baseline: $percent_change_latency%"
@@ -58,7 +63,7 @@ import LazyBroadcast: lazy
5863
latency = median(@benchmark $scalar_field_1 .= $lazy_sum_3).time
5964
# update this value if the kernel launch time changes significantly and it is expected
6065
baseline_latency = 46000
61-
@test latency baseline_latency atol = 2000
66+
@test latency baseline_latency atol = latency_atol
6267
percent_change_latency =
6368
round(Int, (latency - baseline_latency) / baseline_latency * 100)
6469
@info "Latency: $latency ns, Percent change from baseline: $percent_change_latency%"

0 commit comments

Comments
 (0)