Skip to content

experiment: retract the traversal attribution's headline, and say what it can show - #99

Merged
shinaoka merged 1 commit into
mainfrom
exp/traversal-fix
Oct 10, 2026
Merged

shinaoka merged 1 commit into
mainfrom
exp/traversal-fix

Conversation

@shinaoka

Copy link
Copy Markdown
Member

The first version of src/bin/traversal.rs (merged in #98) rebuilt the case's operand layouts from the campaign row's axis record. Two m axes have the same extent, so my reconstruction swapped them and measured a different contraction — its plan folded m into two axes and ran in 11.6 ms, and the README published that as "a plan-level traversal decision is worth 3.3×". That is wrong and is retracted here.

What the corrected binary shows

Built from the harness's own la/lb/lc (read from the sized case, not reconstructed), the plan is identical to the campaign's on every recorded field — family avx512.f64.real.24x8, mr/nr 24/8, blocking 264/1536/256, StaticGrid{pm:0,pn:0}, align_c_lines: false, and the same three m axes at A-strides (92160, 48, 1) with the contracted axis at 1920. So there is no plan difference to attribute.

variant ms GFLOP/s
corpus-a-corpus-d 52.12 6.79
corpus-a-compact-d 51.77 6.84
compact-a-corpus-d 50.38 7.02
compact-a-compact-d 50.25 7.04
  • No layout swap moves the case (all four within 4%), so the "interleaved panel" story the binary was written to test does not hold for it either.
  • The binary is 1.37× slower than the campaign on the same case (52.1 vs 38.1 ms) with the same plan, dimensions and layouts, so the remaining difference is in the execution path — this binary calls execute_slices, which builds views per call, while the harness calls execute_raw on raw pointers.

Consequences

The honest state is that this binary cannot attribute the case's cost yet, and the phase-share measurement it was written for has to be made on the harness's own path. The README and the binary's header now say that, and the residual column is marked as meaningless (it compares differently permuted buffers).

This also removes the basis of the "change the planner's axis ordering, it is worth 3.3×" proposal that was made on the strength of #98. The candidates that remain measured-and-excluded are unchanged: micro-kernel, blocking model, blocking values, orientation, partition, write-back mode, output alignment, row-block shape.

…t it can show

The first version of `src/bin/traversal.rs` rebuilt the case's operand layouts from the
plan's *axis record* and swapped two axes of equal extent, which measured a different
contraction: its plan folded the `m` group into two axes and ran in 11.6 ms, and the README
published that as "a plan-level decision is worth 3.3x". Built from the harness's own
`la`/`lb`/`lc`, the plan is identical to the campaign's on every recorded field (family,
mr/nr, blocking, partition, alignment, and the same three `m` axes at A-strides
(92160, 48, 1) with the contracted axis at 1920), so there is no plan difference to
attribute: the headline is retracted in the README and in the binary's own header.

What the corrected run shows, all four variants within 4% of each other (50.4-52.1 ms):
the case's cost is not a property of the operand layouts either, so the "interleaved panel"
story this binary was written to test does not hold for it. And it is 1.37x slower than the
campaign's own run of the same case with the same plan (38.1 ms), which means the remaining
difference is in the *execution path* - this binary calls `execute_slices`, which builds
views per call, while the harness calls `execute_raw` on raw pointers - not in the plan and
not in the layout.

The honest state is therefore that this binary cannot attribute the case's cost yet, and the
phase-share measurement it was written for has to be made on the harness's own path. Both
files say so; the `residual` column is also marked as meaningless (it compares permuted
buffers).
@shinaoka
shinaoka merged commit 70764b8 into main Oct 10, 2026
13 checks passed
@shinaoka
shinaoka deleted the exp/traversal-fix branch October 10, 2026 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant