Commit Graph
82 Commits
Author SHA1 Message Date
Anees Iqbal 6de7e37ba5 replay judge: a finished rt play prints its judged totals, held equal to the base
The replay player prints, on the new runtime, the matrix's judged metrics of a play: one
`M2V-MATRIX metric replay-rt/STEM/RANGE/NAME N` record per metric, `N` the play's executed total
(`Report::total`) of submissions, passes, barriers less `texture_clear_barriers`, bytes copied and
pipelines created, and of the new textures zeroed, the clears and the zero-initialized ones as one
count and their bytes as one. The split between a clear and a zero-initialized texture follows
where the pool places it and may differ between two plays of one stream, so the two are judged
summed, and the barrier after an upload's clears is left out of the barriers. A play that did not
finish its range (it stopped, or ended before frame F's present where it plays to F) or whose
backend skipped anything prints none (`judged_records`).

The matrix's rule holds a `replay-` metric equal to the base's, failing a change either way, and
fails a leg that lacks a record its base has: a short play does not pass (`EQUAL_METRICS`). The
counters' docs say the split may differ between two runs of one program; VALIDATION.md and
REPLAY-STREAM.md say what the judge does.

Tests: the judged totals on the fake backend (the net barriers, the summed zeroings, a counter
not reported as 0, no other counter, the range in the key), a short play, a stopped one and a
skipping one printing nothing, and the rule's equality and missing-record cases in
test_results.py. Verified: cargo fmt; `python3 -m unittest discover -s scripts/matrix` (84 tests,
OK). The Rust build, clippy and tests run in the checks dispatched at this commit.
2026-11-19 11:15:33 -08:00
Anees Iqbal 6fccd785c8 matrix: the 780M's create_64MiB/first_take row leaves the status list, within its limit on every leg
Round 940f37188b (10 of 11 legs pass; the UHD 630 venue unstable) lists the row among the status
entries within their limits: within its limit on every leg of its card that timed it. gem10's
leg (52484) read 1.004 on the five interleaved samples (rt 6829.1 against old 6802.4 us medians)
and um870's 1.00 (6969.6 against 6987.5). The row's earlier 1.08 (round 391db1e57a) was one
reading.
2026-11-19 08:20:05 -08:00
Anees Iqbal b74e8387d7 matrix: the UHD 630's sampling_deep_64x64x16 row leaves the status list, within its limit on every leg
Round 391db1e57a reported the entry stale: the row was within its limit on every leg of its card
that timed it. Ruled by the planner on 2026-11-19 with the round's other readings.

Verified: matrix-unit.sh.
2026-11-19 06:45:09 -08:00
Anees Iqbal 8a2a6d71c4 matrix: the Iris Xe's alu and long_4cb and the 3090's 64 MiB creation take ruled ceilings; the Windows rt suite room
Ruled by the planner on round 951b93a645:
- 8086:a7a0 alu and long_4cb: the rt README's recorded Gen12 gap under the biased slot word (a
  change before an identical loop moves a kernel -18% to +14%, mechanism not shown; neutral arm
  m3-max-51663). Medians 1.139 and 1.141 (m3-max-51733).
- 10de:2204 create_64MiB first_take and device_first: the 2080's known gap, the driver's
  allocation of host-visible system memory against old's import of its own pages. One line for
  both 3090s at the higher card's medians, 2.841 and 1.943 (um870, m3-max-51756); ms01 reads
  2.359 and 1.673 (m3-max-51747).
The ruling named 1.14, 2.84 and 1.94. A ceiling under its row's own median fails the row at once,
so each is rounded UP to cover the median, as every earlier ceiling was (1.877 to 1.88): alu
1.14, long_4cb 1.15, first_take 2.85, device_first 1.95. The planner is told.

The Windows rt suite's default room goes from 4 to 8 GiB. In the same round its run on the UHD
630 went over 4 GiB in 34 s (m3-max-51691, exit 137). The retry at twice the room is capped at the
kind's default, so a kill at the default was never retried and the leg reported no suite.

