Commit Graph
43 Commits
Author SHA1 Message Date
Anees Iqbal 5749d7c461 matrix: the UHD 630's zero_products allowance waits for the step's reach
a3eb19eaa5 landed before the ruling that holds it. One UHD job first measures whether the
1/1024 s grid of that row's GPU time is a duration threshold (zero_products at 1/2, 1/4 and 1/8
of its threads off the grid, alu at 2x and 4x on it), in which case the harness row is shrunk
below the threshold on every card and no card-keyed allowance is needed; or the kernel's shape,
in which case it goes back to the planner. The allowance re-lands as written if the job says it
is needed.

Verified: the change removes exactly a3eb19eaa5's lines (git revert of that commit).
2026-11-18 11:28:15 -08:00
Anees Iqbal d567dd503f matrix: the UHD 630's zero_products row allows one step of its GPU time's 1/1024 s grid
On the UHD 630 (8086:3e9b) zero_products' GPU time, two GPU timestamps under one calibration,
moves in steps of 1/1024 s (976.6 us) on both runtimes: of the readings in hand (m3-max-47184,
47250, 47436, 47449), the new runtime's 26 sit 7.2 to 26.1 us past a step and the old
runtime's 6 sit 58 to 71 us before one, where no other UHD row of 5 ms or more sits on it (0 of
16 per row on the new runtime, 0 of 6 on the old). Eight of its dispatches back to back in one
command buffer (47606) moved by eight steps, so each dispatch takes whole steps. The planner
ruled the row quantised on that card: its judgement allows one step. One step over old's
19.46 ms is a ratio of 1.05, so HARNESS_CEILINGS gives the row 1.05: under the budget's 1.03
its limit is 1.08, which one step (1.05) passes and two (1.10) fail. Judgement only; no product
code changes.

Verified: test_results.py, with the counter-window fix's check (job named with this sha).
2026-11-18 11:27:09 -08:00
Anees Iqbal aeed1fe9e1 matrix: ceilings for the 2080's and 3090's create_64MiB/first_take and the Iris's create_private_16MiB/first_take, as the planner ruled
The planner re-floored the three rows at rt's measured medians from the full matrix at
8a39262627 (1.876 on the 2080, 2.252 on the 3090, 1.877 on the Iris), each with the reason beside
it, and they ratchet down from there.

The take split (probe ef7d99c4d1's predecessor f0b71e45bb, never landed; m3-max-46108 on the
2080, 46176 on the 3090, 46109 on the Iris, one round each, two processes per arm, run as the
matrix runs the creation rows): on NVIDIA the old runtime's 64 MiB Shared buffer is one host
pointer import of fresh anonymous pages (6.4 to 8.2 ms) with no zeros written, a form it picks by a
submission check at run time; rt makes a 64 MiB allocation (10.0 ms on the 2080, 15.4 to 17.4 ms on
the 3090) and zeroes it (2.5 to 2.6 ms). The harness's first touch after the call costs the same on
both, so nothing is deferred. rt takes no such import form (one form per device, and a held import
taxes every RADV submission). On the Iris the old runtime's Private 16 MiB first take allocates on
no thread (create and bind, 4.4 us), carving it from a Private block it already holds; rt's takes
a new block, and its first GPU fill's recording (680 us) and the first GPU use of the new block
stay open against the row.
2026-11-18 05:42:34 -08:00
Anees Iqbal eb16d34f15 matrix: the instructions gate judges the new runtime's own threads, a driver's left beside
The burst rows' whole-process count swung by up to 25 million instructions per run between
processes on NVIDIA, all of it in the driver's own "[vkrt] Analysis" thread, while rt's own
threads held steady (48-50k instructions per command buffer on the 2080, 23k on the XTX). A gate
on the whole count judged the driver.

rt now registers the OS id of every thread it starts in Gauges::threads, at one place: the
spawn helper device::start, which the reaper, block-maker, submit and completion threads and the
cache store's removal thread all start through. A thread holds its slot until it ends. The list
is bounded by construction (5 slots), nothing on a commit or submit path reads it, and
Device::new's paths are untouched. devtools gains ThreadInstructions (per-thread user-space
counters by OS id, a thread that already ended skipped) and this_thread. The harness reads the
runtime's thread ids through Device::threads before a row's timed runs, counts them with its own
thread, and records own_per_run and others_per_run beside per_run. Every counter read now sits
outside the timed wall span.

results.py, per the planner's ruling: EXACT, the new runtime's own count at most 1.03 times its
stored count (instructions.tsv now holds own counts), ratcheting down; LENIENT, named on every
row, the own count at most the old runtime's whole count, old's driver share not separable since
the old runtime names no threads. A whole count with no own count fails the row. The base
comparison skips the harness's counts: the gate judges them.

Verified: scripts/matrix/test_results.py, 42 tests OK locally. Builds and the other suites run
on the check job.
2026-11-18 05:04:14 -08:00
Anees Iqbal 8b428fe5ed matrix: a compute creation row's call alone is shown beside its first use, never judged
The cold-creation split (probe a3318b088f, m3-max-45806/45807/45809/45810) found the old
runtime returning from new_compute_pipeline_state before it makes its VkPipeline: no
vkCreateComputePipelines runs inside the call, and the driver's compile comes before the first
dispatch completes. rt compiles inside the call, as Metal does at newComputePipelineState. A
compute creation row's `/first` sample already spans the creation, one dispatch and the wait
for it (CreateReport::first_us), so that row compares like with like. The call alone was only
in the table's text.

The harness now also records it as `harness-<runtime>/<row>/first_call` for a compute state row.
The creation processes keep it like the other first samples (FIRST_KEEP matches it as is).
results.harness_budget shows it with the median of each runtime's five processes and their
ratio, as "shown, not judged: the creation call alone, which old returns from before it makes
its pipeline", and never judges it. One process's sample alone is not shown. `/first` and its
floors are unchanged. The planner approved this form.

Test: test_a_creation_call_alone_is_shown_beside_its_first_use_and_never_judged. Docs:
VALIDATION.md's creation and harness budget paragraphs.

