mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 23:25:53 +01:00
[PR #1692] tests: GPU-free repro of the FMA denormal-product divergence (TEST-FMA-DENORM-PRODUCT) #1707
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#1707
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/1692
Author: @GTAVIB4GTAVI
Created: 11/25/2026
Status: 🔄 Open
Base:
main← Head:test/fma-nvidia-repro📝 Commits (1)
12f1778tests: GPU-free repro of the FMA denormal-product divergence (TEST-FMA-DENORM-PRODUCT)📊 Changes
2 files changed (+261 additions, -0 deletions)
View changed files
➕
tests/semantic/fixtures/ps_fma_denorm_product.asm(+17 -0)➕
tests/semantic/test_fma_denorm_product.py(+244 -0)📄 Description
Claimed as: TEST-FMA-DENORM-PRODUCT (standalone claim issue #1594: #14 is at GitHub's 2,500-comment cap and rejects new comments)
What and why
whoalin1 reported on #14 (7150696174 (a), 7152027316 (c)) that on an RTX 4070 SUPER
v_fmamk_f32with an exact product of-2^-127and addend0x00ffffffreturns the addend instead of RDNA2's0x00bfffff: the driver flushes the denormal intermediate product. Nothing in the tree pinned that mix (cs_fma_fusedprobes rounding on normal products). This adds a repro that needs no GPU.tests/semantic/fixtures/ps_fma_denorm_product.asm: hand-written,v_fmamk_f32,v_fmaak_f32,v_fma_f32,v_fmac_f32on push-constant operands.tests/semantic/test_fma_denorm_product.py, 12 tests, per--fmamode:glslone GLSL.std.450Fmaper op;khroneOpFmaKHRper op withFMAKHRandSPV_KHR_fma;exactnoOpFmaKHR, everyOpFMul/OpFAdd/OpFSubNoContraction, and its 4 GLSLFmafeed onlyOpSelect;glslandkhrgive the addend, the reported NVIDIA word;exactkeeps the hardware word, also with every f32 denormal result flushed); NaN for every finite operand triple (exactunchanged).Test only: no translator change, no docs change. Whether NVIDIA's
OpFmaKHRkeeps the product has not been measured by anyone; the file only pins thatkhrleaves it to that one op. The sNaN item of 7152027316 is #1554's and is not part of this.Tested
Windows 10 22H2, Python 3.12, SPIRV-Tools from Vulkan SDK 1.4.363.0.
python -m unittest discover -s tests/semantic -p test_fma_denorm_product.py: 12 tests OK, onmain3f81d46ac(after rebase) and onc7e82e26e.python -I scripts/run_semantic_tests.py tests/semantic -j 8, same basec7e82e26e: without the commit 487 files / 6,279 tests / 0 files failed; with it 488 / 6,291 / 0 files failed. Not re-run after the rebase onto3f81d46ac.python -I scripts/check_no_game_data.pyon both files: clean.GPUs tested: n/a (CPU interpreter only; the divergence itself was not measured on this box's RTX 2080 Ti)
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: test only)🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.