Verified: the matrix unit tests run after landing (matrix-unit.sh).
2026-11-19 05:18:26 -08:00
Anees Iqbal df54c9a8e8 matrix: the RX 550's constant rows leave the ceilings, both under old in round 951b93a645
The planner's rule for these two ceilings (1.20 each): the next round's ratio lowers them, and a
row at or under 1.0 leaves the list. In the round at 951b93a645 (jobs m3-max-51721, m3-max-51731,
gem10's RX 550, RADV POLARIS12, Mesa 26.2.6) the wall ratios are constant_managed 0.956 and
constant_private 0.953, with GPU p50 1972.6 us vs old 2094.4 us and 2013.8 us vs old 2101.8 us.
Both rows are within HARNESS_BUDGET, so the leg judges them without a ceiling.

Verified: the only test that names the RX 550 leg patches HARNESS_CEILINGS to {}; the matrix unit
tests run after landing (matrix-unit.sh).
2026-11-19 05:08:48 -08:00
Anees Iqbal 118b5b530d matrix: the RTX 2080's 64 MiB creation rows take their ruled known-gap ceilings
The planner ruled create_64MiB/first_take 2.30 and create_64MiB/device_first 2.14 on 10de:1e87,
from the medians of the alternated run m3-max-51634 (base 7cda47f536 and head 296e110c0f, the
higher of the two): the driver's own allocation of 64 MiB of host-visible system memory takes
about 12.5 ms where the old runtime imports pages it mapped itself in about 5.8 (m3-max-48212),
and it stays the driver's memory because an import as the allocator costs every submission on
every AMD card. row_limit applies HARNESS_BUDGET on top, as for the 1.40 lines. The 3090 has
no line yet: it takes one from its own rows.
2026-11-19 04:12:30 -08:00
Anees Iqbal a76d7f1eea matrix: a harness row out in both passes is judged by its lowest level, re-timed alone in fresh processes
A host can give each process a wall-time level of its own. On the RTX 3090 at homelab-um870-1,
sampling_deep_4x16x252 took about 37 or about 80 us a run, one level a process, at equal GPU
time and CPU instructions, and the old runtime drew the levels as well (rounds b0c08e51b5,
7cda47f536 and 6b535f55c9). The outlier's second pass is already a fresh job, so a fresh
process, but two passes both landed high in 6b535f55c9 and failed the leg on a level the code
does not set: m3-max-51629 timed the row in 39 processes over every commit of the range at 36.8
to 40.0 us.

Now the second pass of a leg with a harness row's cross-GPU outlier also runs each such row
(results.alone_rows, at most RETIME_ROWS, the furthest out first) alone in RETIME_PAIRS pairs,
old then new, then new then old, every process on a fresh driver cache and store, its times kept
as harness-alone/<row>/<pair>/<runtime>. time_outliers judges a row out in both passes by the
lowest of the new runtime's samples (both passes and the alone runs) over the lowest the base
recorded of it: still out, it fails, "high in every process"; brought back, it is parked with
every sample, "levels, no verdict", so a high level grown more frequent stays visible. The alone
keys are never judged on their own. GPU-time rows and counts are unchanged; no ceiling moves.

Verified: python3 test_matrix.py and test_results.py (potluck job named in the landing).
2026-11-19 04:12:19 -08:00
Anees Iqbal fd065160c5 matrix tests: the excess-void test expects its rows in row order
The rows are judged and listed in key order (alu before create_state/first); 50745 failed the
new test on that order alone. Verified in the matrix unit job dispatched with this commit.
2026-11-19 00:59:05 -08:00
Anees Iqbal 2fe8ac55c1 matrix: a host-time row past its limit by less than old's own move is VOID for the round
The frozen arm's second rule, beside FROZEN_DRIFT (the planner's ruling of 2026-11-19, reading
(a)): a row judged by its host time, and not by re-timed pairs, whose excess over its limit
(ratio over limit, less 1) is smaller than its own old time's move from the base in the round
is VOID, since the old runtime's drift alone could carry it there. GPU-time rows and rows judged
by their re-timed pairs are never voided by it. Neither rule makes a row red; the paired re-time
judges a red row.

harness_budget parks such a row as VOID with its excess and the move; the report's table reads
VOID for it (over_lines, through excess_voids); each leg's lines name the rows each rule voided
(print_leg). docs/VALIDATION.md states the rule.

The venue-wide reading was withdrawn: the frozen arm's largest moves sit on cold creation rows
(create_4KiB/device_first +88% on one leg of 7cda47f536) and would void nearly every host-time
row.

Verified: test_a_host_time_row_past_its_limit_by_less_than_old_s_own_move_is_void, in the
matrix unit job named in the next commit or the landing message.
2026-11-19 00:58:05 -08:00
Anees Iqbal 4fa157187f matrix: status.tsv drops the 14 entries whose rows were within their limits
The round at 7cda47f536 named 14 entries for removal (results.entries_within): every row of each
was within its limit on every leg of its card that timed it. Removed by exact card and row: ten
of memory2's create_* records, three of the planner's 2026-11-18 gaps (a7a0 create_state/first,
and 1e87 and 2204 create_private_16MiB/first_take; 1e87 frame_5cb), and identity's a7a0
sampling_deep_64x64x16. The known gaps they cite stay in the runtime guide; a row that goes over
again reads NEW, as the file's rule says.

Verified: the round's report in ~/.cache matrix log for 7cda47f536 lists exactly these 14.
2026-11-19 00:52:09 -08:00
Anees Iqbal 67d621ce0b matrix: a Linux job's tree carries Metal's observations, which the stream device tests read
The GPU legs' tree was laid out without any observations, on the reasoning
that nothing the legs ran read them. Since b28b4975b5 the legs also run the
replay player's stream device tests, and two of them
(a_pointer_written_at_a_recorded_address_reaches_its_node and
a_private_buffer_takes_its_bytes_before_a_dispatch_and_is_compared_after)
take a public case's Metal output from the committed Metal observations. Every
Linux rt leg of the matrix at 7cda47f536 failed both with NeedsMetal { gap:
Missing } (jobs 50451-50454), and nothing else.

The tree now carries corpus/observations/metal (37 MiB of the 1.5 GiB) and
still none of the other backends' observations.

Verified: test_matrix's new
test_the_tree_carries_metal_s_observations_and_no_other_backend_s; the
legs' re-run follows on development.
2026-11-19 00:15:35 -08:00
Anees Iqbal 7cda47f536 matrix: an owned row fails only 3% past its owned ratio; a one-pass outlier is timed again
An open record in status.tsv now names the ratio its row was owned at (the new `owned` column,
filled for the existing entries from the matrix note of b0c08e51b5). The harness budget names a
row past its limit that an open record holds and fails nothing while the ratio it is judged by,
after its re-time, is within 3% of the owned ratio (results.OWNED_WORSE); more than 3% worse, the
row fails its leg again. A known gap's row fails only past a ceiling a ruling gave it
(HARNESS_CEILINGS), as before; one without a ruled ceiling is listed and fails nothing. The
report's table shows the owned ratio and whether the row is within it, and after the table names
every open record and gap whose rows are within their limits on every leg of their card that
timed them, for removal (results.entries_within).

