Skip to content

test(perf): scale the dense compile guards to the runner and judge warm and edit on medians - #1395

Merged
kvlonge merged 3 commits into
mainfrom
fix/dense-guard-median
Nov 9, 2026
Merged

kvlonge merged 3 commits into
mainfrom
fix/dense-guard-median

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

The dense compile guards compare wall time with absolute budgets. Hosted runners come in CPU classes whose speed differs by up to 1.6x, so the guards judged the runner rather than the compiler: unchanged code from main failed the 5,000-model budgets on slower runners.

Changes

  • Warm and one-model edit guards take the median of three runs in one job. The 9.0 s and 9.5 s budgets, per-run checks and fingerprints are unchanged.
  • Before each dense guard, a fixed pure-Python workload, independent of SQLBuild, times the runner. The budgets scale by its fastest repetition over a 0.55 s reference, floored at 1.0, so classes the budgets already fit keep them unchanged.
  • The CPU model, every repetition, the factor and the effective budgets are printed.
  • Same-runner ratio jobs are unchanged and remain the regression detector. Test-only, so there is no DuckShop case.

Verification

make check-ci passed. Dense 5,000-model job on this branch, every run passing:

CPU Calibration (s) Factor Cold (s) Warm median (s)
EPYC 9V45 (4 runs) 0.31-0.39 1.00 10.3-11.3 6.0-6.5
EPYC 7763 0.61-0.62 1.11-1.13 17.34 9.19
Xeon 8370C 0.67 1.21-1.23 16.17 8.10

EPYC 9V74 (0.46-0.52 s) and Xeon 8573C (0.54 s) were measured on the 1,000-, 3,000- and 10,000-model jobs and keep factor 1.0.

Against the 9V45, the factor over-reads the compile slowdown (7763: 1.86x against 1.49x warm; 8370C: 2.0x against 1.32x). That leaves slower runners slack and never undershoots.

…ee runs

The warm and one-model edit budgets were checked against one compile each,
so a single slow moment on a hosted runner failed changes that leave the
compiler untouched. The guard now runs three warm compiles and three edits
in the same job and compares their medians with the unchanged budgets.
Every run still checks diagnostics, peak memory and cache behaviour; warm
runs keep the cold fingerprint and the final edit still matches the
from-scratch oracle.
@kvlonge kvlonge added the full-verify Run the full Verify matrix on this pull request label Nov 9, 2026
@kvlonge
kvlonge enabled auto-merge (squash) November 9, 2026 19:36
@kvlonge
kvlonge disabled auto-merge November 9, 2026 19:38
Hosted runners differ by CPU class, and the same compiler measures about
a third slower on the slower class, so the dense guard's absolute
budgets judged the runner rather than the code. Before each dense cold
and warm/edit guard, the job now times a fixed interpreter workload that
does not depend on SQLBuild, in a fresh process, and scales the wall
budgets by its fastest repetition over the reference time, floored at
1.0 so a faster runner keeps today's budgets. The calibration times,
CPU model, factor and effective budgets are printed with the
measurements. Same-runner ratio jobs remain the regression detector.
…amples

Across EPYC 9V45, 9V74 and 7763 and Xeon 8573C and 8370C runners the
calibration's fastest repetition ranged from 0.31 s to 0.67 s. The
reference is the top of the classes the dense budgets already fit
(0.55 s), so those keep factor 1.0 and only measurably slower runners
get a larger budget.
@kvlonge kvlonge changed the title test(perf): judge the dense warm and edit guards on the median of three runs test(perf): scale the dense compile guards to the runner and judge warm and edit on medians Nov 9, 2026
@kvlonge
kvlonge enabled auto-merge (squash) November 9, 2026 21:53
@kvlonge
kvlonge merged commit 5c573c2 into main Nov 9, 2026
42 checks passed
@kvlonge
kvlonge deleted the fix/dense-guard-median branch November 9, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

full-verify Run the full Verify matrix on this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant