rational M6: C ABI, matrix notebook, icount ratchet; family 0.5.0 - #61
Merged
Merged
Conversation
The C ABI (rational/capi, libtap_sr_rational_capi) takes one of the 28 named within-family chains of the coverage matrix as a stable TAP_SR_RATIONAL_* constant (never a rate, D12), or one stage of the vocabulary at a stated design divisor for chains through bridge (R16). It reports exact accounting, latency and MACs per output as rationals, per-stage design lengths and the bit-packed family version. The library builds with hidden visibility, so it exports exactly the sixteen tap_sr_rational_* functions. CApi.* pins every chain constant bit for bit against its basic_chain. The ctypes binding and notebooks/matrix.ipynb, executed through the C ABIs (bridge's for the cross rows), reproduce all 728 row x profile pins exactly. The tone battery passes 182/182 rows at economy and at transparent. The icount ratchet adds twelve workloads, marker RATIONAL_ICOUNT_DONE, with baselines on M33, M55 and Hexagon gated two-sided at +/-3% in CI. The README carries the generated table. Finding: on the M55, Q15 is not yet faster than float. This is recorded as a lever after M6. Family version 0.5.0: all three umbrella headers, the root project(), the version tests and the docs (R11, D13). Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_015VR1VC4SDGxHZQQsQvPBaA
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.
What this changes
This is M6 of
rational/PLAN.md, the last milestone in the plan.rational/capi/, built aslibtap_sr_rational_capiwith-DTAP_SR_BUILD_CAPI=ONor standalone.tap_sr_rational_create(chain, profile, channels)takes one of the 28 named within-family chains as a stableTAP_SR_RATIONAL_*constant. It never takes a rate (D12).tap_sr_rational_create_stage(L, M, profile, divisor_num, divisor_den, channels)builds one stage of the vocabulary at a stated design divisor. That is the piece a caller uses to compose a chain throughbridge(R16).nm -Dlists exactly the sixteentap_sr_rational_*functions.rational/tests/test_capi.cpp:basic_chainbit for bit, with the same latency, MACs, accounting, flush and reset.create_stageequals the stage built at the same divisor.CApi.VersionIsBitPackedreturns 0x000500.rational/notebooks/tap_sr_rational_py.pyis the ctypes binding.matrix.ipynbis committed executed and goes through the C ABIs, using bridge's C ABI for the cross rows.rational/bench/icount/adds twelve workloads with the guest markerRATIONAL_ICOUNT_DONE. Baselines are recorded inrational/bench/baselines.jsonfor M33, M55 and Hexagon.scripts/icount.pyandscripts/update_icount_docs.pyaccept--engine rational.project(),version_macros.cpp, each engine's version tests, the book's C ABI page, the READMEs andCLAUDE.md.rational/PLAN.mdgoes to v0.9 with the M6 row marked done, the measured icount table and one finding. The familyPLAN.md"Next — rational" entry, bothCLAUDE.mdfiles and the READMEs are updated to match.Why
M6's acceptance criteria are: the notebook measures the shipping C++ and reproduces the pinned matrix numbers, the ratchet is green on three targets, the
nm -Dsymbol set is recorded, and the family is at 0.5.0.Verification
--exact; every count matched. Running this environment against bridge's committed baselines reproduces them to the instruction, so it matches CI.-Werrorfor all three engines and the C ABI ON: 285/285 tests pass.-Werror: the rational label passes 112/112. On the first run after reconfiguring,ChartersFailToCompileWithTheMessagefailed once. It passed on its own and then again in a full parallel run.Notes for the reviewer
#defineconstants, not an enum. The house.clang-tidyrequires lower-case enum constants, and a C ABI wants upper-case prefixed names. Bridge's and async's C headers have no enum to follow.v0.5.0tag.🤖 Generated with Claude Code
https://claude.ai/code/session_015VR1VC4SDGxHZQQsQvPBaA
Generated by Claude Code