A cross-GPU outlier of a harness row's time on the new runtime no longer fails a leg from one
pass: once every leg is in, the legs with one have their harness timed once more (Run.retime: a
node's legs in turn, the nodes at once, each job holding its node alone), and an outlier fails
only where both passes agree (results.time_outliers with the first pass); one that only one pass
has is parked and named. Outliers of other records fail at once, as before.

Verified: the matrix's unit tests (test_results.py, test_matrix.py), run from scripts/matrix in
a potluck job; new tests cover the owned verdicts (within, worse, re-timed, a first take), the
gaps with and without a ruled ceiling, the removal list, the two-pass outlier rule and the
re-time's jobs.
2026-11-18 23:45:49 -08:00
Anees Iqbal b28b4975b5 matrix: the GPU legs run the replay player's stream device tests; status rows lose closed owners
The GPU legs' archive held metal2vulkan-rt alone, so the replay player's
stream device tests (metal2vulkan-validation's runtime_lane::replay_streams,
17 on the old runtime, and runtime_lane::rt_replay, 24 on the new) ran on
lavapipe only. A break in the player or a runtime's stream path that only a
GPU shows waited for a lane's play of a recorded stream to find it, as the
old arm's pin stop did. The archive now holds the validation crate too, and a
leg runs the runtime's tests and those two modules (DEVICE_TEST_FILTER). The
Windows leg is unchanged until the validation crate is shown to build there.

status.tsv, by the planner's ruling of 2026-11-18:
- 10de:1e87 frame_5cb is a gap row: the runtime guide's known gaps carry it
  (crates/metal2vulkan-rt/README.md, NVIDIA's latency per submission).
- 8086:a7a0 frame_5cb and 10de:2204 create_state/first are within their
  limits; their closed lanes' names are cleared (a row gets an owner when it
  goes over).
- identity's rows wait for their card's native table, the guest-visible test;
  "Iris swing unresolved" was stale.

Verified: see the check job named in the landing message (unit tests of the
matrix script, the archive built with both packages under --cfg m2v_gpu, the
filter's selection listed, and the selected tests run on a GPU).
2026-11-18 23:14:02 -08:00
Anees Iqbal 6c002974ed rt known gaps: NVIDIA holds a take's first submit for the block-maker's allocation; the ring's wait is the link's copy
NVIDIA's first take of a new 16 MiB Private buffer. On the 3090 and the 2080 the first take ran
1.10 to 1.34 times old's. A probe on ac1896537f split it. The fill rides in the take's own
submission: one vkQueueSubmit2 with one submit info, the upload leading the command buffer, and
23-26 us on the GPU. The added time is that submit call itself: 603 us on the 3090 and 579 us on the
2080, against a median of 2 to 3 us. The call began 67 us (75 us) into the block-maker's next 16 MiB
Private vkAllocateMemory of 661 us (647 us), which the take had set off by leaving the class under
8 MiB free, and returned 9 us (7 us) after that allocation. Driver 620.70.06, um870's 3090 and
um790's 2080, jobs m3-max-50032 and 50033 (probe 71841cbe6b).

The planner ruled it a known gap, not a fix: the hold is bounded by one allocation per block made,
which is the time the take would spend allocating on its own thread, and the only dodges are a
timer or an idle guess. So:
- the rt README's known gaps of memory blocks say it;
- 10de:1e87's and 10de:2204's create_private_16MiB/first_take take a ceiling of 1.40;
- their status rows read gap.

The capture ring's wait. A probe play of one consumer's stream on the 3090 (m3-max-50027, probe
db1d5c1929 on ac1896537f) timed each of 258 ring-fulls. The ring-full is 63.3 MiB. Its copy took
33.4 ms on the GPU, 1.99 GB/s, of the 33.6 ms the commit waited (medians). The queue behind earlier
work took 0.03 ms, the submission 0.04 ms and the wake 0.13 ms. The card sits in a Thunderbolt 3
enclosure whose link runs at 20 Gb/s (boltctl). The README's known gaps now give the numbers.

Verified: the numbers above, from those jobs' probe lines.
2026-11-18 21:50:53 -08:00
Anees Iqbal 81b7fff5ff matrix: the harness's rows run with the validation layer disabled by the loader
Every harness and matrix instruction row is meant as a release build without the validation
layer (the planner's budget form). By reading, nothing enabled the layer for the harness's
timing jobs: the harness is a release binary, rt's Instance enables no layer, and only the device
suite points the loader at the carried layer. This makes it hold by construction: the harness
jobs export the loader's documented VK_LOADER_LAYERS_DISABLE (loader 1.3.234 and later) naming
VK_LAYER_KHRONOS_validation alone, since Mesa's device-select layer picks the card. The run's
summary says so once.

Verified: the scripts/matrix unittest suite, 70 tests OK, run locally.
2026-11-18 20:03:19 -08:00
Anees Iqbal 4cb685e075 matrix: frame rows on a node whose CPU clock follows the load are judged by instructions per frame
On the Ryzen 7 7840HS nodes the cores' mean clock tracked the frame rows' pass time (r = -0.88
over twelve passes of one build on the Radeon 780M, job m3-max-49287), so the host time of a
frame row measures the clock its passes found, and the legs there read VOID or venue unstable on
it. The planner's ruling: on such a node the frame rows of every card it hosts are judged by the
new runtime's instructions per frame, their time kept as a cross-GPU outlier check.

results.CLOCK_FOLLOWS_LOAD lists the CPU by potluck's cpu_model fact, which the leg's note now
keeps (`cpu`). There, harness_budget names a frame row's time and judges nothing on it (the
instructions gate judges it; a latency from idle row by its workload's count), the leg re-times
none of them (RETIME_SELECT's skipre, results.retime_skip), base_spread leaves them out, and
over_rows lists only their counts. time_outliers is unchanged and still judges their time
across GPUs. The verdict line names the rule that judged each row. docs/VALIDATION.md states it.

Verified: PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s scripts/matrix, 70 tests OK
(new: the budget, re-time, spread and over-table reading on and off the listed CPU; the verdict
line's rules; the harness job's skip pattern).
2026-11-18 19:03:54 -08:00
Anees Iqbal dfa92ba821 matrix: the creation round's device totals are kept apart, as its gauges at drop already were
Every harness process prints its device's totals over the device's life
(`M2V-MATRIX metric harness-<runtime>/device/<total>`, since ebfc68ebb7) once its workloads have
run. The first creation round's processes (5849a7f029: one per runtime, their output kept whole)
are harness processes of their own, so each printed `harness-<runtime>/device/stamps_not_available`
a second time beside the other rows' process, and every GPU leg of matrix 749c939440 failed on
"record metric harness-new/device/stamps_not_available: recorded twice". The device's gauges at
drop had the same double and were already kept apart by CREATES_APART, which renamed only gauges.
CREATES_APART now renames every record of the device's life, of any kind, to
`harness-<runtime>/creates/device/...`, so the totals take the same road as the gauges and each
key is recorded once. A base without the renamed keys judges nothing on them.

Verified: the matrix's Python tests (test_results, test_matrix) pass, locally and in the job
named in the landing message; the creation test now feeds a device total through both the other
rows' process and the creation process and asserts each key once; with the gauge-only program it
fails on the same "recorded twice" line the matrix printed.
2026-11-18 17:41:12 -08:00
Anees Iqbal e987f3147f matrix test: the node's ready carry is the build's (made, why), as gpu_node reads it
Verified: the matrix's Python tests in the job named in the landing message.
2026-11-18 17:27:11 -08:00
Anees Iqbal e04254de14 matrix: a timing leg names its old runtime's own spread, and is timed again past 10%
The planner's rule for timing legs: each prints the BASE arm's own spread across its passes;
past 10% the leg is VOID and is timed once more at another time, and a leg VOID twice is
reported as "venue unstable", never as a red row. In a matrix harness leg the base arm is the
old runtime, and the rows it times more than once in a leg are the re-timed ones: its main run
and each re-timed pair's (RETIME_PAIRS). results.base_spread takes, of each such row, the old
runtime's largest time over its smallest, less 1, on the time the row is judged on (its GPU time
where gpu_judged), and the largest of the rows; a creation row's first samples are cold, spread
by nature and judged cold against cold, so none counts; with no row re-timed it is n/a and voids
nothing.

Past BASE_SPREAD (10%), harness_budget names every problem the leg's times would raise VOID and
parks it, and the problems of its records and counts stand; the over table reads VOID on each of
the leg's times. The matrix (Run.timed_again) times such a leg's harness once more, after the
node's other jobs (the Windows host's right after its own), and judges that timing. The leg's
line names its base spread and what came of a first timing; a leg VOID in both reads `venue
unstable`, verdict UNSTABLE, which the run counts apart and which does not fail it. A node's last
job is now the last one it actually runs, the re-timing included, so the tree and the carry's
mirror are tidied after it.

Verified: the matrix's Python tests, new ones: the spread on time and on GPU time, n/a with no
re-timed row, a cold first sample never counting; a leg past it failing on its records alone and
the same row failing within it; the verdict line's spread, n/a and UNSTABLE; the over table's
VOID; and a node's harness timed once more after its other jobs, once only, its last job the
tidying one. In the job named in the landing message.
2026-11-18 17:27:11 -08:00
Anees Iqbal 7e33975f58 matrix: NVIDIA's first take of 64 MiB is judged on the new runtime's own part
The planner's ruling on create_64MiB/first_take on NVIDIA's legs: the gate changes, not the
ceilings. From the next round on the row is judged on the new runtime's own part, its first take
less the time inside the driver's calls the same process recorded, against the old runtime's whole
first take, each the median of the five creation processes; the driver's part and the whole ratio
are shown beside it, with the gap's name. An own part past the row's limit (1.03 times its floor,
the parity every row gets) fails the leg as a regression of its own.

The driver's part is `first_allocation_total`, the new runtime's `vkAllocateMemory` time on the
harness's thread in the same take, kept from every process already (FIRST_KEEP). rt counts no
`vkMapMemory` time, so the map stays in the own part, the stricter reading. On 5f2494bfc5 the
allocation took 9902 of the 2080's 12521 us first take (old's whole 5668 us), and 14164 of 17013
us and 10013 of 15066 us on the 3090's legs (old 4865 and 6166 us), against 954-1061 us on RADV.

The table OWN_PART_GATES names the row and its driver's part for the two NVIDIA cards the matrix
runs, which takes the place of their ceilings (1.88 and 2.26), deleted with their status.tsv gap
entries: the row is now over only when its own part is, which is a regression, not the gap. The
over table names such a row's kind `own part`. docs/VALIDATION.md says how the gate judges.

Verified: the matrix's Python tests, two new: the gated row within on its own part though 2.4
times old whole, past it as a regression, a process without its driver's part failing, an extra
leg held to its card's gate and another card's row judged whole; and the over table listing the
row by its own part alone. In the job named in the landing message.
2026-11-18 17:14:56 -08:00
Anees Iqbal 749c939440 matrix status: the first interleaved round's rows over their limits take their owners
The round at 5f2494bfc5 is the first with both runtimes interleaved, the noise meter's base, so
its 39 rows over their limits are owned here, by the owners main named:

- memory2: the creation rows that time block allocation or a take, 12 rows: create_64MiB on the
  XTX, 2080 and 3090; create_64MiB/first_take on the 780M (both), RX 550, XTX and Iris Xe;
  create_private_16MiB/first_take on the 2080, 3090, UHD 630 and Iris Xe.
- entry: create_state/first on the 3090 (both of its legs).
- identity: the translator's GPU rows, 12: wide_bindings on the RX 550, sampling_deep_64x64x16 on
  the UHD 630, and on the Iris Xe constant_managed, constant_private, constexpr_sampling, the five
  sampling_deep rows, threadgroup_scan and waves, noted "Iris swing unresolved".
- Known gaps by the planner's rulings of 2026-11-18: create_64MiB/first_take on the 3090 (as
  before) and on the 2080, the same NVIDIA large Shared allocation: in this round the new
  runtime's allocation calls (create_64MiB/first_allocation_total) took 9902 of the 2080's
  12521 us first take, as they took 14164 of 17013 us and 10013 of 15066 us on the 3090's two
  legs, against 954-1061 us on RADV; and create_state/first on the Iris Xe, the meter's artifact.