Verified: nothing yet; the Python suite and the harness build are reported with this sha.
2026-11-18 04:26:08 -08:00
Anees Iqbal 6ab8b5da26 matrix: a job's script travels in its environment, not on its command line
The UHD 630 leg's harness job has failed in three matrices (0bd215eee3 among them, job
m3-max-45587) with "bash: -c: line 49: unexpected EOF while looking for matching `''" before any
row ran. The Windows host starts a job's command through a command line cut at 8,191
characters. The harness leg's script carries every leg's per-row limits and grew from 3,271
bytes at aaf4d16993 (last good UHD harness run) to 12,837 at 0bd215eee3 and 16,075 at
b2e33dba6d. Byte 8,191 of the 0bd215eee3 script falls on its line 49, the line bash named.

The script now goes in the job's environment (M2V_JOB, read and unset before it runs), and the
command line is a fixed one-liner, on every node. A Windows variable holds 32,767 characters.

Verified: the 0bd215eee3 and b2e33dba6d scripts parse with bash -n on macOS (so the script itself
is whole); a test job on the mini with an 18,627-byte script in M2V_JOB, against the same script
as the argument (control), is in the landing message.
2026-11-18 03:39:53 -08:00
Anees Iqbal d2e5edbd60 harness and matrix: record the whole process's instructions per run and gate the frame and burst rows on them
The harness now counts each timed run's user-space instructions across the whole process. The
counts repeat run to run where the times do not: rt's p50 spread across processes was 0.16 to
0.27%. The matrix gates the frame and burst rows (WALL_ROWS) on those counts, beside the host-time
judgement and floors they keep under the GPU-p50 rule.

devtools: ProcessInstructions opens one user-space instructions counter per core type with
inherit set, so every thread started after it opens counts: the runtimes' and the drivers'
threads too. The harness opens it first thing in main, before any device starts a thread, and
each timed run records the counted delta. A node that refuses perf_event_open, and every
non-Linux host, records none.

harness: each row whose runs were not sized prints
`M2V-MATRIX instructions harness-<runtime>/<row>/per_run <p50>`.

matrix: a frame or burst row with a count on both runtimes passes the instructions gate as well as
its time's limit:
- it fails when rt's count is over old's;
- it fails when rt's count is past 1.03 times the stored count in scripts/matrix/instructions.tsv
  (one column per driver family, `all` where the legs agree within 3%);
- it is named when its count is more than 1% under the stored count, which then ratchets down;
- it is named when no count is stored, and is then gated against old alone.
The single-kernel rows stay judged on their GPU p50 as before, and every row's count is shown
beside its times. The old runtime's harness counts are parked from the per-record
instructions-versus-base check, like its times. instructions.tsv starts empty: a matrix run's
counts seed it. VALIDATION.md describes the time rules and the gate in one paragraph.

Verified: scripts/matrix tests (python3 -m unittest discover, 45 OK) on this Mac, over this rule
and the GPU-p50 rule together. Before the rebase, check m3-max-45591 on msi (at c597bb3603) passed
clippy x4, nextest for devtools, harness and rt (118 passed, with the process counter's test), and
the release harness build. Count job m3-max-45641 on the 2080's node recorded the per_run count of
every row on both runtimes except long_4cb, which is sized.
2026-11-18 03:31:27 -08:00
Anees Iqbal b2e33dba6d matrix: a harness row with a GPU time is judged on it against the old runtime's GPU-time floor
The planner's ruling on the old-against-old GPU-p50 floors. On the XTX, whose host-time floors
reach 1.2-1.3 on the shader rows (8 runs, m3-max-45546), the same runs' GPU p50 spreads 1.004 on
simd_reduce (36.96-37.12 us, host time 44.9-55.8 us), 1.008 on narrow_ints, 1.012 on image_filter
and 1.024 on constexpr_sampling: the host time's spread is the host's, not the card's. So:

- A row with a GPU time on both runtimes is judged on its GPU p50, new over old, against the old
  runtime's GPU-time floor on that leg (the new scripts/matrix/gpu-floors.tsv), with its host
  times shown beside it. A ceiling applies to the time its row is judged on.
- The frame and burst rows (WALL_ROWS) stay on their host time and its floor, with the
  instructions gate: their GPU time spans the gaps between their command buffers and spreads as
  widely on several GPUs (1.68 on the Iris Xe's frame_5cb, 1.43 on the UHD 630's
  burst_160_shared). gpu-floors.tsv lists no such row.
- CARD_VARIANCE names rows whose GPU time varies on the card itself: the XTX's sampling (GPU p50
  16.3-20.3 us over the 8 runs; 1.264 in the earlier 4-run set, m3-max-45424) and
  constant_managed (66.8-69.2 or 74.4 us). They are judged like any other row, never fail a leg,
  and are named on its line as the card's variance.
- A re-timed run keeps the row's GPU time too (RETIME_KEEP, harness-retime-gpu/), and the re-time
  selection chooses by the same measure (RETIME_SELECT with GPULIMITS and WALLRE), so a row judged
  on its GPU time is re-timed and judged on its re-timed GPU pairs.

gpu-floors.tsv comes from the runs behind floors.tsv, no new job: the harness of 4cc7963005, 4
runs of `harness --runtime old` per leg (8 on the XTX), jobs m3-max-45422 (1002:15bf), 45430
(1002:1900), 45423 (1002:699f), 45546 (1002:744c), 45425 (10de:1e87), 45426 (10de:2204), 45437
(8086:3e9b) and 45427 (8086:a7a0). Its header notes that the UHD 630's texture_read (1.075) and
the Iris Xe's wide_bindings (1.097) are those GPUs' floors, not reds.

Verified: the matrix's Python tests (42, 4 new: a row with a GPU time judged on it and a frame or
burst row on its time, the GPU floor and the re-timed GPU pairs, a card's variance named and
failing nothing, the re-time keeping both times), run locally; the harness runs' shell renders
and passes `bash -n` for a leg with limits.
2026-11-18 03:24:47 -08:00
Anees Iqbal 1b14efb96b matrix: the XTX leg's floors from 8 old runs, whose spread 4 runs did not cover
Three old-against-old pairs on the XTX (m3-max-45492, 45510, 45521) put a row past its 4-run floor
each time, in different rows: sampling at 1.258 against a floor of 1.160 in 45510, and
constexpr_sampling at 1.236 against 1.217 in 45521. Neither the desktop compositor (0.0% CPU across
45510) nor the clock state (sclk and mclk sampled in 45521: one wide row moved with sclk, two did
not) explains it, so the planner ruled the leg's floors measured again with 8 runs.

