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).
This commit is contained in:
Anees Iqbal committed 2026-11-18 16:28:03 -08:00
1 parent 32df0845b6
commit 6605f18ddf
5 files changed
+15 -39

No files matched your search

+7 -14
View File
@@ -34,8 +34,8 @@
use metal2vulkan_harness::authored::{Create, Makes, FIRST_THREADGROUP};
use metal2vulkan_harness::plan::Plan;
use metal2vulkan_harness::run::{
commit_to_complete, count_instructions, matrix_time, percentile, run_each, steady,
CreateReport, Harness, Report, Runs, Session, Warmup, FROM_IDLE,
count_instructions, matrix_time, percentile, run_each, steady, CreateReport, Harness, Report,
Runs, Session, Warmup, FROM_IDLE,
};
use metal2vulkan_harness::{authored, description, old, rt, Error, Failed, Result, Waits};
use std::path::{Path, PathBuf};
@@ -668,21 +668,14 @@ fn print(runtime: &str, name: &str, report: &Report) {
}
}
if !report.throughput_us.is_empty() {
// The frames' latency from idle, a row of its own, and their commit-to-complete time,
// shown beside the throughput that is their row's time.
let (idle, c2c) = (steady(&report.from_idle_us), commit_to_complete(report));
let show = |us: Option<f64>| us.map_or("-".to_owned(), |us| format!("{us:.1}"));
println!(
"{name:<17} {runtime:<8} latency from idle {} us, one run in flight; commit-to-complete {} us",
show(idle),
show(c2c),
);
// The frames' latency from idle, a row of its own beside the throughput that is their
// row's time.
let idle = steady(&report.from_idle_us);
let show = idle.map_or("-".to_owned(), |us| format!("{us:.1}"));
println!("{name:<17} {runtime:<8} latency from idle {show} us, one run in flight");
if let Some(us) = idle {
println!("M2V-MATRIX time harness-{runtime}/{name}{FROM_IDLE} {us:.3}");
}
if let Some(us) = c2c {
println!("M2V-MATRIX time harness-{runtime}/{name}/commit_to_complete {us:.3}");
}
}
for (count, value) in &report.counts {
println!("M2V-MATRIX metric harness-{runtime}/{name}/{count}_per_run {value}");
+2 -4
View File
@@ -103,11 +103,9 @@
//! run's last completed handler to the next's; else of each run's last command buffer's
//! commit-to-complete time where the workload times its command buffers'
//! ([`plan::Plan::commit_to_complete`]), the lateness of the others a column that decides nothing, else
//! of the host wall time each run adds. A frames workload prints two more rows: its latency from
//! of the host wall time each run adds. A frames workload prints one more row: its latency from
//! idle, `<workload>_from_idle` ([`run::FROM_IDLE`]), the steady time of as many runs again, one
//! in flight, each from just before its first `commit` to its last completed handler; and its
//! last command buffer's commit-to-complete time, `<workload>/commit_to_complete`, which the matrix
//! shows and does not judge. The GPU time (the table's `steady` column, and the
//! in flight, each from just before its first `commit` to its last completed handler. The GPU time (the table's `steady` column, and the
//! `harness-gpu-` record: a run's GPU time at the 50th percentile, on the matrix time's scale,
//! for a plan workload whose runs wrote one) is a diagnostic and decides no row. A creation workload's time is the steady time of its creation
//! calls. A workload the device sizes ([`plan::Scaled`]) prints the size it ran at on a line of
+1 -1
View File
@@ -355,7 +355,7 @@ changes the harness sets the base for the next.
| `metric` | A deterministic count per frame or per command buffer: submissions, passes, barriers, bytes copied, pipelines created | It is larger than the base's |
| `instructions` | User-space CPU instructions per draw or per dispatch, and per harness run, the p50 over the row's timed runs: the whole process's (`harness-<runtime>/<row>/per_run`), and where the runtime names its threads, theirs with the harness's thread (`.../own_per_run`) and the rest, a driver's own threads (`.../others_per_run`) | It is more than 1% over the base's; the harness's counts are judged by the instructions gate instead |
| `gauge` | Live objects of one resource kind, the key ending in the point it was read at: `@100` and `@200` (loop iterations), `@drop` (after the device dropped) | `@drop` is not 0, or `@200` differs from `@100`; for the memory pool's `blocks`, which frees allocations an earlier workload left idle once the most bytes in use over its window falls and the device is quiet for 20 ms, only `@200` over `@100` |
| `time` | A duration in microseconds: what a program waits on in a harness workload's run, timed on the host: for the frame rows (`frame`, `frame_5cb`), their throughput, two runs in flight, from one run's last completed handler to the next's, and their latency from idle as rows of their own (`<row>_from_idle`, held to the row's ceiling and floor), one run in flight, from its first commit to its last completed handler, their last command buffer's commit-to-complete time shown beside them and not judged (`<row>/commit_to_complete`); for another workload that times its command buffers, its last command buffer's commit-to-complete time (the others' lateness is a column of the harness's table and no record), else the host wall time a run adds (a run's GPU time is a record of its own, `harness-gpu-<runtime>/<row>`, parked here and judged by the harness budget) | Only as a cross-GPU outlier: its ratio to the base's is more than 1.25 times the median of that ratio over at least 3 GPUs |
| `time` | A duration in microseconds: what a program waits on in a harness workload's run, timed on the host: for the frame rows (`frame`, `frame_5cb`), their throughput, two runs in flight, from one run's last completed handler to the next's, and their latency from idle as rows of their own (`<row>_from_idle`, held to the row's ceiling and floor), one run in flight, from its first commit to its last completed handler; for another workload that times its command buffers, its last command buffer's commit-to-complete time (the others' lateness is a column of the harness's table and no record), else the host wall time a run adds (a run's GPU time is a record of its own, `harness-gpu-<runtime>/<row>`, parked here and judged by the harness budget) | Only as a cross-GPU outlier: its ratio to the base's is more than 1.25 times the median of that ratio over at least 3 GPUs |
| `size` | The size a harness row whose size follows the device ran at (`long_4cb`) | The leg's two runtimes ran the row at different sizes: its times are then not compared (the harness budget) |
| `locks` | The lock budget's locked instructions per million added commands (`lock_budget/draw`, `lock_budget/bound_draw`, `lock_budget/dispatch`; rt's `tests::locks`), the whole process's in user space, on a node whose matrix setup names its CPU's event in `M2V_LOCK_EVENT` (`cpu_core/r21d0`, `r1e25`) | The test fails past 0.25 per added command, on every node alike; on a node whose setup names the event, a GPU leg missing any of the three fails; elsewhere the budget prints `LOCKS-UNMEASURED` and passes |
+2 -14
View File
@@ -555,12 +555,6 @@ HARNESS_GPU_FLOORS = read_floors((Path(__file__).resolve().parent / "gpu-floors.
#: name (the harness's `FROM_IDLE`): `frame_from_idle` beside `frame`, whose time is the frames'
#: throughput. Each of the two takes the ceiling and the floor its workload's row has (listed_row).
FROM_IDLE = "_from_idle"
#: Rows shown with the ratio of their times and never judged, by the end of their names, each for
#: its reason (harness_budget, over_rows).
SHOWN_ROWS = {
"/commit_to_complete": "a frames workload's last command buffer's commit-to-complete time, beside "
"its throughput",
}
def listed_row(row):
@@ -823,11 +817,6 @@ def harness_budget(leg_id, leg, base=None, rebased=None):
problems.append(f"harness budget {row}: new ran at size {new_size}, old at {old_size}, so its "
"times measure different work")
continue
why = next((why for end, why in SHOWN_ROWS.items() if row.endswith(end)), None)
if why:
parked.append(f"harness budget {row}: new {new:.1f} us over old {old:.1f} us is {new / old:.3f}: "
f"shown, not judged: {why}")
continue
limit = row_limit(leg_id, row)
gated, named = instruction_gate(leg_id, row, records)
problems += gated
@@ -906,7 +895,7 @@ def over_rows(leg_id, records):
(EXACT against the stored count, LENIENT against the old runtime's whole count), the ratio
new over old (the median of the re-timed pairs where the row was re-timed, of the FIRST_RUNS
processes' medians for a creation row's first sample). A row its re-timed pairs bring within
is not over; a shown row (SHOWN_FIRST, SHOWN_ROWS) is never judged, so never over."""
is not over; a shown row (SHOWN_FIRST) is never judged, so never over."""
times, counted = records["time"], records["instructions"]
out = []
for key in sorted(times):
@@ -921,8 +910,7 @@ def over_rows(leg_id, records):
out.append((row, "count", own / stored, HARNESS_BUDGET))
if own > old_i:
out.append((row, "count", own / old_i, 1.0))
if (first_row(row) and any(row.endswith(end) for end in SHOWN_FIRST)) or any(
row.endswith(end) for end in SHOWN_ROWS):
if first_row(row) and any(row.endswith(end) for end in SHOWN_FIRST):
continue
if first_row(row):
samples = first_samples(times, row)
+3 -6
View File
@@ -573,11 +573,10 @@ class HarnessBudgetTests(unittest.TestCase):
self.assertEqual(chosen, ["frame", "listed"])
self.assertEqual(chosen, failed)
def test_a_frames_latency_row_takes_its_workload_s_limit_and_its_commit_to_complete_is_shown(self):
def test_a_frames_latency_row_takes_its_workload_s_limit(self):
ceilings = {"a": {"frame": 2.0}}
times = {"frame": (100.0, 150.0), f"frame{results.FROM_IDLE}": (100.0, 230.0),
"frame_5cb": (100.0, 102.0), f"frame_5cb{results.FROM_IDLE}": (100.0, 110.0),
"frame/commit_to_complete": (100.0, 900.0)}
"frame_5cb": (100.0, 102.0), f"frame_5cb{results.FROM_IDLE}": (100.0, 110.0)}
records = {f"harness-{runtime}/{row}": pair[i]
for row, pair in times.items() for i, runtime in enumerate(("old", "new"))}
lines = [f"M2V-MATRIX time {key} {value:.3f}" for key, value in records.items()]
@@ -589,9 +588,7 @@ class HarnessBudgetTests(unittest.TestCase):
["harness budget frame_5cb_from_idle", "harness budget frame_from_idle"])
self.assertIn("past its ceiling 2.0 with its allowance, 2.060", problems[1])
self.assertEqual(parked, [
"harness budget frame: new 150.0 us over old 100.0 us is 1.500, its ceiling 2.0",
"harness budget frame/commit_to_complete: new 900.0 us over old 100.0 us is 9.000: shown, not "
f"judged: {results.SHOWN_ROWS['/commit_to_complete']}"])
"harness budget frame: new 150.0 us over old 100.0 us is 1.500, its ceiling 2.0"])
self.assertEqual([row for row, *_ in results.over_rows("a", recs(time=records))],
["frame_5cb_from_idle", "frame_from_idle"])
# The leg re-times the rows it fails, the latency rows against their workloads' limits.