The notes that waited for this round go: the 64 MiB rows on the four RADV cards were "unjudged
until the first interleaved round", and the Iris Xe's GPU rows had "one time-boxed investigation
after the first interleaved round"; both are now open records. The Iris Xe's vote_loop and
zero_products keep their card's variance (CARD_VARIANCE), and the frames' commit_to_complete rows
need no entry, gone since 6605f18ddf.

Verified: the matrix's Python tests (the stored table reads) in the job named in the landing
message.
2026-11-18 16:55:12 -08:00
Anees Iqbal 5849a7f029 matrix: each runtime's creation rows run in a process of their own, cold against cold
The planner's rule: a cold first sample is compared cold against cold. The creation rows ran in
five processes that each timed both runtimes, the new runtime first, so the driver's
process-wide setup fell on the new runtime's first pipeline and the old runtime's first samples
came after it, warm. Measured on the Iris Xe (job 48650, ms01 alone, both runtimes from the
harness at cb25e3a83e, five processes each): the old runtime's create_state/first was 5265.8 us
behind the new runtime in one process and 16732.8 us in a process of its own (0.315x);
device_first 0.167x, first_call 0.099x. The one-process ratio new/old 1.302 at first was a
cold-against-warm ratio; cold against cold it is 0.410.

Of the two forms the planner allowed, each runtime's own fresh process is the cheaper: the
harness does not change, and the extra five processes a leg runs take about a second each
(create_state's processes on the Iris ran in under one second). The other form, one unrelated
pipeline before either runtime in a shared process, would need harness code and leaves the
first samples process-warm, not cold. So each of the five rounds now runs `--runtime new` and
`--runtime old` in processes of their own, each on a fresh driver cache and store, the order
alternating from round to round (new first in rounds 1, 3 and 5); the first round's two outputs
are kept whole, the later rounds' first samples as before. The records, their names and the
budget's medians do not change.

Verified: the matrix's Python tests in the job named in the landing message (the harness-runs
test now pins the processes and their order).
2026-11-18 16:35:27 -08:00
Anees Iqbal 6605f18ddf harness, matrix: the frames' commit-to-complete row is gone after its one round
The planner's frame ruling showed the frames' old figure, their last command buffer's
commit-to-complete time (`<row>/commit_to_complete`), beside the new throughput row for one round,
unjudged, then deleted. The round at 5f2494bfc5 is that round. The harness no longer prints the
record, the matrix no longer has a shown-rows table (its one row was this), and the docs and
the frames test lose it. The frames' latency from idle stays a row of its own.