Measured with the same harness as the other legs (4cc7963005's), in m3-max-45546: 8 runs of
`harness --runtime old`, A B B A twice, each its own process on a fresh driver shader cache and
store; a row's floor is the largest of its 8 times over the smallest. Workload rows now over 1.10:
constexpr_sampling 1.259, frame_5cb 1.258, sampling 1.327, simd_reduce 1.243, image_filter 1.172,
narrow_ints 1.200, threadgroup_scan 1.111. Other legs are unchanged.

Verified: the matrix's Python tests in the check job named in the hand-over.
2026-11-18 03:12:27 -08:00
Anees Iqbal 813dd5cfd7 matrix: jobs sized from whole builds' peaks, and a job short of RAM runs again with twice its room up to the default
The UHD leg of matrix e060958855 lost its Windows build twice to memory:
45442 at 3 GiB (137), then the retry 45471 at 6 GiB (rustc-LLVM out of
memory, 137), and the leg failed with no tests run. The sizing took the
last three runs' peaks, incremental builds in a kept workspace that peak
far below a build of most of the tree, and a job short of RAM ran once more
only, at twice its room.

Now a job's RAM is 1.3x the largest peak of the last three runs that
started in a fresh workspace (each run records whether it did), else the
kind's default; minutes still follow the last three runs of either form.
A job short of RAM runs again with twice its room until it reaches the
kind's default (16 GiB for winbuild).

Verified: scripts/matrix tests, 39 OK, run locally. The new test_matrix.py
fails on the old code (it sized from incremental peaks and retried once:
dispatches 4 and 8 GiB, not 4, 8 and 16).
2026-11-18 02:57:17 -08:00
Anees Iqbal 3cf9519fce matrix: the 1002:1900 leg's floors, measured as the other seven were
um870's 780M (1002:1900) had no column, so its rows had a floor of 1. Measured with the harness of
4cc7963005 as the other legs were (m3-max-45430): 4 runs of `harness --runtime old`, A B B A,
each its own process on a fresh driver shader cache and store; a row's floor is the largest of
its 4 times over the smallest. Its workload rows over 1.10: burst_160 1.133, frame 1.215,
frame_5cb 1.212; alu is 1.017.

Verified: the matrix's Python tests in the check job named in the report.
2026-11-18 02:42:48 -08:00
Anees Iqbal 56efbd0e13 matrix: the floors measured with the mean statistic on seven legs; the seeded-floor stopgap deleted
scripts/matrix/floors.tsv held floors seeded from old-runtime runs under the nearest-rank
statistic, some of them the old runtime's paired completions read as a fast run (alu 22.066 on
the 780M leg, 19.640 on the Iris). Measured again with the harness of 4cc7963005 (a row's time the
lowest mean of its windows of 10 timed runs, an untimed run after each gauge read): 4 runs of
`harness --runtime old` per leg, A B B A, each its own process on a fresh driver shader cache and
store, a sized row at the first run's size; a row's floor is the largest of its 4 times over the
smallest. Legs: 1002:15bf (gem10's 780M, m3-max-45422), 1002:699f (m3-max-45423), 1002:744c
(m3-max-45424), 10de:1e87 (m3-max-45425), 10de:2204 (um870's 3090, m3-max-45426), 8086:3e9b
(m3-max-45437) and 8086:a7a0 (m3-max-45427). 1002:1900 (um870's 780M) is not measured yet; a leg
the file does not list keeps a floor of 1. The seed's 1002:15bf column came from runs on
1002:1900.

With the table measured, the seeded-floor naming goes: SEEDED_FLOOR_OPEN, seeded_floor() and their
uses in harness_budget, its test, and VALIDATION.md's sentence on the seed.

Verified: the matrix's Python tests in the check job named in the report.
2026-11-18 02:41:31 -08:00
Anees Iqbal 5abbd52c0e matrix: the memory pool's blocks gauge fails only on a rise between iterations 100 and 200
The matrix at cbd4644463 failed long_4cb's blocks gauge on the XTX, 2080
and 3090 (9 at iteration 100, 8 at 200). The cause, from the quiet probe
(each idle free logs the time since the last commit): the pool frees an
allocation an earlier workload left idle once the most bytes in use over
its window falls and the device has been quiet for 20 ms, and long_4cb is
the first row after the earlier rows' peak whose runs leave 20 ms gaps
between submissions. On the RTX 5080 (b5080 entry quiet5080, q10
0c0e50688a / q3 6b8cd2b793, 2 runs each) the 10 s window freed a 16 and
two 64 MiB allocations 6.5 and 7.5 s into long_4cb (11 -> 8), the 3 s
window the two 64 MiB ones 0.53 s in (8 -> 8); every free in every run on
the 5080, XTX (m3-max-45392) and 2080 (m3-max-45391) began 20.0 to 52 ms
after the last commit, so the quiet clock saw every commit.

Per the planner's ruling, the pool's gauges (blocks) now fail only if
they rise between @100 and @200; @drop still has to be 0, and every other
gauge stays flat. Verified: scripts/matrix tests, 37 OK, run locally; the
new test fails without the change (a fall of blocks is a problem there).

The commit before this one (1f41099948) shows each row's GPU p50
(store2's harness-gpu-<runtime>/<row> records, parked) beside its time
in the budget's lines and in a list of every row that run and show print
under each leg, and names a row that passes only on a seeded floor over
1.10. Its tests (36 OK at that commit) pin the line formats.
2026-11-18 02:32:53 -08:00
Anees Iqbal 5422cf1825 matrix: every row's GPU p50 beside its time; rows passing only on a seeded floor over 1.10 named 2026-11-18 02:32:53 -08:00
Anees Iqbal de2ce035e9 matrix: creation rows timed alone in five processes, per-row floors, an A B B A re-time
The planner's timing rule for the matrix's harness legs:

- The harness takes `--skip NAME,...`, and a name ending in `*` in `--only` or `--skip` names
  every workload it starts. A name that names no workload is an error.
- Each runtime's harness run skips the creation rows (`--skip 'create_*'`); they then run alone
  (`--only 'create_*'`) in five processes per runtime, each with a fresh driver cache and store,
  so no row before them moves their times. The first process's records are kept whole, its
  device's gauges at drop renamed to harness-<runtime>/creates/device/... so every key is
  recorded once; the later processes keep only the creation rows' first samples, as
  harness-first/<row>/<n>/<runtime> (parked records).
- A creation row's first sample (/first, /first_take, /next_take, /first_allocation_total) is
  judged by the ratio of the medians of its five processes; a single first sample is never red.
- A row's limit is 1.03 times the greater of its ceiling and its floor: the widest ratio between
  two of the old runtime's own runs of the row on that GPU (scripts/matrix/floors.tsv, seeded
  from store2's noise table's "widest" column; 1002:1900 has no column there, so its floors are
  1). Ceilings are unchanged.
- A row past its limit is re-timed once, A B B A (two pairs), and fails only if the median of
  the pairs' ratios is past the limit too.

Deterministic counts are untouched. docs/VALIDATION.md describes the new runs and rule.

Verified: scripts/matrix/test_results.py, 33 tests OK locally (new: a row within its floor
passes, past it but back within on its re-time passes, past both fails; first samples by the
median of five, never one alone; the creation processes' sed programs record each key once; the
floors table reads). The generated harness_runs shell passes bash -n for a Linux and the Windows
leg. The harness's selection tests and lint run in the check job.
2026-11-18 02:17:14 -08:00
Anees Iqbal ad35582f61 matrix: the RX 550's constant_managed row takes constant_private's 1.20 ceiling
The planner ruled that the RX 550's (1002:699f) constant_managed row shares constant_private's
ceiling of 1.20: the two rows run the same constant-table kernel, the table Managed in one and
Private in the other, and the cost is the same GPU cause, tiles over a grid one high and one deep
and the RX 550's 64-bit address per read. Matrix cbd4644463 timed constant_managed at 1.180 (the
median of three re-timed pairs) next to constant_private at 1.193. The rt README's known gap now
names both storage modes.

Verified: scripts/matrix/test_results.py, 29 tests OK; HARNESS_CEILINGS reads both rows for
1002:699f.
2026-11-18 02:04:02 -08:00
Anees Iqbal b6b303f8a0 matrix: the RX 550's constant_private ceiling, 1.20; the rt README gap names what was measured
The planner set the RX 550's (1002:699f) constant_private row a ceiling of 1.20 in
HARNESS_CEILINGS, based on the row's measured median. The matrix's limit is that ceiling times
HARNESS_BUDGET (1.236). The pushed-flag branch for 256x1x1 tiles was tried and dropped under the
planner's time box.
- v1 (probe a29d4d4fde): 0.884 of tiles on the RX 550, but the untaken branch cost 6.7% on the
  UHD 630's grid3l (m3-max-45077) and 1.6% on the RX 550's (m3-max-45076).
- v2 (probe 559c61a305), where the branch covers the extent test too: 0.954 of tiles on the RX
  550's constant_private (m3-max-45131), under the 5% bar.

The README bullet now says what was measured, not the earlier attribution:
- On the RX 550 the row runs at 0.90 of tiles in 256x1 workgroups, 0.89 through storage-buffer
  descriptors, and 0.89 with both (probe 4f8a9df6b5 on 80bd8ca764, m3-max-45027).
- The decode's instruction count does not explain it: the decode's masks as constants gave 1.000
  of tiles (m3-max-45076).
- The 64-bit address per read is from the ISA (m3-max-44342).
- The Iris clause is corrected. In an exclusive 7-round run (m3-max-45057) the Iris Xe took
  1.027 of the old runtime's GPU time, with 0.999 in 256x1 workgroups and 1.002 through
  descriptors. It pays neither cause, and it has no gap (under 1.03).

Verified: scripts/matrix/test_results.py, 29 tests OK, including
test_every_ceiling_is_over_the_budget. README lines are 100 columns or fewer.
2026-11-18 01:29:02 -08:00
Anees Iqbal 8fa569e62d harness, matrix: each runtime keeps its pipelines in a store of its own, fresh for the matrix's main run and warm for its warm run, so create_state and the first uses compare like for like
The old runtime's shader cache defaulted to the per-user ~/.cache/metal2vulkan, which every earlier
run on the node had filled, while the new runtime's harness device kept no store: create_state's
first state and the first-use rows timed old warm against rt cold (jobs 44170, 44171: old's first
on the 2080 2.9-3.2 ms on its warm cache, 8.9-9.7 ms on a fresh one).

- old::system_default and rt::system_default take the store (None: the runtime's default, for the
  tests).
- The command takes --store DIRECTORY: each session keeps its pipelines in
  <DIRECTORY>/<place>-<runtime>; without it, a directory made for the run under the OS temp
  directory and removed when it ends. Each runtime's line and each create_state row say
  "store fresh" or "store warm, N files".
- The matrix gives each runtime's main run a fresh empty store beside its fresh driver cache, and
  its warm run the same store; a re-timed row's runs take the harness's own fresh store.
- VALIDATION.md and the harness docs say so.

Verified: the matrix's harness script, rendered and run against a stand-in harness, passes a fresh
--store to each runtime's main run (cygpath'd on Windows); the build, clippy and the authored tests
in the check job.
2026-11-17 21:56:01 -08:00
Anees Iqbal 32d511d17d harness, matrix: long_4cb runs one size on both runtimes: --size gives a sized row its size, the matrix passes the first runtime's to the later runs, and a row run at two sizes fails uncompared
A workload whose size follows the device (long_4cb) was sized by whichever runtime ran it first in
its process. The matrix times each runtime in its own process, so each sized it from its own base
time, and they could run different work: the RX 550's long_4cb ran at different sizes on the two
runtimes at 594b86d1f2, and its ratio compared unlike runs.

- run_each takes the size where the caller gives one (ScaledTo::base_us is then None) and times no
  base; a size for a workload of one size is an error.
- The command takes --size NAME=N (repeatable; a name it does not know is an error) and prints each
  sized row's size as an `M2V-MATRIX size harness-<runtime>/<row> <size>` record.
- The matrix reads the first runtime's "sized to" lines and passes them as --size to every later
  run: the main run, the warm run and the re-timed pairs.
- results.harness_budget fails a row whose two runtimes' size records differ (or only one has
  one), uncompared; `size` is a record kind.

