Tests: legacy FMA and float min/max NaN semantics on the GPU #719
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!719
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-719"
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?
@lordon1a on GitHub · 2026-11-24 04:03 UTC · original
lordon1a:tests/gpu-fma-legacy-and-minmax→main· +92 −0 · 1 files · 1 commits · openAdds a per-instruction GPU test (
gpu_fma_legacy_and_float_min_max) covering 6 RDNA2 floating-point instructions that previously had no GPU test coverage:v_fma_legacy_f32,v_fmac_legacy_f32,v_min_f32,v_max_f32,v_min_f16, andv_max_f16. Checks legacy0 * inf == 0/0 * NaN == 0returningc, normal FMA, and IEEE-754minNum/maxNumNaN propagation (one NaN returns the non-NaN operand, two NaNs return NaN) across 12 edge cases.What is in it
crates/xcl/src/gpu/recomp/tests.rs: addsgpu_fma_legacy_and_float_min_max(test-only; no runtime code changed).Tested
616.64, wave32, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200),rustc 1.100.0(x86_64-pc-windows-gnullvm), debug build, DXC1.9.2609.5(01b62ad4)cargo test -p xcl --lib gpu_fma_legacy_and_float_min_max -- --nocapture: 1 passed, 0 failed, 0 ignored (0.64s)cargo test --workspace -- --test-threads=1: 702 passed, 0 failed, 41 ignoredSKIPPEDGPU tests (expected on wave32-only NVIDIA hardware):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64Not tested
AI use
@joeypercia on GitHub · 2026-11-24 04:08 UTC · original
AMD / wave64 run (the Not tested item):
6e948d7merged ontomainf4ce27c(clean merge).Tested
gpu_fma_legacy_and_float_min_max: passes on the RDNA2 iGPU (native wave64) and on the RTX 4070 Ti (split form); noSKIPPEDReview note: the legacy model here is "a zero factor returns
c". That differs from the hardware in one case:c = -0, where the result is+0(the legacy product is+0, and+0 + -0 = +0; LLVM'samdgcn_fma_legacyfolding calls this out). None of the cases has a zero product withc = -0, so the test is right as written, but adding one (e.g.(0, inf, -0) → +0) would cover #679. It would fail onmaintoday, so it fits #679's fix PR better than this one.Not tested: the full suite on this merge (test-only change); release build.
Run and report by Claude Code (Claude Opus 5.5).
@MesshM on GitHub · 2026-11-24 04:14 UTC · original
Test run of
6e948d7153ca09a4002fc83da3becf3804554efbon AMD RDNA4. I merged it onto currentmainf4ce27clocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 702 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 661 passed, 0 failed, 21 ignoredSKIPPED;gpu_fma_legacy_and_float_min_maxpasses.Review: The min / max references follow IEEE minNum / maxNum (one NaN gives the other operand), and the legacy FMA cases with a zero factor check that
ccomes back. One precision for the description: the hardware returns c + (+0), so for c = −0 the result is +0, not c; #720 fixes the translation for that case. None of this test's cases uses c = −0, so it passes with or without #720.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@JJAutoCompare on GitHub · 2026-11-25 06:10 UTC · original
Empirical test report (
6e948d71)Hardware / environment
XCL_ADAPTER=A770, Windows x64 build 26200, AMD CPU (family 23, model 113). GPU driver version was not recorded.rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5 (01b62ad47), and Cargo's unoptimized test profile with debug info and incremental compilation disabled.6e948d7153ca09a4002fc83da3becf3804554efb.Commands and results
cargo test -p xcl --lib --no-runcompleted with exit code 0 before acquiring the GPU lock.Invoke-ArcTest.ps1, ran& $fixturePath gpu::recomp::tests::gpu_fma_legacy_and_float_min_max --exact --nocapture --test-threads=1withRUST_TEST_NOCAPTURE=1.$fixturePathwas the unit-test executable printed by the compile step.SKIPPEDlines. The fixture completed in 2.04 seconds.Observed behavior
Not tested
The full GPU workspace suite and game smoke runs were omitted. Other GPU adapters were not tested.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr719-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 11:38 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.