Recompiler tests: GPU checks for v_fmac_f32, v_fmamk_f32 and v_fmaak_f32 #737
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!737
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-737"
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?
@13hourstilliland on GitHub · 2026-11-24 04:21 UTC · original
13hourstilliland:recomp-tests-fmac-fmamk-fmaak→main· +50 −0 · 1 files · 1 commits · openAdds a GPU test for three RDNA2 instructions that
emit.rstranslates but no test runs:v_fmac_f32(the destination is the addend),v_fmamk_f32(a * K + b) andv_fmaak_f32(a * b + K). Test only, no runtime change.What is in it
gpu_valu_fmac_fmamk_fmaakincrates/xcl/src/gpu/recomp/tests.rs, aftergpu_nonfused_mad_and_mac_prevent_fma_contraction(away from the lines open PRs add to): one kernel with all 3 instructions, run as wave64 where the adapter has it and as wave32 everywhere (gpu_waves), a 12 x 12 x 8 grid (±0, ±1, 2, 0.5, -3, 1.5, 0.25, ±inf and NaN for the factors; ±0, 1, -2.5, 100, 0.75, inf and NaN for the addend), 1152 triples per wave size, each lane compared with the RDNA2 definition computed on the CPU withf32::mul_addand the literalKin its place, bit for bit (any NaN for NaN); the products on this grid are exact, so fused and unfused multiply-adds agree.3db536e(before the rebase onto main91f9a5e; the test code did not change): with the reference changed (wrong reference forv_fmamk_f32(K_AKinstead ofK_MK):wave32, 696 wrong (V_FMAMK_F32: 696), no other instruction) the test fails; with the fmac addend replaced by 0, and the literal moved to the other operand in fmamk and in fmaak applied toemit.rsall at once it fails and names every instruction (wave32, 2034 wrong (V_FMAC_F32: 550, V_FMAMK_F32: 708, V_FMAAK_F32: 776), 550 to 776 wrong per instruction). Those edits are not in the PR.Tested
stable-x86_64-pc-windows-gnu(MinGW linker), DXC 1.9.2609.5, debug build, commit9b5e344268(on main91f9a5e9f0)cargo test --workspace --no-fail-fast -- --test-threads=4, run in the interactive desktop session: 693 passed, 0 failed, 41 ignored (lib: 653 passed, 0 failed, 21 ignored;e2e3 of 3;gpu_valu_fmac_fmamk_fmaakok).main91f9a5e9f0on the same machine: 692 passed, 0 failed, 41 ignored (lib: 652 passed, 0 failed, 21 ignored)SKIPPED(no wave64 on this GPU):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareNot tested
stable-x86_64-pc-windows-msvc): built with the GNU toolchain only.crates/xcl/srcruntime file changes).AI use
@MesshM on GitHub · 2026-11-24 04:39 UTC · original
Test run of
9b5e3442686c2c1878b63bca3254667d466573f5on AMD RDNA4. I merged it onto currentmain64b3f35locally (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_valu_fmac_fmamk_fmaakpasses.Review:
fmacuses the destination as the addend,fmamkis a·K + b andfmaaka·b + K, compared againstmul_add(one rounding), and the literal K is placed as the encoding expects. I found nothing to change.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.
@futurepro62 on GitHub · 2026-11-24 04:46 UTC · original
An NVIDIA run, since the report above is on RDNA4 (native wave64). Tested exact head
9b5e344(on its base91f9a5e).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 693 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.gpu::recomp::tests::gpu_valu_fmac_fmamk_fmaak ... ok.Not tested
AI use
@ItsMrDubey on GitHub · 2026-11-24 04:57 UTC · original
Test report for
9b5e3442686c2c1878b63bca3254667d466573f5(this PR's head)Tested
stable-x86_64-pc-windows-msvc), debug; DXC 1.9.2602.17 from Windows SDK 10.0.2610016 test binaries: 692 passed, 1 failed, 41 ignored. Same machine,
main64b3f3559: 700 passed, 1 failed, 41 ignored.This PR's tests:
gpu::recomp::tests::gpu_valu_fmac_fmamk_fmaak: okFailures:
hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memoryfails on this machine on every run, on this PR's head and onmain64b3f3559alike (5 of 5 reruns onmain), so it is not from this PR. #650 fixes it here.16 test binaries instead of
main's 17 because this branch predatestests/sparse_reinit.rs; nothing crashed.SKIPPED (no wave64 on this GPU):
gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.AI use: Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report from their output.
@JJAutoCompare on GitHub · 2026-11-25 06:03 UTC · original
Empirical test report (
9b5e3442)Verified PR #737 at
9b5e3442686c2c1878b63bca3254667d466573f5in a clean detached checkout.Hardware / environment
XCL_ADAPTER=A770), Windows x64 build 26200. The machine reported CPU identifierAMD64 Family 23 Model 113 Stepping 0, AuthenticAMD.1.100.0 (0ef1bc386 2026-11-09), hostx86_64-pc-windows-msvc. The DXC executable reported1.9.2609.5 (01b62ad47), and the fixture logged loading dxcompiler and DXIL version1.9.2609.5.Commands and results
cargo test -p xcl --lib --no-run --message-format=jsonexited 0 in 59.93s outside the GPU lock. The Cargo artifact record identified the library test executable.Invoke-ArcTest.ps1, withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1, ranxcl-00e28da3621caf64.exe gpu::recomp::tests::gpu_valu_fmac_fmamk_fmaak --exact --nocapture --test-threads=1. It exited 0 in 0.64s of test time. The harness reported 1 passed, 0 failed, 0 ignored, and 673 filtered out. The captured output contained 0SKIPPEDlines.Observed behavior
V_FMAC_F32,V_FMAMK_F32, andV_FMAAK_F32over 1,152 operand triples per wave size exercised, including signed zeros, infinities, and NaNs. All results met the CPUf32::mul_addreference check, which compares result bits and accepts any NaN when the reference is NaN.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
pr737-focused.logand published.@DavidM1911 on GitHub · 2026-11-25 11:28 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.