Verified: the harness gate in the job named in the landing message (clippy plain, m2v_gpu and
m2v_cpu_icd, rustdoc, unit tests, the matrix's Python tests).
2026-11-18 16:28:03 -08:00
Anees Iqbal ca92b2aa9e harness: a compute state row's first dispatches 64x1x1, the streams' commonest size; one thread beside it
The create_state row's first dispatched one thread (1x1x1), a size of few dispatches: 3.9% of the
compute dispatches in the discrete replay recordings (from 3 to 5 kernels) and at most 0.5% in the
unified ones, by identity's census of every stream's threadsPerThreadgroup. A runtime that
compiles its pipeline for the dispatch's size (the old runtime) compiled the first at 1x1x1, where
a program's first dispatch runs at its own size. The first now dispatches one threadgroup of
FIRST_THREADGROUP, 64x1x1: the commonest size over the five streams of record, 24.1% of their
compute dispatches (41.7% of the unified recordings', 7.1% of the discrete ones', where 128x1x1
leads with 39.3%; 128x1x1 is 23.3% overall). Each thread's 16 bytes are checked.

Today's form stays beside it, shown and never judged: another content's first (the kernel with
other constants) dispatched as one thread, create_state/first_one_thread
(CreateReport::one_thread_first_us; results.SHOWN_FIRST). The name has no digits so the matrix's
FIRST_KEEP keeps it from every creation process, which a results test holds. The warm-up stays at
one thread. docs/VALIDATION.md and the crate doc say it; the authored device test asserts the
compute row has the one-thread first.
2026-11-18 16:27:00 -08:00
Anees Iqbal 43809bcc09 matrix: the Windows build is sized from its measured runs, 10 GiB and 15 minutes
Its jobs reserved 16 GiB for 60 minutes. Measured on the mini: a peak of 6.7 GiB and 29 s, 4m02s
and 3m45s a run (m3-max-48387, -48266, -48124); the longest cargo build of the 50 runs the
matrix keeps took 6m45s (29 crates compiled). 10 GiB is 1.5 times the peak, and 15 minutes over
twice the longest build, for a cold one. The minutes stay the floor of the measured sizing, and
a run that wants more RAM still runs again with twice its room, up to the default.

Verified: test_matrix (the sizing and retry tests at the new defaults).
2026-11-18 15:51:27 -08:00
Anees Iqbal d3bfe3815d harness, matrix: a frame row is its throughput, and its latency from idle a row of its own
The planner's metric for the frame rows. A frame row's time was its runs' last command buffer's
commit-to-complete time with two runs in flight, which mixes the time a frame adds with how long
it waits behind the one before. Now `frame` and `frame_5cb` (Plan::frames) carry two figures,
each the steady time (best window of ten) of the harness's own completed-handler times:

- THROUGHPUT, the row of record (matrix_time): two runs in flight, from one run's last completed
  handler to the next's. The pairs around the waits that read the gauges after runs 100 and 200
  (GAUGE_RUNS) are left out, as an untimed run sits between them.
- LATENCY FROM IDLE, the row `<row>_from_idle` (FROM_IDLE): as many runs again after the timed
  ones, one in flight, each committed once the one before it completed, from just before its first
  commit to its last completed handler.

The completed handlers now report the time of their commit and of their own run against one
origin (Completions, Handled), so the commit-to-complete times, the throughput and the latency
come from one record. The frames' commit-to-complete time is still printed, as
`<row>/commit_to_complete`, which the matrix shows and does not judge (SHOWN_ROWS) for one round.
Each latency row takes the ceiling and floor its workload's row has (listed_row), in the budget,
the over table and the re-time selection, and is re-timed through its workload's runs. Other
workloads are unchanged, long_4cb's commit-to-complete time included. The shape follows core's
one-run-in-flight probe (3eaec97076), without its environment gate.

Verified: test_results (a new test: a latency row past its workload's ceiling and the budget,
the commit-to-complete row shown and never judged, the over table and the re-time selection
choosing the latency rows); the harness's unit tests gain the throughput and latency arithmetic
(the gauge pairs left out) and matrix_time's frames case; the harness gate job named in the
landing message runs clippy, rustdoc, the unit tests and the authored workloads on lavapipe.
2026-11-18 15:51:27 -08:00
Anees Iqbal 02eaf89136 matrix: the report ends with one table of every row over its limit, with its status
Two legs of eleven passed and every red was known, so the reds were no longer read. The report
(`matrix run` and `matrix show`) now ends with one table: every harness row over its limit on every
leg (results.over_rows, the rows harness_budget fails or names as its card's variance), with its
kind (GPU time, host time, or count for the instructions gate), its ratio and limit, the frozen
arm's verdict (VOID, stands, rebased, no base) and its status. The status comes from
scripts/matrix/status.tsv, one typed entry per card and row (a `*` in the row matches any run):
an open record with its owner and first round, whose age the table counts in rounds; a known gap
with the place it was ruled; or a note alone. A row with neither reads NEW in the first round it
is over (not over in its leg's base) and UNOWNED after; a CARD_VARIANCE row reads as its card's
known gap. The table changes no verdict: the red rule waits for the planner's ruling.

Seeded from the rulings so far: NVIDIA create_64MiB/first_take, a known gap (the 2080 and the
3090); create_64MiB on AMD, a note that it is no known gap and is unjudged until the first
interleaved round; the Iris Xe's GPU-time rows, a note of one time-boxed investigation after that
round; the Iris row_cells, identity's open record (first over at 795c834ded); the 2080 and Iris
frame_5cb, core's open records (from 140714ceae), and both cards' frame and frame_5cb, the
planner's state of throughput and latency from idle.

Verified: test_results (three new tests: the stored table reads and a malformed entry is refused;
every row past its limit is listed with its kind and judged ratio, re-timed and shown rows
included; statuses NEW, UNOWNED, open with its age, gap, notes, an extra leg and the card's
variance). Against the stored notes of 795c834ded and 140714ceae, over_rows lists exactly the rows
the budget named past their limits on every leg (15 and 14 on the Iris Xe).
2026-11-18 15:20:12 -08:00
Anees Iqbal 65aac391c2 matrix: the frozen arm compares only rounds of one harness, one old runtime and one shape
The noise meter read the old runtime's move between two rounds as noise even where the harness or
the old runtime changed between them (ff4ce943c2 gave every workload command buffer a scheduled
and a completed handler, on both arms). Now the matrix compares the trees of
crates/metal2vulkan-harness and crates/metal2vulkan-runtime at the leg's commit and its base's,
a mechanical check: where either differs, every row but the creation rows reads `rebased` and
voids nothing, the creation rows timing creation calls and no command buffer of the harness's.
Each leg's note now keeps its timing shape (HARNESS_SHAPE, "one process, new then old"): against a
base timed in another shape, no row is compared, so the first round of the interleaved shape is
the base the meter starts from.

Verified: test_results (the void rule's test covers both rebases, the column and the void list);
`matrix show 140714ceae` against 99ec109264, whose harness and old runtime trees differ, reads
every command-buffer row rebased and voids only creation rows (Iris: create_private_16MiB's three
and create_render_state/device_first).
2026-11-18 15:13:16 -08:00
Anees Iqbal 3027cf9b68 matrix: each creation process times both runtimes, the new runtime first
The creation rows ran in five processes per runtime, all of the old runtime's before the new
runtime's, so a node or clock that moved between them moved one runtime's samples alone, an order
effect. Each of the five processes now times both runtimes, `--runtime new,old --only
'create_*'`, on its own fresh driver cache and store: a creation's first sample on the new runtime
is cold, and the old runtime's follows it on the same cache. FIRST_KEEP takes each sample's
runtime from its line. The median of five per runtime and every row, ceiling and floor stay.

Verified: test_matrix's harness-run test (five `new,old` creation processes, both runtimes'
samples kept once each) and test_results' creation test (FIRST_KEEP keeps the old runtime's
sample beside the new's and drops a GPU line); the Linux and Windows job scripts pass `bash -n`.
2026-11-18 15:13:16 -08:00
Anees Iqbal abf3d4133d matrix: both runtimes' rows are timed in one process, their passes alternating
Two cards showed the noise the old runtime's frozen arm measures: the Iris Xe's frame moved 2.8x
between rounds, the UHD 630's about 2x between passes of one process. The leg timed each
runtime in a process of its own, one after the other, so a clock or a co-runner that moved
between them moved one runtime's times and not the other's. Now one process times both,
`harness --runtime new,old`: each workload runs on the new runtime, then on the old, so their
passes alternate on the GPU and the node as they are at that moment. The new runtime runs first
in each workload, so its first uses, the judged cold ones, compile before the old runtime's of the
same workload, as cold as in a process of its own. The process is the leg's one suite, `harness`;
a failure still names its runtime (`M2V-FAILED harness-<runtime>/<row>`). The creation rows keep
their five fresh processes per runtime, now alternating old and new; rows over their limits are
re-timed alone as before. No row, ceiling or floor changes, and the deterministic records are
untouched. The frozen arm's column (FROZEN_DRIFT) stays the check on it.

Verified: test_matrix's new test runs the leg's timing script against a stand-in harness: one
`new,old` process, the new runtime's warm run, the creation processes alternating, one suite whose
records hold both runtimes' rows once each. The Linux and Windows job scripts render and pass
`bash -n`.
2026-11-18 15:13:16 -08:00
Anees Iqbal 06b940f810 matrix: the frozen arm is the noise meter: a row whose old time moved past 10% on the base is VOID
The old runtime takes regression fixes only, so its time of a harness row moves between rounds
with the node, the driver and the harness, not with the change under test. Each leg now compares,
per row, the old runtime's time the row is judged on (its GPU p50 where gpu_judged, the median of
the five processes for a creation row's first sample, else its time) with the same time in the
leg's base, the previous round. Past FROZEN_DRIFT (10%) either way, harness_budget names the row
VOID and judges nothing from it: its comparison comes from a re-time in one process with both
runtimes interleaved. The report (run and show) shows the move on every row the base has, and a
line per leg naming the void rows; show computes it from the notes, so a round already noted is
read with it.

Verified: test_results (47 tests, a new one for the void rule, the GPU and median-of-five forms,
no base, and the column). `matrix show 140714ceae` against its base 99ec109264 voids Iris frame
(-64.7%) and frame_5cb (-28.9%), and keeps UHD frame_5cb (+8.8%) and 2080 frame_5cb (+1.2%).
2026-11-18 15:06:36 -08:00
Anees Iqbal 34b58e591b matrix, runtime tests: the open record's exception goes; the Shared refusal's unit table holds the lab drivers' recorded types
The open record against the RTX 3090's extra leg is closed: the old runtime refuses a Shared
dma-buf import on a type with no coherence promise, and reims's forced-refusal pair is green at
the refusal's commit. So the matrix's exception for that record goes with its tests:
results.record_excused, the wrong-bytes parse behind it, the matrix's record_suites and the
`open_records` config key. Every failure on an extra leg is judged again.

a_shared_dma_buf_import_takes_host_coherent_types_or_none now runs over each lab driver's memory
types as vulkaninfo printed them (NVIDIA 620.70.06 on the RTX 2080, ANV on the Iris Xe, RADV on
the RX 550, RX 7900 XTX and 780M, lavapipe), with the udmabuf types the device test printed on
each, in place of the synthetic lists.

Verified: python3 -m unittest test_results test_matrix (53 OK); the per-device expectations
match the SHARED-DMA-BUF lines of the device test on each card (refused untried on both NVIDIA
cards, type 2 on the Iris Xe, type 5 on the three RADV cards, type 0 on lavapipe). The Rust test
is compiled and run by the next check.
2026-11-18 13:34:50 -08:00
Anees Iqbal 99ec109264 harness: each creation row's first is a fresh object's on a device that has made one of its kind
A creation row's first sample was the first of its kind in a fresh process, so it held the
device's own first use (its first recorder, submission, upload, staging region, stamp pool)
together with the object's. A guest keeps one device for the machine's life, so what a device pays
once never reaches it. The planner ruled that every first row is judged on a new object's first use
on a warm device.

Each creation row now makes a warm-up of its kind first, made and used as the first is and kept
until the first is done, then the timed first on a fresh object:
- Shared and Private buffers: a buffer of the same length, kept, so the first takes memory the
  warm-up did not give back (a new 16 MiB Private block on rt's harness placement); the next take
  still follows the first's release.
- compute states: a state of another authored kernel (lcg_step, bound as signed_zero_products is),
  created and dispatched once, its word checked;
- render states: a state of another fragment function (sampled_fragment) with the row's vertex
  function and attachment.
The warm-up's time is its own record, `<row>/device_first`. The matrix shows it with the ratio of
its medians and never judges it (results.SHOWN_FIRST now names each shown sample with its reason).
time_states takes the first as its caller timed it; its other form had no caller left.

Tests: a host-buffer device shows the buffer row's order (the warm-up alone, the first and the
next beside it, the timed ones alone); the matrix shows a warm-up and judges the first it comes
before; the device test checks every row records its warm-up.
2026-11-18 13:06:31 -08:00
Anees Iqbal 12a766d591 matrix: the 780M's second 64 MiB Shared buffer has a ceiling of 1.05
On the 780M (1002:15bf and 1002:1900) create_64MiB/next_take ran 1.040 and 1.032 of old
(medians of 5 processes, e632e01478). rt zeroes the 64 MiB the first buffer gave back with a
memset; old imports fresh pages, which the kernel zeroes. The planner ruled it the same zeroing by
another hand, with a ceiling of 1.05 on that card.

Verified: scripts/matrix/test_results.py and test_matrix.py pass at this commit in a potluck job
on msi.
2026-11-18 12:58:45 -08:00
Anees Iqbal 28309095f2 matrix: the UHD 630's zero_products closes level with old, with a note of why it has no ceiling
On the UHD 630 the new runtime's zero_products runs about 1% ahead of old (m3-max-47846: 20656
and 20943 us against 21003 and 21093). The earlier grid-edge test, which decoded and compared the
position ahead of the region's ragged branch, ran 5-6% faster (19781 and 19568 us). The driver's
executable statistics show that lead was its compiler's accident on that kernel, not missing work:

| form | instructions | static cycles |
|---|---|---|
| the earlier test, fastest | 149 | 507 |
| the test inside the flag's branch | 153 | 520 |
| no edge test at all | 117 | 375 |
| old's | 100 | 336 |

The fastest form has the most instructions. The Windows driver returns no internal
representation of its code.

One shapes job between the two forms (m3-max-47851) found none that keeps both the earlier speed
and the sampling rows' gains. The earlier form itself lost 6-40% on four sampling rows against
the current one, in the job's first, coolest pass. So the row keeps no ceiling, and the note
beside the ceilings says why.

Verified: scripts/matrix/test_results.py and test_matrix.py pass at this commit in a potluck job
on msi (a comment-only change).
2026-11-18 12:36:27 -08:00
Anees Iqbal 0228641d79 rt: the encoders and a segment's begin borrow the core; the lock budget's bound is 0.25, and a node naming the event must measure it
The planner's rulings on the lock budget and the alternations:

- The bound is one value on every device, 0.25 locked instructions per added command, for
  draws, bound draws and dispatches: a site of rt's that runs per command adds 1 or more, and
  the drivers' own growth stays far below it (measured: Iris Xe 0.0195 / 0.1425 / 0.0285 at
  most, RX 7900 XTX 0.0000 / 0.0015 / 0.0050, RTX 2080 0.0005 / 0.0000 / 0.0175).
- Each budget test prints its measurement as a matrix record, `locks lock_budget/<kind>`, per
  million added commands (none below 0), beside its LOCKS line. The matrix fails a GPU leg
  missing any of the three where the node's setup names M2V_LOCK_EVENT (results.LOCK_BUDGET,
  names_lock_event, lock_budget_missing; keyed on the setup, not on a card), for a commit that
  has the budget; elsewhere the budget prints LOCKS-UNMEASURED and passes. The note carries the
  three values per leg. docs/VALIDATION.md's records table has the kind.