Verified: python3 scripts/matrix/test_results.py, 29 OK; with the size check removed, the new test
fails (negative control). The matrix's harness script, rendered and run against a stand-in harness,
passes `--size long_4cb=4096` from the first runtime's line to the second's run. Harness unit test
a_scaled_workload_given_its_size_runs_at_it_and_times_no_base: build and run in the check job.
2026-11-17 20:57:07 -08:00
Anees Iqbal a1a5ada454 matrix: the harness budget lists no ceiling: a ceiling is ruled after the work on its row, never taken from a measured ratio
The 2080's frame_5cb ceiling of 1.166 was its measured commit-to-complete ratio at 594b86d1f2,
which turned a red into a budget without a ruling. The GPU-time ceilings dropped earlier on this
branch were ratios of another measure. With none listed, every row over HARNESS_BUDGET fails its
leg until a ruling, made after the work on that row, gives it a ceiling.

Verified: python3 scripts/matrix/test_results.py, 28 tests OK.
2026-11-17 20:55:18 -08:00
Anees Iqbal b74e1a50b9 harness, matrix: a row is judged by host time: commit-to-complete where the row times it, else the wall time a run adds; the GPU time is a diagnostic
The matrix judged every plan row by its GPU time (first command buffer's GPUStartTime to the
last's GPUEndTime), which is not what a program waits on, and whose placement changed between
builds. The harness's matrix time is now run::matrix_time: the steady time of each run's mean
commit-to-complete time where the plan times its command buffers' (frame, frame_5cb, long_4cb;
frame now times it too), else the steady time of the host wall time each run adds
(Report::wall_us, the timed loop's period with two runs in flight). The GPU time stays in the
table as a diagnostic; a new line per row prints the matrix time, what it is, and the wall p50.

results.py's ceilings were GPU-time ratios. They are now host-time ratios: frame_5cb on the 2080
keeps a ceiling of 1.166, its commit-to-complete ratio at 594b86d1f2; the others are dropped, and
the first matrix on host time sets the ceilings of the rows still over the budget.

Re-judged from the 594b86d1f2 matrix's harness output (c2c p50 of every command buffer, new over
old; the records hold no host wall time, so the burst rows and frame cannot be re-judged):
- frame_5cb: 780M Phoenix 0.671, 780M HawkPoint 0.693, RX 550 0.820, XTX 1.003 (pass, as on GPU
  time); 2080 1.166 (GPU 0.928: now over the budget, its ceiling 1.166); 3090 0.760 (its GPU
  ceiling 1.137 leaves the list); UHD 3.535 (GPU 2.395; fails either way).
