rdna2spirv, docs: NVIDIA splits a binary64 Fma only when folding an all-constant one; add cs_div_fmas_f64_rt (FMA64-RT) #572
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!572
Loading…
Reference in a new issue
No description provided.
Delete branch "fma64-rt"
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?
Pull request successfully merged and closed
Claim: FMA64-RT (issue #14). Carries on old upstream #8750, which was closed unmerged shortly before the original repository went private.
What changes
The binary64
Fmanote added with the f64 FMA fix said NVIDIA's driver rounds GLSLFmaon doubles twice. That is too broad. Turing, Ampere and Ada split only an all-constantFmathat the driver folds while compiling the pipeline. The same operands read at run time are fused. Blackwell fuses both.tools/rdna2spirv.py,docs/design.md,runtime/test/shaders/cs_div_fmas_f64.asm,scripts/run_gpu_tests.pyandtests/semantic/test_fma_khr_f64.pynow says this.runtime/test/shaders/cs_div_fmas_f64_rt.asm: the samefma(a, a, c)cancellation probe (a = 1 + 2^-30, c = -(1 + 2^-29)) with its operands in s4..s7, seeded throughVKC_SGPRS. The runner handles both fixtures in one branch.Tested
RTX 4090, driver 621.24, Windows 11, default
--fma glsl:The second result is fused (2^-60). The run-time result was also measured fused on an RTX 3070 (621.01) and an RTX 5060 Laptop, and on an RTX 4070 by the author of old #4536.
tests/semantic/test_fma_khr_f64.pypasses 5/5.Synthetic fixtures only. No game files.
🤖 Generated with Claude Code
Independent verification — Turing and Blackwell
Tested exact PR head:
10b0052e570cc6786681bbcf36b61d85b20fc5a8This addresses the missing Turing runtime-operand
measurement noted in the review.
Test environment
Results
Exact output words:
RTX 2060 SUPER (both modes):
RTX 5070 (both modes):
All 8 fixture executions passed. Shader translation
and spirv-val passed for both fixtures in every run.
The generated SPIR-V and index.json were also checked:
Conclusion
The RTX 2060 SUPER confirms the previously missing
Turing data point: the constant-operand probe splits,
while the runtime-operand probe produces the fused
result (2^-60).
The RTX 5070 produces the fused result for both probes.
Results are identical between native and emulated
Wave64 on each tested GPU.
These measurements support the PR's description for
the tested NVIDIA GPUs and driver version. They do
not establish identical behavior across all drivers.
Synthetic fixtures only. No game files used.
AI-assisted test automation and result analysis.