- Building::begin borrows the device's core where it took an Arc<Core> it dropped after the
  start timestamp; the compute and render encoders hold an uncounted borrow of the recording's
  core (kept::Uncounted, the kept handle's pattern for an Arc), valid while the encoder holds
  the recording, which it does until it ends. Two locked instructions fewer per encoder and one
  pair fewer per segment.

Verified: scripts/matrix's unittest suite (47 tests, a new one for the event and the missing
records).
2026-11-18 12:34:55 -08:00
Anees Iqbal 53bac3dd47 matrix: a card's leg of record by node, extra legs on its other nodes, and an open record that lists their wrong-bytes failures
A card the lab holds on more than one node now runs on each of them when the matrix config names
its node of record (`record_nodes`, card to node). The leg on that node is the card's leg of
record, named by the card as before. Each other node's is an extra leg, `card@node`, judged like
any leg and held to the card's ceilings, floors and variance rows (results.card_of): timing rows
are judged on both. An AMD extra leg selects its device by its card.

An extra leg named in `open_records` (leg to a one-line record) has an open record against its
card. A failed test there is listed with the record and not judged only if both hold:
- it failed with wrong bytes;
- the card's leg of record ran the same suite at the same commit and the test did not fail there.
Every other failure on that leg is judged like any other.