- long_4cb, both runtimes at one size: 780M Phoenix 1.273, 780M HawkPoint 1.309, XTX 1.291,
  2080 1.345, 3090 1.266, UHD 1.154: pass on GPU time (0.99-1.01), fail on host time: a group's
  first command buffers are seen complete with its last. RX 550: the runtimes ran different sizes
  (1024 and 2048), so its ratio (1.014) is not comparable until both run the same work.

Test: tests::a_row_is_judged_by_host_time_never_its_gpu_time (wall time without commit-to-complete,
the mean of a run's places with it, the steady time of those means, none without host times).
scripts/matrix/test_results.py passes (28 tests).
2026-11-17 20:55:18 -08:00
Anees Iqbal 76ddb7ed45 matrix: a harness row over its budget is re-timed in its leg, three alternating pairs, judged by the median
The matrix at 4e02a34a38 failed vote_loop on the HawkPoint 780M at 1.123, new over old, from one
timed window each. Five alternating rounds on that GPU read a median of 0.992, one new window
held a slow state throughout (662.8 us against 415.5 to 415.9), and the Phoenix 780M read 0.999:
one window caught in a clock episode decided the row.

- harness_runs keeps each runtime's output (tee) and, after the last runtime's run, before its
  suite's line, chooses the rows over their limit (results.RETIME_SELECT, awk over both outputs:
  each listed row's ceiling times HARNESS_BUDGET, else HARNESS_BUDGET, the same comparison of the
  same decimals as harness_budget), at most RETIME_ROWS (8), the furthest over first. Each is
  re-timed alone in RETIME_PAIRS (3) pairs, old then new, the second pair new then old, and only
  its time records are kept, as harness-retime/<row>/<pair>/<runtime>.
- harness_budget judges a row past its limit by the median of its pairs' ratios where all three
  pairs are there: a problem past the limit, else named with its pairs; a row the leg did not
  re-time is judged by its one time as before. The pairs are parked records for the time rule.
- docs/VALIDATION.md states the rule beside the budget.

Verified (job 43277, msi, GNU awk 5.4.1): the matrix's rule tests, 28 of 28, among them an
episode in one pair that does not decide a row, a regression in every pair that fails it, a row
with a pair missing judged by its one time, a listed row judged against its ceiling's limit, and
the leg's awk choosing exactly the rows harness_budget fails on their one time, at the 2.06 edge
of a 2.0 ceiling; then the rendered harness_runs run under bash with a fake harness for an unlisted
and a listed leg: it re-timed burst_160 (2.0 in every pair) and frame (1.0, 1.5, 1.0), and
harness_budget failed burst_160 on its median and named frame within, judged by the median.
2026-11-17 16:59:41 -08:00
Anees Iqbal eea1ef870e matrix: harness first uses compile cold on a fresh driver cache, and warm on a second run
The matrix at 691b0e43d1 failed four legs on harness-new/authored/first_use_wait_total against
9c61460b3d: on AMD it went from 0.3-0.5 ms to 7.9-33 ms. The driver's shader cache explains it. The
matrix gave the harness the node's own cache (~/.cache/mesa_shader_cache held 260 entries on the
XTX's node), so a commit whose modules the node had compiled before read hits, and one that changed
them read misses. Run with a fresh empty cache directory, then again on it (jobs 42912 and 42913),
authored first_use_wait_total in us:

  XTX   base 9c61460b3d cold 5,833 warm 411; tip 691b0e43d1 cold 5,551 warm 390; the base on the
        tip's warm directory 7,198 (its modules differ, so they miss); the node's own cache 446
  2080  base cold 34,062 warm 4,178; tip cold 75,715 (one slow cold run) warm 4,479;
        the node's own cache 32,555 (~/.cache/nvidia/GLCache held 2 entries, so NVIDIA read cold
        at both commits)

and base and tip alternating cold on the 2080 (job 42933): 36.7, 34.3, 36.7, 33.0 ms; the 75.7 did
not recur when 42913's runs were repeated (job 42945: tip cold 34.9).

The Intel driver on the Windows host keeps one too: three runs in a row on the UHD 630 read 54.9,
1.9 and 2.0 ms (job 42935), and with LOCALAPPDATA and USERPROFILE pointed at a fresh directory,
58.8 then 1.3 ms, its entry written there, then 1.4 ms on its own cache (job 42950).

