Repository navigation
X30b: 64-byte aligned plan tables (compact twiddles and three-pass 4096 rejected) - #17
Merged
Merged
Conversation
…4096 in three passes) The decision rule is written before any arm is built or timed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every plan table (the chain's twiddles, the grid's, Bluestein's) is an aligned_vector, whose allocator starts each buffer on a cache line. std::vector put them 16 bytes into a line, so half of a per-lane pass's 32-byte twiddle loads crossed one. No instruction or bit changes. Built: Homebrew Clang 23, Release, -Werror, neon_fcma/neon/scalar; all 1787 tests pass on the Mac. x86 runs in CI and on DMOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…large (X30b arm C) The avx2 and avx512 vocabularies now hold a twiddle register pair as (wr, wr) and (wi, wi) and multiply through FMADDSUB and FMSUBADD (X30's arithmetic, bit-identical to the (-wi, wi) form). Tables may be stored pre-arranged (4 reals per twiddle, plain loads that fold into the multiplies) or compact ((wr, wi), 2 reals: double r and i duplicated from one load, float by VMOVSLDUP from p and p + 1, broadcasts by two scalar broadcasts). The grouped first pass and the twiddled lane pass get compact instantiations (grouped_compact, lane_compact; null on targets without the storage), and the chain builder takes them for a pass whose pre-arranged table would exceed machine_profile::twiddle_compact_bytes, half the L1 data cache by default. fbench sets the threshold with TWIDDLE_COMPACT_BYTES. Tests: every codelet in every position with every table compact against the reference, and plans with every table compact against none bit for bit (both skip where no target has the storage). Built: Homebrew Clang 23, Release, -Werror; all 1789 tests pass on the Mac (neon_fcma, neon, scalar; the new tests skip). x86 units cross-compiled with Clang 23 (avx2, avx512, narrow, both FFTN_MASKED_TAILS states). x86 tests run in CI and on DMOG. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… by default (X30b arm C2) One size limit for both kinds of table missed what the EPYC counters showed: a compact per-lane table (the grouped first pass) cost 1.06-1.13 of the cycles at 2048 and 4096 points in double, a compact broadcast table (lane passes) costs no extra operation and gave the best cycles at 1024 (0.92 of main). The machine profile now has compact_grouped_bytes (default never) and compact_shared_bytes (default 0, every lane pass), fbench's COMPACT_GROUPED_BYTES and COMPACT_SHARED_BYTES. The experiment file records the screen and amends the arms before any timing run finished. Built: Homebrew Clang 23 Release -Werror (Mac, 77 schedule/topology/pass tests pass), x86 units cross-compiled with Clang 23. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cted) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lane passes' expected names ended with the closing parenthesis, which a compact pass's name has after its note. Found by the new test on DMOG (GCC 16, avx2): every other test passed there in both FFTN_MASKED_TAILS states. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: the machine profile's new fields (both kept) and PLAN's index rows. X29's two new grid tables bind as aligned_vector (auto&). Mac Clang 23 Release: all 1806 tests pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflicts: plan_core's chain set-up (pair leaves and compact limits, both kept) and entries.inl's helper templates (both kept). Mac Clang 23 Release: all 1808 tests pass; x86 units (avx2, avx512, pairs, narrow) cross-compile. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Arm C (88cd9c3, ead29f2, 2b38263) failed X30b's rule (b): its best form (broadcast tables compact, per-lane tables above 16 KiB) won the EPYC's x30 cases (double 0.986, float 0.962 of arm L) and its tracking tier (0.989), but c2c float 256 x 64 stayed 1.038-1.042 of L on the re-run (run 20261116-101921-03d8), as did the variant with no compact table, so the FMADDSUB arithmetic or the larger library rather than the storage; on the Xeon the broadcast form gained nothing in double on avx512 (1.001) and c2c 16 ran 1.050-1.054 of L in the tracking tier. The vocabularies, passes and chain return to main's; the aligned plan tables (arm L) stay. Built: Homebrew Clang 23 Release -Werror, all 1806 tests pass on the Mac; x86 units cross-compile with Clang 23. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…three-pass 4096 rejected Results, re-runs and Slurm jobs in the experiment file; PLAN index and lead 3, DESIGN decision log, LESSONS 3.10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jtravs
marked this pull request as ready for review
November 16, 2026 11:38
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.
Experiment X30b (PLAN lead 3, after X30): the x86 chains at 1024–4096 points. Verdicts in
dev/experiments/X30b-twiddle-tables.md.platform/aligned_allocator.hpp,aligned_vector); bits unchanged. x30 double L ÷ main: EPYC 0.986, Xeonavx5120.989,avx20.996, Mac 0.999; float 0.971 / 0.981 / 0.999 / 1.000; tracking 0.994 / 0.994 / 0.990 / 1.001; no case past the limit (Xeonavx512c2r 2²⁰ 1.035 → 0.983 on re-run).avx512.avx2double 4096 sequences 1.30–1.88 of 8 × 8 × 8 × 8.The branch's net change against main is L plus the experiment record (PLAN, DESIGN decision log, LESSONS 3.10). Do not merge before the lead's review.
🤖 Generated with Claude Code