Repository navigation
Conversation
|
I replayed the original finding’s 41
All three original NVIDIA differences are accounted for on Ampere, with no new mismatches in this set. Synthetic inputs only. AI-assisted. |
|
A nonzero subnormal multiplied by positive infinity still produces NaN on both Windows adapters at I used a full-screen triangle and this pixel shader listing. The harness supplies the operands at draw time. v_mov_b32 v1, s0
v_mov_b32 v2, s1
v_mov_b32 v3, s2
v_cmp_eq_u32_e32 vcc_lo, 0, 1
v_div_fmas_f32 v0, v1, v2, v3
exp mrt0 v0, v1, v2, v3 done vm
s_endpgmUse the synthetic DXBC stub and
Expected: The finite fix passes on both adapters. With operands AI-assisted. |
kacper-serewis
left a comment
There was a problem hiding this comment.
Independent synthetic GPU comparison on RTX 5070, Windows driver 616.56: parent 98fa503 matched 36/56 expected words; 7f28556 matched 56/56. Tested 14 triples, both multiplicand orders and both VCC states. Both modules passed Vulkan 1.2 validation. Includes minimum and largest subnormals, cancellation, normal control and scaling threshold neighbors. Equal zero outputs at the rescale cutoff do not distinguish internal branches. Default f32 translation only. AI-assisted.
|
Tested 7f28556: |
|
The full Windows semantic run finished at I also ran the scaled-addend check from #4835 with runtime-loaded operands. On RTX 5070 / 610.88, AI-assisted. |
|
Reviewed 7f28556 merged onto main de67135 on Linux (CPU only): pass What I ran: tests/semantic/test_alu_div_fmas.py 11 passed, 30 subtests on the merged tree (main version of that file: 9 failed/subfailed when the PR's tests are run against main's rdna2spirv.py, so the two new tests are red before the change); Neighbours run on the merged tree (python3.13, pytest 9.2.0, RunPod Linux): tests/test_ci_registration.py 11 passed (4 subtests), tests/test_docs_links.py 6 passed, tests/test_text_encoding.py 2 passed, tests/test_docs_list_items.py 4 passed. Attempts to break it:
Findings (none blocking):
The rescale arithmetic itself is right: for the smaller operand m2^-149, ConvertUToF(m)2^-126 is exactly m2^-1492^23, and the larger operand minus 23<<23 in the exponent stays normal at >= 2^-103 (exponent field 24 -> 1). The product is exactly preserved. No game files. |
|
I reproduced your runtime-loaded result on the RTX 3080 Ti (CachyOS, NVIDIA 620.73.04). I used the synthetic fragment fixture from
The table held on both AI-assisted. |
|
Tested 7f28556 (merge base 98fa503) on AMD Radeon 780M (RADV PHOENIX, Mesa 26.2.6) and NVIDIA GeForce RTX 4070 Laptop (620.70.06), CachyOS Linux 7.3.4: pass. There is no committed 40 cases: the PR's four subnormal sets,
I did not re-measure the gfx1036 or RTX 5070 figures in the description. Synthetic inputs only, no game data. AI-assisted. |
|
@shdann Thanks for the infinity case. I reproduced the NaN on RTX 5070 / 610.88 and updated the PR in The GPU returned the expected signed infinity for both operand orders, all four sign combinations and both VCC states. Zero × infinity and the NaN-partner controls still return NaN. All 20 runtime-loaded infinity and control cases, both immediate infinity cases, and the original 21 probes passed. The new CPU regression fails 16 subcases at @Kev-Ball I also confirmed the S2 observation on this Windows driver. The runtime-loaded Synthetic inputs only. AI-assisted. |
|
Tested I used the smallest positive subnormal (
Both revisions passed SPIR-V validation. I compared infinities bit-for-bit and checked NaNs by exponent and nonzero mantissa. The new head fixes all 16 incorrect infinity results and preserves the invalid-sum and NaN-addend cases. Synthetic inputs only. AI-assisted. |
|
Tested a855271 merged with main 3faac55 on Linux (WSL), Python 3.12.16: pass tests/semantic/test_alu_div_fmas.py: 12/12 pass (semantic only, no GPU). tests/test_docs_*.py: all 10 files pass. |
|
Game-copy check of Setup. Merged onto
AI-assisted (Claude Code). |
|
Verified against main 3faac55: merges cleanly; compileall passes, tests/semantic/test_alu_div_fmas.py (12, re-run — flushed-input and subnormal-times-infinity cases in both operand orders and VCC states) and the translator-use guard pass under python -I, and test_rdna2spirv_decode is 24/24. test_rdna2_decode shows one failure, identical on current main (the known #4421 red, alternative fix pending in #4867) — not attributable here. The scaling lowers are product-exact by raw-bit construction with sane gating, and the new tests mock the interpreter-side fma to emulate a flushing driver — CPU-only and sound. The RTX 5070 confirmation is a hardware claim this box cannot check. Checks pending. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run). |
|
Tested
|
Coordination claim. GPU finding.
What changed
On
98fa503f, the RTX 5070 / 610.88 returned0x00000000when either input ofv_div_fmas_f32's product was the reported subnormal. The measured gfx1036 result is0x26800000at VCC clear. The RTX 5070 reportsshaderDenormPreserveFloat32 = false.When the smaller multiplicand is a nonzero subnormal and the larger is finite with magnitude at least
2^-103, scale them by2^23and2^-23before the existing FMA. The factors stay normal and their exact product stays the same. The subnormal factor is rebuilt from its integer mantissa and sign. With an infinite partner, scale only the nonzero subnormal and keep the signed infinity. This avoids a zero-times-infinity NaN on input-flushing drivers. The existing addend, VCC scaling and output handling still apply.Verification
Native Windows 11 26200, RTX 5070, driver 610.88. The original case and its swapped order produced
0x26800000after the change. All 21 finite synthetic Vulkan probes matched, including both VCC states, a signed subnormal, the smallest subnormal, cancellation, the exponent boundary, andabs/negmodifiers. The 20 runtime-loaded infinity and control probes and the two immediate infinity cases also passed.All 12
test_alu_div_fmas.pytests pass with Khronos SPIRV-Tools v2026.4. The two new tests against cleanmainreport nine failing subcases with the simulated input flush and the exponent check. The separate infinity test fails 16 subcases on the previous head.The translator-use guard, design-table tests,
compileall, andgit diff --checkpass. The link checker reportsassets/logo.pngandthird_party/bcpack-rs/README.mdmissing on both clean98fa503fand this checkout.@465d6a0eac independently compared this head with
98fa503fin native mode on their 1.0.2.1 shader corpus. All 26,503 modules were byte-identical and passedspirv-val. The count ofv_div_fmas_f32orv_div_fmas_f64instructions in those listings was zero. The observed correction covers standalone translator use and synthetic regression cases. Corpus checkLocal merge with current
mainde671352is clean. The three touched paths are byte-identical between the tested base and that revision.Synthetic inputs only. AI-assisted.