Repository navigation
[VFDLIBM-30] Record the EPYC 7763 re-run of cosh and atan2 - #142
Merged
Merged
Conversation
added 2 commits
November 23, 2026 00:09
Generated-by: Claude Code (Opus 5.5)
…ete the code lists Generated-by: Claude Code (Opus 5.5)
MaxGekk
added a commit
that referenced
this pull request
Nov 23, 2026
…he code differs only in comments (#145) ### What changes were proposed in this pull request? Part of #30. `bench/record.py write --run A --run B` and `check` with the same runs now join a later run at another commit than the first run's, which they refused since #48, when the code under the file's benchmark is the same at both commits but for comments and whitespace; host, CPU, JMH options and vector settings must still match exactly, and at different commits the JDK and the header's Command too. The code under a benchmark class is a closure taken by git at both commits: the class's file in `src/jmh/java`, then every file of `src/main/java`, `src/jmh/java` and `src/test/java` that declares at its top level a type whose name is a word of that code (comments dropped, literals emptied), to a fixed point. The two closures must be the same set of files, each equal once comments go and whitespace goes where no two tokens could join across it, literals kept verbatim. `pom.xml` must be equal as XML (comments and whitespace aside) but for the project's own `<version>`, `project.build.outputTimestamp`, the executions whose id starts with `fault-` and the profile `release`; `src/main/resources`, `src/jmh/resources`, any non-Java file under `src/main/java` or `src/jmh/java` and any `module-info.java` or `package-info.java` there must be equal too, and `src/test/resources` when a test class is in the closure. The comment stripper handles `//` comments (ended at CR or LF) and `/* */` comments, string and char literals and text blocks (a comment marker inside one is the literal's), and refuses a `\u` escape that decodes to `/`, `*`, a quote, a backslash, a brace or a line end rather than guess; an unclosed comment or literal is refused too, but only when its file is in the closure. A whole-tree rule (all of `src/main/java` comment-equal) was not enough: between 03ea082 and bc7e91b, Acos, Asin, Atan and Atan2 were added and `VFdlibm.java` changed in code, so it would refuse cosh, whose benchmarks never load them. When the commits differ, `write` puts a machine-made `# Code:` line under the later run's `# Run N of M` line naming both commits, the rule and the files compared; `check` recomputes it from git and fails if a word differs or it is missing. A commit the clone lacks is fetched from origin, and if it cannot be, the runs are refused. When the code under a class differs, `write` leaves that run out of that class's file with a note naming the files (the run is a first run of new code, a file of its own) and still joins it to the files of the other classes, and `check` refuses a file that holds such a run; a run that so joins no file refuses the whole `write`, as a run sharing no class does. AGENTS.md's sentence on re-runs now says so. git runs with `GIT_TERMINAL_PROMPT=0` and no stdin, and the fetch of a missing commit times out after 120 seconds, failing with the clone's message. The Javadoc and docs that still call these EPYC 7763 files one run waiting for a re-run (`Atan2Benchmark.java`, `Atan2.java`, `CoshBenchmark.java`, `Cosh.java`, `CoshKindsBench.java`, `PLAN.md`, `SKILLS.md`), stale since #142, are left for the requote pull request. The EPYC 7763 re-run (run 45071280263, main at bc7e91b) is folded back as run 2 into `cosh-epyc7763-2026-11-21.txt`, `cosh-kinds-epyc7763-2026-11-21.txt` (first run 44929622224, 03ea082) and `atan2-epyc7763-2026-11-22.txt` (first run 45049628267, d3bb335), and the three `*-rerun-epyc7763-2026-11-22.txt` files from #142 are deleted; nothing else referred to them. Each file's title, provenance and reading now cover both runs: the readings carry #142's figures over, each recomputed from the two tables, and add run 2's figures to the points that only run 1 had (minimums, scalar ratios, kind costs, mixed over common, same-width spreads). No comparison of the arms reads otherwise than in #142: cosh's finish arm is lower on common data at all three widths, no direction on mixed; CoshKindsBench reads no direction at 3.5% and 17% small lanes; atan2's arms have no direction on this host. ### Why are the changes needed? AGENTS.md asks that a run and its re-run on one host go in one file, and #142 had to write the re-run as separate files only because the two runs timed different commits whose benchmarked code differed in comments alone; the owner decided on 23 November that such runs join one file. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? `bench/record.py --selftest` (run by ci.yml) passes; it builds a scratch git clone and covers comments of both kinds, `a/**/b`, whitespace reflow, `- -x` against `--x`, comment markers inside a string, a char and a text block, escaped quotes, the `\u` refusals and an escaped backslash, CR-ended line comments, unclosed comments and literals, top-level against nested types, pom.xml's ignored and kept parts, a comment-only change joining, a code change and a new file in the closure refusing with their names, a change outside the closure ignored, an unreadable file outside the closure ignored and inside it refused, a new `module-info.java` refused, the `# Code:` line tampered or cut, a re-run of other code left out of one class's file and joined to another's, a middle run lacking the class (the note numbered by its place in the file), a re-run that joins no file refused, a fetch from an origin that cannot answer, a commit the clone lacks, and another JDK or command at another commit. A mutation pass on the new code (string literals not recognised, release profile kept, closure not followed, note not compared, JDK not compared, `\u` check off) fails the self-test each time. `bench/record.py check` passes on the three rewritten files with both runs (`--run 44929622224 --run 45071280263` for the cosh files, `--run 45049628267 --run 45071280263` for atan2), still passes on `log1p-epyc7763-2026-11-20.txt`, a same-commit pair of runs, and fails on a rewritten file given only its first run. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Code (Opus 5.5)
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 changes were proposed in this pull request?
Part of #30.
Adds three results files from the EPYC 7763 re-run, run 45071280263 (main at bc7e91b, 22 November), written by
bench/record.py writeand checked withbench/record.py check --run 45071280263:cosh-rerun-epyc7763-2026-11-22.txt,cosh-kinds-rerun-epyc7763-2026-11-22.txtandatan2-rerun-epyc7763-2026-11-22.txt.They are files of their own, not second runs in
cosh-epyc7763-2026-11-21.txt,cosh-kinds-epyc7763-2026-11-21.txtandatan2-epyc7763-2026-11-22.txt, becausebench/record.pyjoins runs in one file only at one commit and refuses these (the first runs are at 03ea082 and d3bb335). Each header says so and shows the code is the same: the classes the rows run and the benchmarks differ between the commits in comments only, and pom.xml only in its version, timestamp, fault executions and the release profile's gpg plugin.Each reading compares its minimums row by row with the first run's file and applies the re-run rule: a direction needs both runs outside 1.3x and agreeing, and on this host the 256-bit, preferred and
SPECIES_MAXrows are one width, so all three must.CoshBenchmark): on common data both runs read slice over finish outside 1.3x at all three, the finish arm lower (1.33 to 1.37, all under 1.40); on mixed data no direction (a run reads 1.29 at two of the three).CoshKindsBench): with no small lane the finish arm is lower outside 1.3x in both runs; at 3.5% and 17% small lanes, Varka's and Spark's shares, both runs are inside 1.3x: no direction. Which armVFdlibm.coshkeeps stays issue Run the benchmarks owed on the hosts and decide each function's arm #30's (cosh is its named exception).SPECIES_MAXdo not. The blended rows moved up to 12% between runs, the guarded rows within 1% but one row.No other file changes; the three first-run files are untouched.
Why are the changes needed?
The EPYC 7763's cosh and atan2 readings had ratios near 1.3x that, by CLAUDE.md and issue #30, wait for a re-run before a direction is written down.
Does this PR introduce any user-facing change?
No
How was this patch tested?
bench/record.py check <file> --run 45071280263passes for each of the three files. Every figure in the readings was checked against the file's own tables and the first run's file, minimums rounded from the raw Result blocks.For a follow-up, the documents that cite the EPYC 7763 as one run or wait for its re-run, and would be requoted from these files:
Cosh.java(class Javadoc),CoshBenchmark.java,CoshKindsBench.java,SKILLS.mdcosh entry,PLAN.mdsection 5 and section 1's cosh sentence,README.md"Rare paths".Atan2.java,Atan2Benchmark.java,SKILLS.mdatan2 entry,PLAN.mdsection 5,README.md"Rare paths" ("until a re-run of each host").Review nits left:
bench/record.pyenforces; the owner may add one or teach record.py to join comment-only diffs.Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude Code (Opus 5.5)