So each runtime's harness run now has a fresh empty cache directory, MESA_SHADER_CACHE_DIR for
Mesa, __GL_SHADER_DISK_CACHE_PATH for NVIDIA, and on the Windows host LOCALAPPDATA and USERPROFILE
pointed into it, and its first uses compile cold whatever ran on the node before: those records
stay as they are and are judged. For the new runtime (HARNESS_WARM; the old runtime counts no
first uses), a short second run on the same directory (--runs 5
--warmup 1 --no-settle) follows before the suite's line, and its first-use records are kept as
harness-new-warm/<set>/first_use_*, the same first uses with the cache warm. PARKED_RECORDS parks
them: the cold ones gate.

docs/VALIDATION.md says so.

Verified: the matrix's rule tests, among them a warm first-use outlier parked beside a cold one
that fails; and the rendered harness_runs against a fake harness that reports how many files its
cache directory held when it started: the old and new runs each started on an empty
directory (cold 0), the new runtime's warm run on the one its cold run wrote (warm 1), the warm
records in the harness-new suite and none for the old runtime, every directory removed; in the
Windows form (cygpath faked) both variables in the run's directory; and the rendered GPU and
Windows scripts parse (bash -n).
2026-11-17 16:03:43 -08:00
Anees Iqbal fe9dd3d6da matrix: a listed row's ceiling has parity's 3% allowance; a row the old runtime failed is named and not compared
Two follow-ups to the harness budget.

The allowance. A ceiling is the row's ratio when it was listed, so run-to-run spread put rows just
past it: over the runs one commit before the seeds (08ff6ed59c), five rows came 0.1 to 3% past
their ceilings. A listed row now fails its leg only past its ceiling times HARNESS_BUDGET, the same
3% allowance parity gets. The ceilings stay the measured ratios and only go down.

Old-runtime failures. The old runtime is frozen and its regressions are parked, but a workload it
failed (on the UHD 630 at 8b15f6574b, one burst_2000x5 run ended in a GPU recovery,
GpuRecoveryVictim, in job 42642) failed the leg through the harness suite's exit code. PARKED_RECORDS
covered the old runtime's gauges and time outliers, not its failures. Now:
- the harness names the runtime of a failure: run_each wraps a session's error other than a
  refusal in Failed { runtime, why }, as is the creation workloads' error, and beside the FAILED
  line the command prints `M2V-FAILED harness-<runtime>/<workload>` (for each runtime of the
  command where the failure names none: a plan that could not be made, outputs that differ);
- the matrix runs each runtime's harness as a suite of its own, harness-old and harness-new, so a
  suite's exit belongs to one runtime, and a leg whose job reported either suite missing fails;
- results.py reads M2V-FAILED lines as a suite's failed tests; one under PARKED_RECORDS
  (harness-old/) is parked, so a harness-old suite that failed only by them has not failed, and
  harness_budget names the row "old failed, not compared". A harness-new failure still fails its
  suite, and a crash of either runtime's run, with no M2V-FAILED line, still fails its suite.

docs/VALIDATION.md says both.

Verified: the matrix's rule tests (24) pass, among them the allowance at its boundary (a ceiling
of 2.0: 206 over 100 passes, 206.1 fails) and an old-runtime failure parked beside a new-runtime
failure that fails its suite; the harness's unit test checks that a session's failure names its
runtime and that outputs that differ name none; and the rendered GPU and Windows scripts parse
(bash -n).
2026-11-17 15:10:34 -08:00
Anees Iqbal bbf8fbb29a matrix: the harness budget, new over old per row on each GPU at most 1.03, with the rows over it held to ceilings
results.harness_budget compares the two runtimes within one leg. For every harness row timed on
both runtimes in the leg (harness-new/<row> and harness-old/<row>), the new runtime's time over the
old's is at most HARNESS_BUDGET, 1.03. HARNESS_CEILINGS lists the rows over it, per GPU, each
with its ratio as its ceiling. A listed row past its ceiling fails its leg, and a listed row within
it is named on the leg's line (with the parked items), so an open row can neither hide nor grow. A
fix lowers its row's ceiling, and a row within 1.03 is named as leaving the list.

This rule is separate from TIME_OUTLIER and PARKED_RECORDS, which judge a time against its base
commit's across GPUs and park the old runtime's outliers. The budget reads the old runtime's times
as its reference. It ends with the cutover, with the old runtime.

A time recorded more than once has no single value to judge: twice in one suite, where parse_suite
keeps the first and now lists the key in `duplicated`, or once each by two suites, where
leg_records keeps the later. Such a row is a problem of the budget's own, named and not compared,
beside the record problem the leg already has.

The matrix's harness suite now runs one job per GPU. Each job holds its node alone (--exclusive)
and times that one GPU. Before, one exclusive job per node timed the node's GPUs in turn.
docs/VALIDATION.md says both.

