Repository navigation
Conversation
|
Independent Windows Radeon verification, AI-assisted (Codex). Tested the open head
Each draw produced one uniform tuple. The parent returned the nearest-even word in both the opposite-sign reproducer (R) and the cross-dword borrow case (G). Finite-overflow saturation (B) and the return to nearest-even mode (A) matched at both commits.
|
|
Tested 82cb279 on NVIDIA GeForce RTX 3090 (Ampere, subgroup 32..32), driver 610.88 (Vulkan 1.4.341), Windows 11 Pro 26300: pass. The PR's diff applied cleanly to
|
|
Tested 82cb279 on Windows 11 build 26200.9974, NVIDIA RTX 5060 Ti / driver 621.24 (Vulkan 1.4.357,
No game files used. Ran with an AI agent on my machine. |
|
Tested
Tools: llvm-mc 23.1.6 (conda-forge), SPIRV-Tools from the Vulkan SDK. No game files. AI-assisted (Claude Code). |
|
Tested
Translator: 1 shader translated, spirv-val clean — the |
|
Tested
No game files. AI-assisted (Claude Code). |
|
Tested
Not checked: the complete |
|
Tested 82cb279 on Sapphire RX 9070 XT Nitro+ (AMD 26.11.2 LLPC, driverVersion 2.0.416), Windows 11 26200, MSVC, llvm-mc 23.1.6: pass.
AI-assisted run. |
82cb279 to
b24f2ce
Compare
|
Tested
Not tested: AMD/Intel GPUs, Linux/Wine. Tested with AI assistance (Claude); synthetic shaders only, no game data. |
# Conflicts: # docs/design.md
# Conflicts: # docs/design.md
b24f2ce to
2ff231a
Compare
# Conflicts: # docs/design.md
Claimed in the coordination issue as: #2891 (comment)
What and why
Fixes an intermediate
TwoSumoverflow inGen.f64_add_mode(tools/rdna2spirv.py) forv_add_f64underMODE.FP_ROUND[3:2] = 3(toward zero), reported by @Jolymmiles in #2891 (comment).When summing opposite-sign finite operands near
±DBL_MAXwith|x| < |y|(e.g.0x7fdd9bb47daa1333 + 0xffefffffffffffff), the unorderedTwoSumfirst subtractionbb = r - xreconstructs ~ywith an intermediate rounding across the overflow boundary and produces±inf, making the rounding residuale = NaN. OrderedOpFOrdGreaterThan/OpFOrdLessThanchecks onethen evaluate false and omit the-1 ULPtoward-zero step (0xffe13225c12af666instead of exact RTZ0xffe13225c12af665).tools/rdna2spirv.py(Gen.f64_add_mode): extracts the high/low 32-bit magnitude words (axhi = xhi & 0x7FFFFFFF,ayhi = yhi & 0x7FFFFFFF), swaps(x, y)to(a, b)with|a| >= |b|via integer comparison +OpSelect %double, and computes magnitude-orderedFastTwoSum(bb = r - a,e = b - bb, bothNoContraction). Wheneverris finite and|a| >= |b|,|r - a| <= max(|r|, |a|) <= DBL_MAX, so intermediate subtraction never overflows, while cutting float64 arithmetic ops from 5 to 2.tests/test_mode_round.py: adds RTZ/RNE regression cases for0x7fdd9bb47daa1333 + 0xffefffffffffffffin both operand orders, a cross-dword 64-bit borrow case near+DBL_MAX(0xffcffffffffffffe + 0x7fefffffffffffff), negative overflow saturation, half-ulp overflow saturation,±inf/ exact cancellation /-0.0/NaNpreservation,NoContractiondecoration checks on bothOpFSub %doubleinstructions, and aFractionoracle sweep including subnormals and tie cases.runtime/test/shaders/ps_f64_round.asm,runtime/test/shaders/check.py,scripts/run_gpu_tests.py: adds a pixel shader fixture testing all four cases above (mrt0:0xc12af665, 0x3fe7ffff, 0xbfffffff, 0xc12af666) withVK_KHR/shaderFloat64.docs/design.md: updates the existingKnown approximationsrow forv_add_f64FastTwoSum+ RTX 5060 Ti verification.AI-assisted.
Tested
621.01,shaderFloat64,LLVM_MC23.1.6,SPIRV-Tools2026.4):python -I scripts/run_gpu_tests.py --build runtime/build --filter ps_f64:2 shaders: 2 translated, 2 pass spirv-val;ps_f64_mods(4096/4096 pixels exact),ps_f64_round(4096/4096 pixels exact),2/2 passed.LLVM_MC23.1.6,SPIRV-Tools2026.4spirv-val):pytest tests/test_mode_round.py:74 passed in 0.82simport pytesttranslator test files (pytest ... -q):1253 passed, 17 skipped in 69.11spython -I -m unittest discover -s tests/semantic:Ran 4142 tests in 631.532s — OKf64unittest checks (compileall,test_docs_design_rows.py,test_docs_links.py,test_docs_list_items.py,test_docs_repo_paths.py,test_text_write_line_endings.py,test_shader_checks.py,test_run_gpu_tests.py,test_f64_conversion.py,test_f64_output_modifiers.py,test_f64_transcendentals.py,test_mode_round_probe.py): all passed.Checklist
docs/design.md, with how it was confirmed.