Skip to content

ci: one run per gate case, every verdict reported, measured values published - #580

Merged
tinebp merged 1 commit into
masterfrom
feature/ci-gates-quality
Dec 4, 2026
Merged

tinebp merged 1 commit into
masterfrom
feature/ci-gates-quality

Conversation

@tinebp

@tinebp tinebp commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

CI tests ensure correctness; gates ensure quality. This makes the perf and parity gates cheaper and their readout complete, without changing what they measure. The slogan goes into docs/designs/continuous_integration.md §1 and AGENTS.md.

What changes

  • One execution, two assertions. A perf_gate case runs SimX and rtlsim once. rtlsim is checked against the perf baseline, and SimX against that same rtlsim run, with the parity tolerance and counters.
    • 17 model_parity cases were the same run as a perf case once the configuration is resolved. Most just spelled the default thread count differently, and two were 35–50 min DXA WGMMA runs. They are removed.
    • The lint rejects new duplicates: it compares app, args, flags, the gen_config-resolved configuration, xlen, legs and env.
    • 32 perf cases are parity-checked for the first time.
  • Every verdict, failed once (ci/gate_report.py).
    • A gate case evaluates every check (perf config, instrs, cycles; parity instrs, cycles, counters) and fails once, listing all failures.
    • A broken SimX leg no longer hides the perf verdicts, and an unexpected exception becomes an error verdict.
    • The verdict table goes to the job summary.
  • Every run publishes its numbers.
    • Measured values are written, in the baseline format, to gate_results/perf and uploaded as gate-results-<cell>.
    • python3 ci/perf_baseline.py merge <dir> [ids] folds them into ci/baselines/perf, so a re-record needs no second run.
  • Workflow
    • The shard planner's runtimes.json is refreshed from the junit of each master push and weekly full run (Actions cache) instead of being maintained by hand.
    • A new push cancels the superseded run of the same PR.
    • synth_gate takes the toolchain from the build tree's config.mk when TOOLDIR is not exported, as make does.

Known parity issues (new checks, tracked)

Three NT=16 perf cases fail the parity check they did not have before. Each carries parity_known_issue: with its measured gap. SimX still runs, and the parity verdicts are reported as known issues. Their perf checks still fail as usual, and so do their NT=4 siblings' parity checks. Each fix removes its entry.

case gap issue
raytracing:perf_gate-rt_raycast-nt16 SimX 19.6% slow (60959 vs 50976) #577
graphics:perf_gate-draw3d-nt16 SimX retires 2 fewer instructions (50939 vs 50941) #578
dxa:perf_gate-wgmma-dxa-mcast-nt16 SimX 5.2% fast (76803 vs 81041) #579

Verification

  • perf_gate, full CI selection (51 cases), on master c6deb1c with the CI toolchain v3.0.4:
    • All perf checks pass against master's baselines, so no baseline changes.
    • Only the three cases above fail, and only their new parity check.
  • model_parity: 78/78 with this runner on 42f08ea. On c6deb1c, this change only removes cases from it.
  • Lint: passes (1047 cases), and it still rejects a re-added twin. actionlint passes.
  • Runner unit check with faked legs covers: several faults reported once, a broken leg, a known issue that passes, a known issue together with a perf regression, an exception, the summary, and the candidates.
  • Not verified locally: the CI-only steps (concurrency, runtimes cache, artifact uploads). This PR's own run exercises them.

🤖 Generated with Claude Code

…blished

CI tests ensure correctness; gates ensure quality. This makes the gates
cheaper and their readout complete, without changing what they measure.

One execution, two assertions. A perf_gate case now runs SimX and rtlsim once:
rtlsim is checked against its perf baseline and SimX against that same run, as
a model_parity case does. 17 model_parity cases were the same run as a perf
case once the configuration is resolved (most spelled the default thread count
differently; two were 35-50 min DXA WGMMA runs), so they are removed, and the
lint rejects a model_parity case that repeats a perf case's run. 32 perf cases
are parity-checked for the first time.

Every verdict, failed once. A gate case evaluates all its checks (perf config,
instrs, cycles; parity instrs, cycles, counters) and fails once, listing each
failure, instead of stopping at the first. A broken SimX leg no longer hides
the perf verdicts, and an unexpected exception is reported as an `error`
verdict. The session writes the table to gate_results/summary.md, which CI
puts in the job summary and uploads with the measured values.

Every run publishes its numbers. Each run writes what it measured, in the
baseline format, to gate_results/perf (cleared at session start);
`ci/perf_baseline.py merge` takes a CI run's candidates into
ci/baselines/perf, so a re-record no longer needs a local rerun.

Workflow. The shard planner's runtimes are refreshed by a `runtimes` job from
the junit of each push and weekly full run of master (Actions cache, merged
into the newest table), instead of a hand-maintained table; a new push cancels
the superseded run of the same pull request; synth_gate takes the toolchain
from the build tree's config.mk when TOOLDIR is not exported, as make does, so
a merge-base reference build uses the same toolchain as the build it is
compared with.

Known parity issues. Three NT=16 perf cases fail the parity check they did not
have before. Each carries `parity_known_issue:` with its measured gap: SimX
still runs and the parity verdicts are reported as known issues, while their
perf checks and their NT=4 siblings' parity checks fail as usual. The fix of
each removes its entry:
  - #577 raytracing perf_gate-rt_raycast-nt16: SimX 19.6% slow (60959 vs 50976)
  - #578 graphics perf_gate-draw3d-nt16: SimX retires 2 fewer instructions in
    the second draw (50939 vs 50941)
  - #579 dxa perf_gate-wgmma-dxa-mcast-nt16: SimX 5.2% fast (76803 vs 81041)

Verified on c6deb1c with the CI toolchain (v3.0.4): the full perf_gate
selection, 51 cases, all pass against master's baselines (no baseline moves);
the three NT=16 cases above fail only their new parity check. model_parity
78/78 with this runner on 42f08ea (on c6deb1c this change only removes
cases from it). Lint (and that it still rejects a re-added twin), actionlint,
and a faked-leg unit check of the verdict, known-issue, error, summary and
candidate paths. The workflow's cache, concurrency and artifact steps are CI-
only and unverified locally.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tinebp
tinebp merged commit 26e042b into master Dec 4, 2026
1 of 8 checks passed
@tinebp
tinebp deleted the feature/ci-gates-quality branch December 4, 2026 04:54
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.

1 participant