Tests: run the v_fma_f32 control of the no-contraction test on its own #676
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!676
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-676"
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?
@Tjabooo on GitHub · 2026-11-24 03:18 UTC · original
Tjabooo:tests/fma-control-own-program→main· +12 −4 · 1 files · 1 commits · openOn RADV,
gpu_nonfused_mad_and_mac_prevent_fma_contractionfails its fused control. The cause is the test's layout, not missing FMA: thev_fma_f32control sits in the same program as themad_nfops, on the same inputs. RADV merges the fma'sv0 * v1with their identicalpreciseproducts and rounds it twice. A lonev_fma_f32is fused there. This runs the control as its own program, so it checks what it is meant to check: that the backend fuses. Part of #472.How I narrowed it down (RX 9070 XT, RADV / Mesa 26.2.6, vkd3d-proton v3.1,
maindd2ae9a):FMadwithout!dx.precise(DXC 2026_09_29), and the SPIR-V that vkd3d-proton hands to RADV hasOpExtInst Fma %v0 %v1 %v2withoutNoContraction(VKD3D_SHADER_DUMP_PATH).RADV_DEBUG=shaders) there is noffmaleft: the value stored to v16 isfadd(fmul(v0, v1) // exact, v2) // exact, the same instructions as themad_nflines.V_FMA_F32line in the program, both lanes pass (0x73FFFFFF,0x28800000). With thev_mad_f32line (v12) removed but the othermad_nflines kept, it still fails, because they share thev0 * v1product.Folding an fma's product into an identical exact product is arguably a Mesa bug. A real shader with both patterns would round that fma twice on RADV. I can report it to Mesa separately. This PR only keeps the test from depending on it.
What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_nonfused_mad_and_mac_prevent_fma_contractiontranslates and runs thev_fma_f32control as a second program on the same register state, and asserts both lanes of v16 there. The non-fused checks are unchanged.Tested
x86_64-pc-windows-gnu, debug. No Windows build.cargo test -p xcl --lib --locked --target x86_64-pc-windows-gnu -- --test-threads=4(under Wine) on this branch (main91f9a5e+ this commit): 650 passed, 2 failed, 21 ignored, 0SKIPPED. The two failures aregpu_f64_rootsandgpu_f64_math_random, which fail onmaintoo and are fixed by #530. Onmainthe same run also fails this test.Regression run
tests.rs), no runtime code, so nosmoke.ps1run.Not tested
mad()unfused too, the control will still fail there, which is then correct.AI use
@lordon1a on GitHub · 2026-11-24 03:38 UTC · original
Independent GPU test report on
bbf6c40: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_nonfused_mad_and_mac_prevent_fma_contraction -- --nocapture0.80s(gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contractionok)Not tested
AI use
bbf6c40in a detached worktree, audited the diff, ran the GPU test, and posted this report.@joeypercia on GitHub · 2026-11-24 03:39 UTC · original
Native Windows AMD run, the other half of Not tested (NVIDIA is above):
bbf6c40merged ontomain91f9a5e(clean merge).Tested
gpu_nonfused_mad_and_mac_prevent_fma_contraction: passes on the RDNA2 iGPU and on the RTX 4070 Ti, the separate fused control includedcargo test --workspace --no-fail-fast -- --test-threads=4on the RDNA2 iGPU: 692 passed, 0 failed, 41 ignored;SKIPPED:gpu_geometry_mode_es_gs_strip,gpu_mesh_mode_two_passes(no mesh shaders)Not tested
Run and report by Claude Code (Claude Opus 5.5).
@upipibi on GitHub · 2026-11-24 05:52 UTC · original
Full-suite run on this PR's head
bbf6c40, for the counts CONTRIBUTING.md item 2 asks for, on a GPU family the description doesn't cover:Tested
cargo build --workspacethencargo test --workspace --no-fail-fast -- --test-threads=4: 692 passed, 0 failed, 41 ignored (16 test binaries, the e2e title included)gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64)Not tested: AMD / wave64; no retail title (this PR changes only
gpu/recomp/tests.rs).AI-assisted (Claude Code).
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #175@pablogonz12 on GitHub · 2026-11-24 17:26 UTC · original
Test report for head
bbf6c40(based on91f9a5e). It does not fix the test on this setup: the lonev_fma_f32control is unfused here too.Tested
subprojects/dxil-spirvmoved to master7c048638(#1425), DXC 1.9.2609.5, Rust stable, release,x86_64-pc-windows-gnu,--test-threads=4.gpu_nonfused_mad_and_mac_prevent_fma_contractionon this head fails at its new control:v_fma_f32 overflow control should stay fused, left2139095040(0x7F800000), right1946157055(0x73FFFFFF). Alone (--test-threads=1) it fails the same way. The non-fused asserts before it pass.xcllib suite on this head: 716 passed, 6 failed, 21 ignored, 0SKIPPED(the six:gpu_f64_roots,gpu_f64_math_random, this test,gpu_depth_buffer_created_for_unordered_access_is_placed,xma2_source_voice_decodes_and_manages_lifetime,pe::tests::parses_own_test_binary_tls).mainb7aa9f3plus a test-only commit: 714 passed, 9 failed (the same six plus three interference failures that pass alone).Not tested
AI use
@crastinator on GitHub · 2026-11-24 18:03 UTC · original
@pablogonz12 for comparison: same Mesa 26.3.1 on RDNA2 (RX 6700 XT, gfx1031). At
bbf6c40the test passes with every dxil-spirv I have, your master7c048638included, andRADV_DEBUG=shadersshows the lone control as onev_fmac_f32. So it looks gfx12-specific. Details in my review above (edited).@JJAutoCompare on GitHub · 2026-11-25 06:24 UTC · original
Empirical test report (
bbf6c406)Hardware / environment
bbf6c406e5c1b831bb7aed57400c797f6e8cc42c(PR #676).32.0.101.9175. AMD Ryzen 7 3800X 8-Core Processor. Windows build10.0.26200.9974.1.100.0 (0ef1bc386 2026-11-09),x86_64-pc-windows-msvc. DXC1.9.2609.5 (01b62ad4)and DXIL1.9.2609.5.Commands and results
cargo test -p xcl --lib --no-runexited 0 outside the Arc lock and produced the library test executable. This step ran zero tests.XCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1, ran this command under the lock held byInvoke-ArcTest.ps1.$testExedenotes the executable Cargo reported.SKIPPED). The harness finished in 0.64s.Observed behavior
The selected test exercised both shaders in one test case. The non-fused MAD and MAC assertions passed for positive infinity on overflow (
0x7F800000) and positive zero on cancellation (0x00000000). The separateV_FMA_F32dispatch used the same inputs and passed the fused-result assertions (0x73FFFFFFand0x28800000, respectively).Not tested
The full GPU workspace suite, game smoke runs, and the RADV/vkd3d-proton configuration were omitted.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr676-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 12:10 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). 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.