mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:05:54 +01:00
[PR #572] [MERGED] rdna2spirv, docs: NVIDIA splits a binary64 Fma only when folding an all-constant one; add cs_div_fmas_f64_rt (FMA64-RT) #617
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#617
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/572
Author: @DeSunShine
Created: 11/24/2026
Status: ✅ Merged
Merged: 11/24/2026
Merged by: @ubiquitarianism
Base:
main← Head:fma64-rt📝 Commits (2)
ce75f14docs/design.md, rdna2spirv: NVIDIA splits a binary64 Fma only when it folds an all-constant one10b0052cs_div_fmas_f64_rt: the run-time-operand twin, and name the measured GPUs📊 Changes
6 files changed (+33 additions, -7 deletions)
View changed files
📝
docs/design.md(+1 -1)📝
runtime/test/shaders/cs_div_fmas_f64.asm(+2 -1)➕
runtime/test/shaders/cs_div_fmas_f64_rt.asm(+18 -0)📝
scripts/run_gpu_tests.py(+8 -3)📝
tests/semantic/test_fma_khr_f64.py(+2 -1)📝
tools/rdna2spirv.py(+2 -1)📄 Description
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
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.