Ceilings: one run per GPU of the harness's full set, both runtimes, as the matrix runs it, two
passes, each run an exclusive job timing one GPU, at development 8b15f6574b. Each ceiling is the
worse of the two passes' ratios, rounded up to three places. The latest matrix run, 100b92d608,
predates the barrier commits 7edbf84c8f and 8d160c12ac, which moved rows a long way (the 2080's
dispatch_chain from 1.816 to 0.34, the 3090's frame from 1.156 to 0.38), and its 2080 leg ended
with the GPU gone. The Iris Xe has no run (its node is down), so its rows over 1.03 fail its first
matrix run and are listed from it.

The seed runs, by leg (job): RX 550 1002:699f (42513), RX 7900 XTX 1002:744c (42512), RTX 2080
10de:1e87 (42523), RTX 3090 10de:2204 (42518), UHD 630 8086:3e9b (42642, the harness cross-built
on the Linux builder for x86_64-pc-windows-gnullvm and run there), the 780M 1002:15bf (42515) and
the 780M 1002:1900 (42517), whose rows are all within 1.03. On the UHD 630 the old runtime's
burst_2000x5 ended in the second pass with GpuRecoveryVictim, so that row's ceiling is the first
pass's.

Verified: the rule tests, 22 of them, pass (python3 -m unittest discover -s scripts/matrix).
Replaying harness_budget over each seed run's two passes gives no problem on any GPU. The same
ceilings over the runs one commit earlier (08ff6ed59c, before the SIMD-group commits) put five
rows 0.1 to 3% past their ceilings: run-to-run spread that a ceiling at the current ratio does not
absorb.
2026-11-17 14:55:21 -08:00
Anees Iqbal b206c48b2a matrix: only a subject that opens with the phrase lets the old path move
a17eb26a6b's matrix run did not report OLD PATH MOVED although its golden test counted 7260
cells under a changed profile fingerprint (the stage-bound change): the check commit's own
message quotes "old-runtime regression fix", and the rule looked for the phrase anywhere in a
message since the last bless. It now takes only a subject that starts with it, as each fix's
does.

Tests: scripts/matrix/test_results.py, 17 pass; the old-path test now also feeds a message that
quotes the phrase in its body and expects the problem to stand.
2026-11-17 11:24:09 -08:00
Anees Iqbal 37cc7ac829 matrix: harness counts compare under one harness; six old-runtime lavapipe flakes parked
The 7fa6662170 run failed every GPU leg on harness-old/authored/pipelines_created 8 -> 10. That
was the harness itself gaining two workloads (eddc9b80bf), not the runtime. The harness's counts
sum over its workloads, so like its times they now compare only with a base whose harness tree is
the same; the other records still compare.

Its lavapipe leg failed on one old-runtime test that passed in the runs around it, as a different
one did in most runs today (cfa389aa9b, c944d63548, bfe63b5097, 73e0af4b66), the old runtime's
code unchanged between them. The old runtime is frozen and its regressions parked, so the six met
so far join PARKED_TESTS with the run each failed at; they stay named on the leg's line.

Tests: scripts/matrix/test_results.py, 17 pass (the new one: a harness count compares under the
same harness and not under a changed one, while a runtime count compares in both).
2026-11-17 10:45:01 -08:00
Anees Iqbal a17eb26a6b matrix: the old path moving fails a leg unless its fix says so
The old runtime is frozen until the cutover: the translator's output through Device::new must not
move. Today it moved three times through the shared path (half outputs widened, the half pair
workarounds dropped, the stage-size rows dropped) and nothing caught it, because the golden table's
failure read as "needs a bless" whatever moved.

The golden table compiles through Device::new. Its test's stale message now counts each kind
(new, gone, under a changed fixture source, under a changed profile fingerprint), from one tested
function. The matrix reads the counts: a cell changed under an unchanged key, or one under a
changed profile fingerprint, fails the leg with OLD PATH MOVED, unless a commit since the table's
last bless says "old-runtime regression fix" (the fix of such a move, or a fix the old-runtime
lane lands). New, gone and re-keyed fixture rows still only need a bless.

Tests: scripts/matrix/test_results.py (16 pass; the new one feeds both panics as nextest prints
them, a new-rows-only failure and a passing run, with and without the phrase);
golden_hashes::only_a_cell_changed_under_its_key_needs_a_bump checks the counts' text.
2026-11-17 10:37:10 -08:00
Anees Iqbal d9b03bf1f4 harness: the new runtime runs every workload; typed refusals by name; counts of a lone run
The new runtime now implements the harness's compute traits (rt.rs): the
translator's library and function descriptor, its pipeline states, a queue of
newCommandQueue's 64 command buffers, serial compute encoders, and GPU times from
its host clock in nanoseconds. `--runtime new` runs the authored, described and
creation workloads; run::Buffers, the creation-only session, is gone, and the
matrix runs the harness on both runtimes (HARNESS_RUNTIMES).

A workload a runtime answers with a typed refusal (the new runtime's
Error::Unsupported known gaps, such as Gap::KernelInput, and its device limits)
prints REFUSED with the refusal on that runtime's row; the other runtimes'
outputs are compared among themselves, and the command does not fail for it.
Each set prints `refused <n>` as a matrix metric, so a refusal that appears is a
matrix failure.

Per workload, the runtime's own counts of its work (the new runtime's
submissions, passes, barriers and bytes copied; the old runtime's
vkQueueSubmit calls) are read over one run after the timed ones, committed alone
and waited for, so nothing else in flight blurs them: `<count>_per_run` metrics,
for `frame` its counts per frame. Per set, where the runtime counts them, the
first-use waits (count, total and longest) print as a metric and two times.
This replaces the per-timed-run barrier average, which a run still in flight at
either read could shift by one run.

Function constants convert in plan.rs, which both runtimes use. The device
tests run every authored workload on both runtimes (the new one's gauges read
zero after its device drops, and it waited for at least one pipeline), and the
described test compares the old runtime with the new. Unit tests: the new
runtime's refusal mapping and 32-bit sizes, and run_each with a refusing and a
failing session.
2026-11-17 10:08:52 -08:00
Anees Iqbal 35fbfb4f2e matrix: the old runtime's time outliers are parked like its gauges
The UHD 630's harness-old/frame time swung to 1.58x its base at a68d520bee and 1.47x at
9af29fbb20, with no change to the old runtime between them; the owner parked the old runtime's
regressions until the cutover deletes it. PARKED_GAUGES becomes PARKED_RECORDS: a key under
one of its prefixes has its gauge flatness and its cross-GPU time outlier named on the leg's
line as parked, failing no leg. A gauge's @drop still fails, and every rt time still fails as
an outlier.

Verified: scripts/matrix/test_results.py, 15 tests pass, one new (a parked time outlier is
named and fails no leg).
2026-11-17 09:44:26 -08:00
Anees Iqbal 001cc5ae8a matrix: a lint leg runs the gate's fmt check, clippy in three configurations and Rustdoc
The matrix ran the suites but none of the gate's lints, so a public doc linking private items
(eaac55bd36) left the workspace Rustdoc failing on development with every leg green. The lint
leg runs cargo fmt --all --check, clippy -D warnings plain, under --cfg m2v_gpu and under
--cfg m2v_cpu_icd, and Rustdoc -D warnings, each reported as its own suite, in a workspace of
its own on the builder beside its other jobs, so it adds no wall time to the run.

Verified: the script parses; the first run is the matrix on this commit.
2026-11-17 09:18:51 -08:00
Anees Iqbal a68d520bee matrix: times compare under one harness; the old runtime's met failures are parked
At 8a07d62b97 six GPU legs failed on time and one on a gauge, none of them
the new runtime's (rt 38/38 on every leg):

- The harness landed its settled warm-up and steadiest-window time between
  the base (b216007f0a) and this run, so most GPUs' times fell to about 0.69x
  and the ones that fell less read as outliers. Times now compare only when
  the base's crates/metal2vulkan-harness tree is the commit's; a harness
  change sets the base for the next run.
