Repository navigation
CI: parallelize the recycled-bit frame-pair checks (~2x on the critical path) - #218
Closed
GamingPuzzled wants to merge 1 commit into
Closed
GamingPuzzled wants to merge 1 commit into
GamingPuzzled wants to merge 1 commit into
Conversation
The verify-recycled-bit group is the critical path of the verify workflow (up to ~17 minutes). Its time is two single-threaded loops of exact frame-pair checks. Each check is a pure function of the shared exact frames, so split the moves across forked workers (VERIFY_JOBS, default the CPU count; serial without fork or with one job). Every check is unchanged. Locally with 4 workers: 12m23s -> 5m59s. certificate.json changes only in the pinned sha256 of verify.py. Co-Authored-By: Claude Opus 5.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.
CI speedup only. No mathematical change and no new κ.
Why
verify-recycled-bitis the critical path of theverifyworkflow. On a recent run of #210 it took 1,009 s (3.11), 842 s (3.14) and 725 s (3.13), while every other group finished in under 10 minutes. Profilingresearch/recycled-bit-integration/verify.py --allshows setup takes 3 s and almost all the remaining time is two single-threaded loops:Change
Each check is a pure function of the shared
Exactframes.check_movessplits the moves across forked worker processes and returns every move that fails; the verifier asserts that list is empty.exact.insideandexact.nondegeneratecalls as before. Only which process evaluates them changes.VERIFY_JOBSsets the worker count; the default is the CPU count (4 on GitHub's Linux runners).forkis unavailable, it runs the original serial loop.certificate.jsonchanges only in the pinned SHA-256 ofverify.py, which the verifier hashes into its own certificate:docs/research/community-round7-validation.jsonrecords the old certificate hash as a historical validation record. No script reads it, so it is left as written.Measured locally (Python 3.11, 4 workers)
verify.py --allThe
--all --writerun passed every check and reproduced the certificate apart from the hash line.test_recycled_bit_integration.pypasses (3 tests). On CI this should bring the group down to about 6 minutes, making theresearchgroup andformal (historical)(about 10–11 minutes each) the new critical path, for an estimated ~17 → ~11 minutes wall time.I also tried precomputing each distinct frame basis once across workers instead. It was slower (7 min 14 s), because the basis keys depend on each other and don't split evenly, so the simpler chunking is used.
Possible follow-ups, for the maintainers to decide: caching the project's Lean build when
formal/leanis unchanged (567 s of the 671 sformal (historical)job), and running independentverify-researchtargets in parallel after checking they don't write the same files.Prepared by Joel Pulikkan with Anthropic Claude assistance.
🤖 Generated with Claude Code