Repository navigation
Ring tile sweep result: N* = 2; what the kernel times say about patch 0005 - #211
Conversation
…erved-cycle estimate The declared rule and configuration move to ring_tile_rule.py (no torch), which the sweep applies to its own report. The threshold is now withheld (n_star null, with `differences` naming each parameter) from any run whose blocks, batches, tiles, layer count, iterations or repeats differ from the declared ones, not only from other grids (Codex 4162912791 on #185: repeats other than 4). ring_tile_cycle_estimate.py (derived, CPU) checks a sweep report against the declared configuration and threshold, then turns its kernel times into the change in the fold's served cycle and throughput by tile, block and concurrency, against the served sessions with tile 32 (#133) and tile 4 (patch 0005). The threshold tests now run without torch.
…for patch 0005 evidence/drafter/ring_tile_sweep/: the hold's sweep.json, provenance.txt and cpu_load.json (2026-10-02 14:48-14:50 UTC, repository d9d2e02 and engine 9292abd874, both clean; foreign CPU 0.155 cores), and cycle_estimate.json from ring_tile_cycle_estimate.py at 7ddbbb0. The run used the declared configuration and passed the bitwise gate at every point. Tile 4 beats tile 32 at one and two sequences on both blocks and loses from three, so N* = 2. Scaled to the served cycle, the kernel times reproduce the fold's shift between #133 and the patch-0005 session at c = 1, 2 and 8 within 0.7 points; block 16 at c = 4 is 2 points off. README: the result section, the declared configuration in full, and a pointer from the 0005 section.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
|
Verdict: APPROVE (head 77fc77f; provisional on Codex, which is running on this head) No blocking items. Two optional wording items are at the end. Validity
The result, recomputed from
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 77fc77f4f1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'blocks': sorted({r['T'] for r in rows}), | ||
| 'batches': sorted({r['N'] for r in rows}), | ||
| 'tiles': sorted({r['BV'] for r in rows if r['path'] == 'ring'}), |
There was a problem hiding this comment.
Validate every point in the declared tile grid
report_config() compares only the global sets of blocks, batches, and tiles, so it does not establish that every (T, N) contains every declared tile exactly once. For example, deleting the BV=16 row at (16, 1) still makes check_sweep() return no problems because BV=16 exists elsewhere and the threshold only reads BV=4/32; the generated kernel table and served estimate then silently omit tile 16 at that point while claiming the declared configuration was checked. Validate the complete Cartesian grid (and row uniqueness, including the stock row) before accepting the report.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Valid; fixed in d6d7932. For this sweep it changes nothing (the committed sweep.json has exactly one ring row per tile and one stock row at each of the 26 points), but the check claimed more than it verified. ring_tile_rule.grid_problems() now requires every (block, batch) pair the rows name to have exactly one ring row per tile and exactly one stock row, and reports repeated rows. threshold_for_config() adds those findings to differences (so n_star is null), and check_sweep() in the estimate refuses the report. A new test removes tile 16 at (16, 1) and repeats a stock row; both are caught while the global sets still match. cycle_estimate.json regenerated at d6d7932 with unchanged content.
…ck row at every point The global sets of blocks, batches and tiles cannot show a tile missing at a single point: deleting tile 16's row at (16, 1) left check_sweep() clean (Codex on #211). grid_problems() now requires every (block, batch) pair of the rows to have exactly one ring row per tile and exactly one stock row; threshold_for_config() and the estimate's sweep check both add its findings to the differences. The committed sweep passes it unchanged.
…arp count from code reading The prediction agrees with the measured fold shift within 0.7 points, which is also the stock drift between the two unpaired sessions, so the README says the kernel times are consistent with 0005's served effect rather than that they account for it (reviewer). The warp-count statement is labelled as code reading, since sweep.json does not record warps. The validity list states the per-point grid check; cycle_estimate.json regenerated at d6d7932 (content unchanged apart from the recorded commit).
|
@codex review |
|
Verdict: APPROVE (head b332520; provisional on Codex, which is running on this head) This is a delta review of 77fc77f..b332520: two commits, one for Codex P2 4167047313 and one for my two optional wording items.
Everything I checked at 77fc77f still holds. This approval becomes final once Codex is clean on b332520. |
|
Codex Review: Didn't find any major issues. Breezy! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
drafting.tex, app:verify-state: the kernel microbenchmark locates the crossover of the fold's narrow tiles at two sequences (tile 4 takes 0.54-0.70 of tile 32's time at one and two, 1.03-1.40 times from three to 64; declared rule, N* = 2). The served-cycle estimate is derived; it is consistent with the unpaired sessions within stock's drift (0.7 points), misses block 16 at c = 4, and puts the patch's cost at c = 16-32 at 3.4-3.5% (block 16) and 2.2% (block 8). The restricted rule (narrow tiles up to two sequences) is not built. Also the per-layer times at one sequence and evitem drafter-ring-tiles. The optional levers-table clause is left out: with it the table is 14 pt taller than the page.
The kernel sweep that #180 and #185 set up has run. It times the fold's ring-writing GDN verify at value tiles 4, 8, 16 and 32 for blocks 16 and 8 and batches 1-64, to find the batch above which patch 0005's narrow tiles stop paying (#167's trade-off). This PR adds the result, a derived estimate of what the kernel times mean for served throughput, and the threshold check Codex asked for on #185.
The run
run_ring_tile_sweep.sh, one exclusive hold, 2026-10-02 14:48-14:50 UTC; repository d9d2e02 and engineengine/drafter9292abd874 (bd66ce343e + 0001-0005), both with no modified files; foreign CPU load 0.155 cores on average (largest one-second sample 0.87). Files inevidence/drafter/ring_tile_sweep/;sweep.json,provenance.txtandcpu_load.jsonare the hold's own outputs, copied unchanged.Validity, checked before reading N*:
sweep.json: the grid inrows,shape.layers,iters,repeats), with one row per tile and one stock row at each of the 26 points.ring_tile_cycle_estimate.pychecks this mechanically and applies the declared rule to the rows again; it reproduces the recorded threshold.sweep.jsondoes not record warps): forcing a tile keeps the selection's warp count, 1 for both tiles at 9292abd874, so tile 32 is the ring verify's launch under 0001-0004 and tile 4 its launch under 0005.Result (measured)
By the declared rule, N* = 2 on both blocks. Tile 4 takes 0.54-0.70 of tile 32's time at one and two sequences, in every repeat, and is slower from three sequences on (1.09 at N = 3, 3-40% slower over N = 3-64, at least 19% from N = 16). Under rule 5 that is neither 0 nor 8 or more, so the kernel timing agrees with #167's served A/B, and the declared reading allows a restricted patch: tile 4 for the ring-writing verify at N ≤ 2, tile 32 above. It has not been built.
Tile 16, outside the declared reading, is the fastest tile at most batches from 4 up (6-16% below tile 32 from N = 12). It passed this sweep's bitwise gate but no parity or served exactness check, so the declared rule leaves it out.
What it says about the fold's tile choice (derived)
cycle_estimate.jsonmultiplies the per-layer difference by 24 layers at N = c and sets it against the wall time per cycle of #133's fold runs (W = c x tau / y). The measured column is the patch-0005 session's fold y over #133's, which is unpaired; stock's ratio between the same two sessions (0.994-1.007) is the drift.The estimate assumes every cycle runs at batch c and that the microbenchmark's time per layer is the verify's time inside the model; the README states both.
Code
ring_tile_rule.py(new, no torch): the declared configuration and threshold rule, moved out ofgdn_ring_tile_sweep.py, which now applies them to its own report. The threshold is withheld (n_starnull, withdifferencesnaming each parameter) from any run whose blocks, batches, tiles, layer count, iterations or repeats differ from the declared ones. This handles Codex 4162912791 on Drafter: ring tile sweep pre-registration (declared threshold rule, rotated tile order, failed runs to sweep.failed.json; #167 README rounding) #185 (repeats other than 4 still producedn_star), which was deferred to this PR. The rule itself is unchanged; the README's declared-reading section gains a paragraph listing the full configuration and saying what changed.ring_tile_cycle_estimate.py(new, CPU): the sweep check and the derived estimate above. It refuses a sweep off the declared configuration or with a missing or repeated grid point, with a bitwise failure or with a threshold the rule does not reproduce, and a session point with invalid runs, before writing anything.The #167 README cells that main rounded twice (block 16 c = 1 stock/fold 870/887; block 16 c = 2 ratio 1.011) were already corrected on main by #185, so nothing changes there.
Checks
pytest tests/test_drafter_tools.pyat b332520: 24 passed, 1 skipped in the CPU venv; 25 passed in the SGLang venv.pre-commit run --fileson every changed file: clean.ring_tile_cycle_estimate.pyon the committed evidence reproducescycle_estimate.json(generated at d6d7932, the latest code commit, with no modified files).--helpand the tiles check run in the SGLang venv; the report path that calls the rule is covered only by reading.Review rounds
grid_problems()requires exactly one ring row per tile and one stock row at every (block, batch) point;threshold_for_config()and the estimate's sweep check add its findings. The committed sweep passes unchanged; a new test removes tile 16 at one point and repeats a stock row.