From e5eae86d99b0012c1fa047289eed5a683728bd00 Mon Sep 17 00:00:00 2001 From: lcy-seso Date: Sun, 27 Sep 2026 14:38:28 +0800 Subject: [PATCH 1/4] [Bench] Group benchmark rows by workload label and keep manifest order The data pages sorted an op's rows by case id, so a size sweep read t1, t128, t2048, t32, and ops with several tensor templates numbered the key in one order and the table in another. Rows now keep the snapshot's order, which is the manifest's, and the table follows the key cluster by cluster. Each manifest label is one row group: the label once, spanning its dtype rows, and a dtype column beside it. The key lists each label once with the values that vary and the dtypes it ran at, so the W codes are gone. A row no manifest describes takes its id, trailing dtype names split off, as its label. --- CLAUDE.md | 1 + docs/assets/extra.css | 99 ++++------- scripts/gen_bench_pages.py | 271 ++++++++++++++++++++----------- scripts/workload_shape.py | 2 +- tests/fixtures/bench_results.xml | 17 ++ tests/fixtures/manifest/ops.yaml | 2 +- tests/golden/elementwise.md | 23 +-- tests/golden/index.md | 4 +- tests/golden/linear-attention.md | 12 +- tests/golden/ssm.md | 9 +- tests/test_renderer.py | 6 +- 11 files changed, 265 insertions(+), 181 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 781c6698..8966e86d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -69,6 +69,7 @@ implementation of the same op on that workload. | Device time | The compared quantity is `device_busy_ms`, never wall-clock span. | | Two questions | `Ratio` says whether someone else's kernel is faster; `SOL` how much faster the hardware allows anyone to go, with the binding resource (`mem`/`comp`/`lat`) in its own `Bound` column. The SOL arithmetic and thresholds are imported from the checkout's roofline tool (M5) — never re-derived here. | | Order follows the API Reference | `DATA_PAGES` takes the API nav's order over the same families — a page per family except `Conv & Pool` (two) and `Other` (Top-k, FFT, mHC, Engram, the rest). Within a page, ops sit in the order `docs/api/` names them, read by `api_op_order()`; an op no API page names comes last, ranked by verdict. `_BENCH_ORDER` in `hooks.py` repeats the page order for the nav: change one, change the other. | +| Rows follow the manifest | One row group per manifest label, one row per dtype under it in a `dtype` column. Labels keep the order the snapshot lists them in, which is the manifest's; the key above the table lists them in the same order. A row no manifest describes takes its id, trailing dtype names split off, as its label. | | Workload shapes | The snapshot names a workload but does not carry its shapes. `scripts/workload_shape.py` reads them from the TileOPs spec manifest at the commit the benchmark ran on, joined by the `