Repository navigation
Drafter: kernel sweep of the fold's ring-writing GDN verify by value tile and batch (follow-up to #167; run pending) - #180
Conversation
…rify at forced value tiles 4-32 for batches 1-64 (blocks 16 and 8), stock verify as reference, tiles checked bitwise against 32
|
@codex review |
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: 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". |
|
Verdict: APPROVE at aeaa3b1 This is code for a hold that has not run, so I reviewed the hold script, the bitwise gate and the analysis plan. The results commit will need its own review. Hold script (
Bitwise gate against tile 32:
Timing:
Analysis plan. The body is clear about what this decides and what it doesn't: a kernel microbenchmark on random inputs, with any threshold still needing kernel parity and a served session before a claim. Codex found no major issues. Host identity is clean, and the one commit is Sam's. Optional, before the hold runs:
|
Follow-up to #167. The exact GDN fold verifies with SGLang's recurrent kernel writing a ring (
cache_ring=True), and the kernel's value tile decides how many programs it launches: one per (value tile, sequence, value head). At the pin, on sm_90, the ring verify uses tiles of 32. Patch drafter/0005 gave it the tiles of 4 that the stock per-position-state verify uses for at most 64 sequences. In #167's served A/B that removed the fold's loss at c ≤ 4 but cost it about 4% at c = 8 on block 16, and c ≥ 16 was not timed. This PR times the ring verify directly, by tile and batch, to find the batch above which the narrow tiles stop paying. That threshold is what a restricted version of 0005 would use. The GPU run is queued (normal lane); results will be added here.What it measures.
experiments/drafter/gdn_ring_tile_sweep.pycovers value tiles 4, 8, 16 and 32 (forced through the launch-config selection), batches 1, 2, 3, 4, 5, 6, 8, 12, 16, 24, 32, 48 and 64, and blocks of 16 and 8 tokens, at the Qwen3.5-4B GDN shape.What it does not decide. It is a kernel microbenchmark at random inputs, not served throughput. A batch threshold chosen from it still needs kernel parity and a served session (stock, fold with 0001-0004, fold with the restricted rule) before any claim. Main has deferred those sessions until the end-to-end campaigns are done.
Run.
scripts/gpu_lock.sh -x experiments/drafter/run_ring_tile_sweep.sh(one exclusive hold, about 10 minutes, no server). It runs from a detached worktree at aeaa3b1 with engineengine/drafter9292abd874. The forced tiles make the engine's own rule irrelevant to the ring rows; the stock reference uses the engine's tile, 4 for at most 64 sequences. The hold records the repository and engine commits and the foreign CPU load (bench.hostload) alongsidesweep.json.Testing. pre-commit on the changed files;
--helpruns in the SGLang venv;hold_lint.shreports no errors. The script has not run on the GPU yet.