How wrong bytes are told, from the test's captured output after nextest's summary (parse_suite's
`wrong_bytes`):
- its status is FAIL; a TIMEOUT, a signal or a leak never counts;
- its output has Rust's `assertion `left == right` failed` with both sides, `left:` and `right:`,
  lists of numbers (the bytes, words or texels read against those expected), so a compare of one
  value, a count, does not count;
- no line names a device loss (DEVICE_LOST, device lost) or a validation message (VUID-,
  Validation Error).
Any other output, a panic of another message included, is not wrong bytes, so it is judged.

Node names stay in the config, not here. The config this needs for the 3090s:
"record_nodes": {"10de:2204": <um870's node>}, "open_records": {"10de:2204@<ms01's node>": <the
record's line>}.

Verified: scripts/matrix/test_results.py and test_matrix.py pass at this commit in a potluck job
on msi. The new tests check that only an assertion of two lists of numbers reads as wrong bytes
(not a count compare, a device loss, a validation message, an unwrap or a timeout); that an extra
leg lists a wrong-bytes failure only where it passed on the leg of record, and judges the rest;
that an extra leg takes its card's limits; and that the plan makes a leg of record plus an extra
leg from `record_nodes` (and no leg of record when that node is away).
2026-11-18 12:30:43 -08:00
Anees Iqbal 0afc54c573 rt tests: every instance runs under the validation layer, its log checked
Every instance rt's device tests open goes through one helper, crate::tests::validation. It
enables VK_LAYER_KHRONOS_validation for its own test process through the loader's and the
layer's own variables (VK_INSTANCE_LAYERS; report flags error,warn, debug action log, one log
file per process). It checks that every device of the cfg's kind lists an active validation
tool (vkGetPhysicalDeviceToolProperties), so a run whose loader found no layer fails. Once the
instance is gone, it reads the log, prints each line with the test's name and fails on any
message. The 41 sites that called Instance::new go through it; the exit-handler test reads its
child's log, since the child's instance never drops. One test makes a deliberately invalid
call (a buffer of size 0, refused by the layer) and checks that its log holds exactly
VUID-VkBufferCreateInfo-size-00912.

