docs(audit): CAKE assessment + Phase 1/2 scoping for the Tile sync surface - #562
Merged
Merged
Conversation
…rface Assess CAKE (compiler-agent co-design, arXiv:2608.12629) and the FlashInfer PR #4262 artifact against the tree at f96695f. `reference` role, not a status surface. Statistical audit of the paper's clean-start A/B. Because n=3 and the paper reports median [min,max], the reported triple is the complete sample, so exact permutation tests apply. The headline 1.144x vs 0.928x is NOT significant (one-sided exact p = 0.200; the arms overlap -- the control's best run beats the treatment median). What IS separated is evolve time (p = 0.050, complete separation) and plateau rate 3/3 vs 0/3 (Fisher, p = 0.050). The design's family-wise floor is 0.15, so no effect size could have made it significant. Supported claim is convergence, not ceiling -- which matters here because the paper's own curve crosses baseline only at 55M tokens, an order of magnitude above a realistic per-kernel budget. Three in-tree findings the read surfaced: * F1 -- 55 of 74 Tile op defs carry AnyType in their arguments; only 8 use a declared Tile_* type. The hole sits on the sync/memory surface. tile.mbarrier.wait cannot consume the !tile.mbarrier_token that tile.mbarrier.arrive_expect_tx produces, so the arrive->wait edge is not expressible; tile.pipeline_advance need not consume a pipeline_state, though Tile_PipelineStateType's own summary claims SSA def-use ownership (Decision #29 stated and violated in one file). * F2 -- WarpSpecLegalityPass is type-blind by construction, matching on name substrings and attributes and never reading an operand type (Decision #30, one level below the EffectLattice instance). Tightening ODS buys the verifier nothing on its own, which is why Phase 1 is one phase and not two. The legality fixtures also run under -allow-unregistered-dialect while the fixtures exercising the registered vocabulary do not run the legality passes -- the registered path and the verified path are disjoint. * F3 -- no author can state a schedule; barriers and TMEM are synthesized per-arch by target_ir.py lowering from a tile.matmul. Scopes Phase 1 (typed + derived sync surface) and Phase 2 (roles and producer/consumer sets on the barrier), with Phases 3-6 sketched behind the gates that Phase 1/2 must produce. Section 3.5 draws the boundary against the in-flight W1.1 typing workstream so nothing here duplicates it, and inherits its four method lessons -- notably that only numerical execution catches the wrong-answer failure mode, so the exit gates require gfx1151. Corrects the arbiter proposal: emit/candidate.py's `measure` is the terminal selector, so wiring a predictor into it leaves regret unbounded. The two-stage form (predict -> prune -> measure -> select) is gated on first instrumenting the rejection fraction, which CAKE never reports. Docs only; no code paths touched. check_generated_docs.sh: 25 in sync. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d56d5ba832
ℹ️ 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".
…te scope Four review findings, all correct on the merits. 1. Classify as `plan`, not `reference`. Sections 5-6 carry owners, ordered steps, stop conditions, and exit gates, so `reference` bypassed the plan lifecycle and the scoped-plan routing gate (test_scoped_compiler_plans_defer_global_order_to_integrated_plan only inspects audit_role: plan). House precedent is SPARDA_REVIEW.md -- an external review that scopes extraction work -- which is plan/open. Adds plan_state: open and a header block deferring global order and fleet allocation to INTEGRATED_COMPILER_PLAN.md, and noting both phases still need an owning work-item ID there before implementation starts. 2. Reconcile the convergence claim with multiplicity (2.3). The draft asserted convergence as the supported conclusion one section after establishing a family-wise floor of 0.15. Both convergence metrics are p = 0.05 unadjusted, so neither clears 0.05 after correction; Holm rejects nothing (sorted 0.05/0.05/0.20 against alpha/3 = 0.0167 fails at the first step). Also records that no primary endpoint is prespecified, so picking the two metrics that separate is post-hoc, and that evolve time and plateau are not independent, so Bonferroni is conservative for that pair but not by enough. Reframed as unadjusted exploratory evidence plus a descriptive ordering. 2.4's planning consequence is unchanged and re-stated as a Phase 3 gate -- it never depended on a significance threshold. 3. Recount all Tile op definitions (3.2). The scan enumerated only four of the six op bases, dropping Tile_LinalgOp (6) and Tile_ControlOp (4), and the direct-Tile_Op count used a single-line regex that missed the multi-line `def X\n : Tile_Op<...>` form. Corrected: 82 ops, not 74; 63 declare their own `let arguments` and are the correct denominator; 55 of 63 (87%) carry AnyType -- a worse ratio than the reported 55/74. An explicit, reproducible inclusion rule is now stated. The four Tile_ControlOp ops are not among the 55, and the note records that AnyType on control-flow iter_args would have been legitimate polymorphism per W1.1 step 6. 4. Make the provenance gate verifier-based (5.5). A mandatory !tile.mbarrier operand constrains the shape of a value, never its origin -- a function argument or loop-carried block argument of that type satisfies ODS completely. The draft contradicted itself, since the loop-carried case is the exact shape 5.1 exists to investigate. Gate 1 is now operand shape only; provenance moved to gate 2 as def-use reachability that must resolve across a block-argument edge, failing closed when it cannot. tests/unit/test_audit_docs.py: 11 passed. check_generated_docs.sh: 25 in sync. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Assesses CAKE: Compiler–Agent Co-Design for Frontier Kernel Evolution (arXiv:2608.12629, NVIDIA/CMU) and its FlashInfer PR #4262 artifact against the tree at
f96695f. Addsdocs/audit/compiler/compiler_enhancement.mdin the house assessment style (alongside TILESIGHT/TILERT/SPARDA),referencerole — not a status surface (Decision #26).Docs only. No code paths touched.
Why it matters
CAKE is the first controlled A/B on IR design as agent ergonomics: same model, scaffold, oracle, token budget, GPU, and task — the only variable is the representation the agent edits. That is a question Tessera has answered by assertion since Decision #28.
Statistical audit (§2)
Because n=3 and the paper reports median [min,max], the reported triple is the complete sample, so exact permutation tests apply.
The headline 1.144× vs 0.928× is not significant — the arms overlap; the control's best run (1.151) beats the treatment median (1.144). The design's Bonferroni family-wise floor is 0.15, so no effect size could have made it significant. What is separated is convergence: half the wall-clock, complete separation, 3/3 vs 0/3.
This reshapes the plan. The paper's own curve crosses baseline only at 55M tokens — an order of magnitude above a realistic per-kernel budget here — so an authoring surface must be justified on time-to-plateau and convergence, never on the speedup number.
In-tree findings (§3, measured against
f96695f)AnyTypein their arguments; only 8 use a declaredTile_*type. Sharpest defect:tile.mbarrier.waitcannot consume the!tile.mbarrier_tokenthattile.mbarrier.arrive_expect_txproduces, so the arrive→wait edge is not expressible in the type system — whiletile.try_wait, four lines away in the same file, already has the correct form. Also:tile.pipeline_advanceneed not consume apipeline_state, thoughTile_PipelineStateType's own summary claims SSA def-use ownership (Decision Apple GPU MLA: native f16/bf16 for the absorbed decode kernel #29 stated and violated in one file).WarpSpecLegalityPassis type-blind by construction. It matches on name substrings and attributes and never reads an operand type (Decision Apple GPU MLA: native f16/bf16 for the two secondary decode kernels #30, one level below theEffectLatticeinstance CLAUDE.md already indicts). Tightening ODS buys the verifier nothing on its own — which is why Phase 1 is one phase, not two. Separately, the legality fixtures run under--allow-unregistered-dialectwhile the fixtures exercising the registered vocabulary don't run the legality passes: the registered path and the verified path are disjoint sets.tessera.kernelis a shard decorator;tile_ir.pyis a lowering; barriers and TMEM are synthesized per-arch bytarget_ir.pyfrom atile.matmul.Relationship to W1.1 (§3.5)
Scoping changed once
W1_1_TYPING_DESIGN.mdwas read — steps 1, 2, 4 landed, 3 partial. Nothing here duplicates it. W1.1 owns!tile.fragment/tile.mma/ producer migration / Target IR dialects; this doc ownstile.mbarrier.*,tile.tma.*,tile.tmem.*,tile.pipeline_*.tile.tcgen05.mmais the seam and is deferred until after W1.1 step 5 so it doesn't fork the fragment contract.Phase 1 also inherits W1.1's four method lessons rather than rediscovering them — notably §4.2 (both backends materialized a zero constant for the MMA's C operand, so a lowering fixture passed a silently wrong GEMM). Hence the exit gates require numerical execution on gfx1151, not a lowering fixture.
What's scoped
--allow-unregistered-dialect, 6 exit gates.wave_specialization.pyinstead of leaving it a declaration with no consumer.Also corrects an earlier arbiter proposal:
emit/candidate.py:365doesmin(cands, key=measure), someasureis the terminal selector — wiring a predictor into it leaves regret unbounded. The two-stage form is gated on first instrumenting the rejection fractionp, which CAKE never reports.Deliberately unresolved
§5.1's experiments haven't been run (they're Phase 1's first work item because their outcome could invalidate ODS rows 6–7), and Phase 2 gate 2 — whether one role model verifies both Hopper producer/consumer and CDNA ping-pong without a target branch — is flagged as a genuine open question. §9 records the assessment's own limits, including that the
AnyTypecount is ODS-derived and therefore an upper bound on the hole.Verification
bash scripts/check_generated_docs.sh→ok: 25 generated doc(s) in syncdocs/audit/compiler/README.mdanddocs/audit/README.mdper Decision Apple GPU MLA: paged-cache decoder (production-serving wiring) #26🤖 Generated with Claude Code