- harness-old's memory_blocks gauge went 3 -> 2 between iterations 100 and
  200 on the Iris and the UHD 630: the old runtime frees idle blocks when it
  will. lavapipe failed two old-runtime tests: cross_queue_shadows' GPU
  hazard (its spin ended before the host's write on a loaded host, twice
  now) and compute_inherited_buffers' barrier count (2 against 3, which
  moves with the old runtime's background pipeline builds).

The old runtime takes no fixes until the cutover, so these are parked:
PARKED_TESTS and PARKED_GAUGES in results.py, each with its reason. A parked
failure is named on the leg's line and in the note's `parked` field and
fails no leg; a parked gauge's @drop still fails. docs/VALIDATION.md says
both rules.

Verified: the rule tests (14, two new: a suite whose failures are all
parked passes and names them, an unparked one beside it still fails; a
parked gauge may move between iterations but must reach zero at drop);
the harness trees differ between b216007f0a and 8a07d62b97 (038009feec
against d25ef7d25d) and match between 8a07d62b97 and the tip.
2026-11-17 08:33:59 -08:00
Anees Iqbal 8a07d62b97 matrix: a run that wanted RAM sizes the next at twice its reservation
At b216007f0a the rt suite on ms01 was killed at 3 GiB and then at 5 GiB, and
on the UHD 630 at 4 GiB and then 6 GiB: each rt test device makes a 256 MiB
Private and a 256 MiB Shared block, at nextest's default parallelism (20 on
ms01, 12 on the mini), all in system memory on an integrated GPU. 1.5x per
step takes two lost legs to get there; 2x takes one, and the next measured run
brings the size back to 1.3x its peak.

Verified: the script parses; arithmetic read against jobs m3-max-41113,
41148 (ms01) and 41115, 41116 (UHD 630).
2026-11-17 08:02:10 -08:00
Anees Iqbal d33138f23c matrix: a job that failed an allocation at its RAM ceiling runs once more with room
The 2080's rt suite ended 1, not 137, at b216007f0a: it peaked at its 2 GiB
reservation, and NVIDIA's driver, pinning host memory for the 256 MiB Shared
blocks, answered the limit with VK_ERROR_OUT_OF_DEVICE_MEMORY rather than the
kill. The matrix counted it as a plain failure, kept the 2 GiB for the next
run (a run at its reservation kept it), and failed the leg on four tests.

Wanting RAM is now a peak at the reservation plus either the kill or a failed
allocation in the output (OUT_OF_DEVICE_MEMORY, OUT_OF_HOST_MEMORY, or Rust's
"memory allocation of N bytes failed"); such a run gets its one rerun and
sizes the next at 1.5x. A failure at the ceiling with no failed allocation
stays a failure: lavapipe's suites peak at their reservation as a rule.

Verified: the script parses; the rule is read against job m3-max-41114
(peak 2.0 of 2 GiB, exit 1, four ERROR_OUT_OF_DEVICE_MEMORY panics).
2026-11-17 07:59:21 -08:00
Anees Iqbal c944d63548 matrix: a leg whose suite never reported fails
A job that printed a leg's device lines and was then killed before the leg's M2V-SUITE line ran
nothing of that leg, yet the leg was judged on its other suites: on 248d41074f the 3090 and the
UHD 630 read PASS on their harness suites alone while their rt jobs (m3-max-40768, 40800) had
been killed for RAM. Such a leg now fails with the job and its exit.

Verified: the script parses; the next matrix run on development's tip exercises it.
2026-11-17 06:45:22 -08:00
Anees Iqbal 248cee5cbf matrix: a job killed over its RAM runs once more, sized from that kill
Jobs are sized from their last measured runs: 1.3x the peak, at least 2 GiB. On 248d41074f
the held workspaces sat at a commit the tip does not descend from, so the GPU legs got fresh
ones, and the rt jobs on ms01 (m3-max-40768) and the Windows host (m3-max-40800) went over
their 2 GiB in their first two seconds (potluck why: over memory, 2 GiB and 2.1 GiB of 2) and
lost their legs. Such a job now runs once more with the room its kill gives it (1.5x), and the
leg is judged on that run.

Verified: the script parses; exercised by the next matrix --legs rerun on 248d41074f.
2026-11-17 06:35:58 -08:00
Anees Iqbal 248d41074f matrix: a run of some legs is timed against the note's other GPUs; untested suites show their exit
The cross-GPU time rule took its median from the run's own GPU legs, so `run --legs` of one GPU
had fewer than three and never judged time. The median now takes every GPU leg of the sha's
note, with each leg's base, and only the legs of this run are judged.

The harness suite counts no tests, so its verdict read "harness 0/0"; a suite that ran no test
now shows its exit code.

Verified: unittest of scripts/matrix passes; `show 73e0af4b66` prints the new form.
2026-11-17 06:19:58 -08:00
Anees Iqbal c8321149f7 matrix: a job kind's default minutes stay its timeout floor
The timeout was 1.5x the longest of the kind's last three runs, at least 5 minutes. A held
workspace makes most builds incremental (the msi build of 793a1f7980 took 1.8 minutes), so the
next build was given 5 minutes, which a full rebuild after a translator change would overrun and
waste the run. The kind's default (build 30, Windows build 60, lavapipe 60, GPU 15, timing 20
minutes) is now the floor; measured runs only raise it.

Verified: the script parses; unittest of scripts/matrix passes. The sizing itself runs on the
next matrix run.
2026-11-17 06:19:58 -08:00
Anees Iqbal 6a5e230514 matrix: the harness's timed workloads per GPU in an exclusive job; time records in microseconds 2026-11-17 06:19:58 -08:00
Anees Iqbal bb30a0b040 matrix: a GPU job prunes carry mirrors left by jobs that never ran 2026-11-17 06:19:58 -08:00
Anees Iqbal 391cc679e7 matrix: a chain's own failure fails its legs; no stats for a job that never started 2026-11-17 06:19:57 -08:00
Anees Iqbal aaa6350ee6 matrix: record the driver version; read dispatch errors from the reply 2026-11-17 06:19:57 -08:00
Anees Iqbal b4b22c7b2c matrix: the per-commit matrix runner and the user-space instruction counter (WIP) 2026-11-17 06:19:57 -08:00