The product keeps no layer code and no variable read. Its one change is a visibility:
Instance's shared state is pub(crate), so the helper waits, bounded, on a weak handle of it
until the instance is gone, and only then reads the log.

scripts/validation-layer makes the layer's directory, one version (1.4.363.0) on every leg, as
a carry: Linux's copied from a node whose pacman package is that version and unaltered,
Windows's from MSYS2's clang64 packages checked against the package database's SHA-256, and
macOS's from a Homebrew install at that version. scripts/matrix carries it to every job that
runs rt's device tests (GPU legs, lavapipe, the Windows host), points VK_LAYER_PATH at it, and
puts the layer's version in the leg's note. A job without the layer says so and points the
loader at none. The harness's timing jobs run without it.

Verified: the matrix's unit tests (48, two new ones run the layer's shell for real) and the
layer carry made. Builds and legs follow.
2026-11-18 12:17:31 -08:00
Anees Iqbal 0d3830955c matrix: the Iris Xe's zero_products and vote_loop are informational, the driver's register assignment moves them
The padding sweep m3-max-47683 put 0 to 40 dead multiply-adds ahead of the entry test's loop on
the Iris Xe (ANV, Mesa 26.2.6). The loop's instructions stayed the same at every pad, but its GPU
time moved in equal steps:
- zero_products: 5299-5308, 5074, 4841, 4609 and 4377-4388 us, with 4, 3, 2, 1 and 0 two-source
  adds whose two vector sources start at GRF numbers equal modulo 16;
- vote_loop: 890-930 us with one such cmp, 824-848 us with none.
The old runtime's dumps and identity's chain probe have none, and run at the fast level. The rows
therefore measure the driver's register assignment, not a form of ours. They join CARD_VARIANCE
for that card: never a problem, named with the range seen, so no lane claims a gain or a loss on
them without the loop's dump.

The entries come out once the harness kernels are authored not to depend on the assignment.

Verified: scripts/matrix/test_results.py and test_matrix.py pass at this commit, in a potluck
job.
2026-11-18 11:55:16 -08:00
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