f64_diff: v_div_fixup_f64 reference follows the gfx1036 measurement (F64-DIFF-DIV-FIXUP-REF) #1005
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!1005
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1005/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@thesubtleties on GitHub · 2026-11-24 16:44 UTC · original
thesubtleties:f64-diff-fixup-ref→main· +25 −12 · 2 files · 1 commits · merged 2026-11-25 02:36 UTCClaimed in the coordination issue as: F64-DIFF-DIV-FIXUP-REF
What and why
The
v_div_fixup_f64reference intools/f64_diff.pystill had the old rule: infinity whenexp(S2) - exp(S1) >= 1024, underflow from-1075, and quieted NaN sources. The gfx1036 measurement recorded indocs/design.md(v_div_fixup row, by timelery) says: no overflow cutoff, underflow at<= -1076, NaN sources pass unquieted. The translator already follows it, so the fuzzer reported false mismatches. Only the fuzzer and its tests change. The same design row still states the old rule earlier in its text; I left that for a docs change.Tested
tools/f64_diff.py --programs 300: seeds 770707 and 3 go from 1 mismatch to 0; seeds 1, 2, 4, 5 stay at 0.--self-testpasses.tests/test_f64_diff.py: 32 passed, with five table rows moved to the measured values and a new reference-against-translator check at the cutoffs.GPUs tested: n/a
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md: n/a, no translator change.@thesubtleties on GitHub · 2026-11-24 18:54 UTC · original
One more data point; no code change. On main
3aa97542,tools/f64_diff.py --programs 2000 --seed 551124reports 1 mismatch, with the minimal programwhere the reference expects infinity (
00000000 7ff00000) and the translator gives zero. On this branch (3edc26ba) the same command reports 0 mismatches (1848 match, the rest are the interpreter's skips). CPU only; I did not measure the hardware myself. AI-assisted (Claude Code)@fin-github on GitHub · 2026-11-24 21:32 UTC · original · reviewed
python -I tests/test_f64_diff.pyon the PR: 32 tests OK.tools/f64_diff.py --self-testpasses, and--programs 300 --seed 770707gives 302 match, 0 mismatch.main(4a50cafc7): 9 failures, all in the changed rows and the new cutoff check, so thetests catch the old reference.
v_div_fixuprow indocs/design.md(line 466): f64underflow at
e2 - e1 <= -1076, no overflow cutoff, sNaN passed unchanged underIEEE=0.As you say, the same row also states the old rule (
<= -1075,>= 1024, NaN quieted) earlier on, so it contradictsitself. If nobody has picked that up, a
finding:in #14 would make sure the docs fix gets done. Looks good to me.Tested on Windows 11 Pro 26200, CPython 3.14.4, applied on main
4a50cafc7. No GPU or game files used. AI-assisted (Claude Code).@thesubtleties on GitHub · 2026-11-24 23:50 UTC · original
Native RDNA2 check of the case in my comment above (gfx1036,
tools/hw_oracle, IEEE off, f64 denormals on):v_div_fixup_f64 v[8:9], -0.0, 64, v[12:13]with v12 = 0 and v13 =0x55407155gives00000000 00000000, as this branch's reference says.My first post said I hadn't measured hardware; this one case now is. The other cutoffs aren't. AI-assisted (Claude Code)
@QemmHD on GitHub · 2026-11-25 02:36 UTC · original
Merging.
Why merged: The f64_diff reference for v_div_fixup follows the gfx1036 hardware measurement in the one case where it differed.
Why it's good: Own tests: 32 passed.
Tested on Windows 11 / RTX 4070 SUPER: merged alone onto main
b4b7756e8. With it in, the repo-consistency set (cmake/translator-deps, shader_stage_resume, runtime_paths, docs, make_game, no-game-data, run_semantic_tests, ctest_registration) gives 578 passed / 5 skipped / 0 failed, and check_no_game_data on the changed files is clean. git merge-tree against current main3ff2a2adc(after #984): no conflicts. Security read of the three-dot diff: no binaries, game data, downloads, network calls or CI changes.AI-assisted (Claude Code, Claude Opus 5.5).