Tests: run the v_fma_f32 control of the no-contraction test on its own #671

Open
Tjabooo wants to merge 1 commit from upstream-pr/676 into main
Tjabooo commented 2026-11-24 03:18:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Tjabooo on 2026-11-24T03:18:12Z.


On RADV, gpu_nonfused_mad_and_mac_prevent_fma_contraction fails its fused control. The cause is the test's layout, not missing FMA: the v_fma_f32 control sits in the same program as the mad_nf ops, on the same inputs. RADV merges the fma's v0 * v1 with their identical precise products and rounds it twice. A lone v_fma_f32 is 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, main dd2ae9a):

  • The DXIL has the control as a plain FMad without !dx.precise (DXC 2026_09_29), and the SPIR-V that vkd3d-proton hands to RADV has OpExtInst Fma %v0 %v1 %v2 without NoContraction (VKD3D_SHADER_DUMP_PATH).
  • In RADV's NIR (RADV_DEBUG=shaders) there is no ffma left: the value stored to v16 is fadd(fmul(v0, v1) // exact, v2) // exact, the same instructions as the mad_nf lines.
  • With only the V_FMA_F32 line in the program, both lanes pass (0x73FFFFFF, 0x28800000). With the v_mad_f32 line (v12) removed but the other mad_nf lines kept, it still fails, because they share the v0 * v1 product.

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_contraction translates and runs the v_fma_f32 control as a second program on the same register state, and asserts both lanes of v16 there. The non-fused checks are unchanged.

Tested

  • AMD Radeon RX 9070 XT (RDNA4, GFX1201), RADV / Mesa 26.2.6; Arch Linux; Wine 11.21; vkd3d-proton v3.1 with #257's patch; DXC 2026_09_29. Rust 1.100.0, cross-built for 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 (main 91f9a5e + this commit): 650 passed, 2 failed, 21 ignored, 0 SKIPPED. The two failures are gpu_f64_roots and gpu_f64_math_random, which fail on main too and are fixed by #530. On main the same run also fails this test.

Regression run

  • Test-only change (tests.rs), no runtime code, so no smoke.ps1 run.

Not tested

  • Windows: neither the MSVC build nor the native AMD / NVIDIA drivers. This may not fix #472's RDNA1 Windows driver: if that driver leaves a lone mad() unfused too, the control will still fail there, which is then correct.
  • NVIDIA under Wine.

AI use

  • Claude Code with Claude Opus 5.5: ran the investigation (DXIL / SPIR-V / NIR dumps), wrote the change and this description. I read the diff.
<!-- greyfinch-sync:ivall/xcl:issue:5465434710 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676). Originally posted by [Tjabooo](https://github.com/Tjabooo) on 2026-11-24T03:18:12Z. --- On RADV, `gpu_nonfused_mad_and_mac_prevent_fma_contraction` fails its fused control. The cause is the test's layout, not missing FMA: the `v_fma_f32` control sits in the same program as the `mad_nf` ops, on the same inputs. RADV merges the fma's `v0 * v1` with their identical `precise` products and rounds it twice. A lone `v_fma_f32` is 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, `main` `dd2ae9a`): - The DXIL has the control as a plain `FMad` without `!dx.precise` (DXC 2026_09_29), and the SPIR-V that vkd3d-proton hands to RADV has `OpExtInst Fma %v0 %v1 %v2` without `NoContraction` (`VKD3D_SHADER_DUMP_PATH`). - In RADV's NIR (`RADV_DEBUG=shaders`) there is no `ffma` left: the value stored to v16 is `fadd(fmul(v0, v1) // exact, v2) // exact`, the same instructions as the `mad_nf` lines. - With only the `V_FMA_F32` line in the program, both lanes pass (`0x73FFFFFF`, `0x28800000`). With the `v_mad_f32` line (v12) removed but the other `mad_nf` lines kept, it still fails, because they share the `v0 * v1` product. 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_contraction` translates and runs the `v_fma_f32` control as a second program on the same register state, and asserts both lanes of v16 there. The non-fused checks are unchanged. **Tested** - AMD Radeon RX 9070 XT (RDNA4, GFX1201), RADV / Mesa 26.2.6; Arch Linux; Wine 11.21; vkd3d-proton v3.1 with #257's patch; DXC 2026_09_29. Rust 1.100.0, cross-built for `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 (`main` `91f9a5e` + this commit): **650 passed, 2 failed**, 21 ignored, 0 `SKIPPED`. The two failures are `gpu_f64_roots` and `gpu_f64_math_random`, which fail on `main` too and are fixed by #530. On `main` the same run also fails this test. **Regression run** - Test-only change (`tests.rs`), no runtime code, so no `smoke.ps1` run. **Not tested** - Windows: neither the MSVC build nor the native AMD / NVIDIA drivers. This may not fix #472's RDNA1 Windows driver: if that driver leaves a lone `mad()` unfused too, the control will still fail there, which is then correct. - NVIDIA under Wine. **AI use** - Claude Code with Claude Opus 5.5: ran the investigation (DXIL / SPIR-V / NIR dumps), wrote the change and this description. I read the diff.
towiice commented 2026-11-24 03:46:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T03:46:03Z.

Review: COMMENTED


Tested:

  • Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, 32-wide subgroups / wave32, driver 610.88), Windows 11 x64 (26H2 / 10.0.26300), DXC v1.9.2609 (01b62ad4), toolchain stable-x86_64-pc-windows-gnullvm (llvm-mingw 23.1.6).
  • Test command: cargo test -p xcl --lib gpu_nonfused_mad_and_mac_prevent_fma_contraction -- --nocapture
  • Result: 1 passed, 0 failed (0.65 s).

Separating the v_fma_f32 control into its own isolated program avoids driver shader optimization merging with precise products while verifying hardware fused multiply-add behavior. Passes cleanly on NVIDIA Turing.

<!-- greyfinch-sync:ivall/xcl:review:6033346018 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#pullrequestreview-6033346018). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T03:46:03Z. **Review:** COMMENTED --- **Tested:** - Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, 32-wide subgroups / wave32, driver 610.88), Windows 11 x64 (26H2 / 10.0.26300), DXC v1.9.2609 (`01b62ad4`), toolchain `stable-x86_64-pc-windows-gnullvm` (llvm-mingw 23.1.6). - Test command: `cargo test -p xcl --lib gpu_nonfused_mad_and_mac_prevent_fma_contraction -- --nocapture` - Result: **1 passed, 0 failed** (0.65 s). Separating the `v_fma_f32` control into its own isolated program avoids driver shader optimization merging with `precise` products while verifying hardware fused multiply-add behavior. Passes cleanly on NVIDIA Turing.
lordon1a commented 2026-11-24 07:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by lordon1a on 2026-11-24T03:38:04Z.


Independent GPU test report on bbf6c40:

Tested

  • Hardware: NVIDIA GeForce RTX 3070 Ti Laptop GPU (driver 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, DXC 1.9.2609.5 (01b62ad4)
  • Command: cargo test -p xcl --lib gpu_nonfused_mad_and_mac_prevent_fma_contraction -- --nocapture
  • Result: 1 passed, 0 failed, 0 ignored in 0.80s (gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction ok)

Not tested

  • AMD / wave64, Intel GPU, retail title

AI use

  • Antigravity (Google DeepMind agent) — fetched bbf6c40 in a detached worktree, audited the diff, ran the GPU test, and posted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7121278728 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/676#issuecomment-7121278728). Originally posted by [lordon1a](https://github.com/lordon1a) on 2026-11-24T03:38:04Z. --- Independent GPU test report on `bbf6c40`: **Tested** - Hardware: NVIDIA GeForce RTX 3070 Ti Laptop GPU (driver `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, DXC `1.9.2609.5` (`01b62ad4`) - Command: `cargo test -p xcl --lib gpu_nonfused_mad_and_mac_prevent_fma_contraction -- --nocapture` - Result: **1 passed, 0 failed, 0 ignored** in `0.80s` (`gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction` ok) **Not tested** - AMD / wave64, Intel GPU, retail title **AI use** - Antigravity (Google DeepMind agent) — fetched `bbf6c40` in a detached worktree, audited the diff, ran the GPU test, and posted this report.
joeypercia commented 2026-11-24 07:05:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by joeypercia on 2026-11-24T03:39:45Z.


Native Windows AMD run, the other half of Not tested (NVIDIA is above): bbf6c40 merged onto main 91f9a5e (clean merge).

Tested

  • AMD Radeon iGPU (Ryzen 7 7800X3D, RDNA2, 32–64 lanes, no mesh shaders), driver 26.11.2 (32.0.21045.29003); RTX 4070 Ti (616.56, 32 lanes); Windows 11 Pro 26200; Rust 1.100.0 MSVC; DXC 1.8.2502.11; debug
  • gpu_nonfused_mad_and_mac_prevent_fma_contraction: passes on the RDNA2 iGPU and on the RTX 4070 Ti, the separate fused control included
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 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

  • RDNA1. Note this driver build (32.0.21045.29003) is the one in #472's RX 5700 XT report, and on this RDNA2 iGPU the old combined form passes too (#472), so this adapter can't tell the two forms apart.

Run and report by Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7121303968 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/676#issuecomment-7121303968). Originally posted by [joeypercia](https://github.com/joeypercia) on 2026-11-24T03:39:45Z. --- Native **Windows AMD** run, the other half of **Not tested** (NVIDIA is above): `bbf6c40` merged onto `main` `91f9a5e` (clean merge). **Tested** - AMD Radeon iGPU (Ryzen 7 7800X3D, RDNA2, 32–64 lanes, no mesh shaders), driver 26.11.2 (32.0.21045.29003); RTX 4070 Ti (616.56, 32 lanes); Windows 11 Pro 26200; Rust 1.100.0 MSVC; DXC 1.8.2502.11; debug - `gpu_nonfused_mad_and_mac_prevent_fma_contraction`: passes on the RDNA2 iGPU and on the RTX 4070 Ti, the separate fused control included - `cargo test --workspace --no-fail-fast -- --test-threads=4` on 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** - RDNA1. Note this driver build (32.0.21045.29003) is the one in #472's RX 5700 XT report, and on this RDNA2 iGPU the old combined form passes too (#472), so this adapter can't tell the two forms apart. Run and report by Claude Code (Claude Opus 5.5).
upipibi commented 2026-11-24 07:06:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T05:52:26Z.


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

  • NVIDIA GeForce RTX 3070 (driver 616.56, wave32), Ryzen 9 5950X, Windows 11 Pro 26100, rustc 1.100.0 MSVC, debug
  • cargo build --workspace then cargo test --workspace --no-fail-fast -- --test-threads=4: 692 passed, 0 failed, 41 ignored (16 test binaries, the e2e title included)
  • SKIPPED: 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).

<!-- greyfinch-sync:ivall/xcl:comment:7123355149 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/676#issuecomment-7123355149). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T05:52:26Z. --- 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** - NVIDIA GeForce RTX 3070 (driver 616.56, wave32), Ryzen 9 5950X, Windows 11 Pro 26100, rustc 1.100.0 MSVC, debug - `cargo build --workspace` then `cargo test --workspace --no-fail-fast -- --test-threads=4`: **692 passed, 0 failed, 41 ignored** (16 test binaries, the e2e title included) - SKIPPED: `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).
crastinator commented 2026-11-24 08:01:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crastinator on 2026-11-24T08:01:47Z.

Review: COMMENTED


Tested on RDNA2 under Wine (RADV). Same result as the RX 9070 XT in the description.

Tested (head bbf6c40, and merged onto main 1ec4c98: no conflicts)

  • AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5 (CachyOS)
  • Wine: Proton Experimental 11.0-20261112 (its files/bin/wine, kernel write watches), with its own vkd3d-proton (stock, not the #257 patch) and DXVK v3.1.1-209 dxgi; VKD3D_CONFIG=ignore_shared_fence; DXC 1.9.2609
  • Cross-built on Linux for x86_64-pc-windows-msvc (clang-cl / lld-link 23.1.5, xwin SDK 10.0.26100), Rust 1.99.1, debug; the lib test binary run under Wine
  • On main 1ec4c98, gpu_nonfused_mad_and_mac_prevent_fma_contraction fails here: v_fma_f32 overflow control should stay fused, left 2139095040 (+inf), right 1946157055.
  • At bbf6c40 it passes, and it also passes with the PR merged onto 1ec4c98. So the lone v_fma_f32 is fused on gfx1031 / RADV too.
  • Whole lib suite, one test per process (see note): main 664 ok / 4 failed / 21 ignored / 5 aborted at the #241 assertion / 1 exits with code 5 (mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares, right after its mid-list split; newer than this PR and probably the same stock-vkd3d-proton limit); PR head 644 ok / 3 failed / 21 ignored / 5 aborted. The only status change in tests present on both sides is this test, FAILED -> ok. The 3 that still fail are gpu_f64_roots and gpu_f64_math_random (#530) and xma2_source_voice_decodes_and_manages_lifetime (#890), and all three fail on main too.

Under stock vkd3d-proton, D3D12.X tests take down the test process (iface->lpVtbl == &d3d12_heap_vtbl, #241), so the suite was run one test per process: every test in the binary, each with --exact <name> --test-threads=1, compared against main the same way.

Not tested

  • Windows, NVIDIA, a retail title. The full suite with a patched vkd3d-proton.

AI use

  • Claude Code (Claude Opus 5.5) built the branches, ran the tests and wrote this report; I checked the results.

Update: re-run at bbf6c40 after @pablogonz12's RDNA4 result. On RDNA2 it still passes with every vkd3d-proton / dxil-spirv build I have, including the dxil-spirv master 7c048638 used there. So the difference looks like it's in RADV's RDNA4 (gfx12) backend, not in dxil-spirv.

  • RX 6700 XT (gfx1031), Mesa 26.3.1 RADV (the same Mesa as the RX 9070 XT run), Proton Experimental's Wine; --exact gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction --test-threads=1:
vkd3d-proton dxil-spirv result
Proton Experimental's own (Proton's) pass 2/2
v3.1 + #257's patch, -Db_ndebug=true 53aac418 (#775) pass 2/2
v3.1, no patch, -Db_ndebug=true 53aac418 pass 2/2
v3.1 + #257's patch, -Db_ndebug=true 7c048638 (master, as in the RDNA4 run) pass 3/3
  • RADV_DEBUG=shaders on gfx1031: the lone control program compiles to one fused op, v_fmac_f32_e32 v10, v3, v4 (v10 holding v5, the addend).
  • So the PR's premise (a lone v_fma_f32 is fused) holds on gfx1031 with Mesa 26.3.1, but per the RDNA4 report it does not on gfx1201. Comparing RADV_DEBUG=shaders (or nir) for the control on the RX 9070 XT would show whether ACO splits it there.
<!-- greyfinch-sync:ivall/xcl:review:6035608144 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#pullrequestreview-6035608144). Originally posted by [crastinator](https://github.com/crastinator) on 2026-11-24T08:01:47Z. **Review:** COMMENTED --- Tested on RDNA2 under Wine (RADV). Same result as the RX 9070 XT in the description. **Tested** (head `bbf6c40`, and merged onto `main` `1ec4c98`: no conflicts) - AMD Radeon RX 6700 XT (RDNA2, gfx1031, RADV NAVI22, Mesa 26.3.1), Ryzen 7 5700X, Linux 7.3.5 (CachyOS) - Wine: Proton Experimental 11.0-20261112 (its `files/bin/wine`, kernel write watches), with its own vkd3d-proton (stock, not the #257 patch) and DXVK v3.1.1-209 `dxgi`; `VKD3D_CONFIG=ignore_shared_fence`; DXC 1.9.2609 - Cross-built on Linux for `x86_64-pc-windows-msvc` (clang-cl / lld-link 23.1.5, xwin SDK 10.0.26100), Rust 1.99.1, debug; the lib test binary run under Wine - On `main` `1ec4c98`, `gpu_nonfused_mad_and_mac_prevent_fma_contraction` fails here: `v_fma_f32 overflow control should stay fused`, left `2139095040` (+inf), right `1946157055`. - At `bbf6c40` it passes, and it also passes with the PR merged onto `1ec4c98`. So the lone `v_fma_f32` is fused on gfx1031 / RADV too. - Whole lib suite, one test per process (see note): `main` 664 ok / 4 failed / 21 ignored / 5 aborted at the #241 assertion / 1 exits with code 5 (`mid_list_write64_wait64_split_avoids_cycle_and_reuses_spares`, right after its mid-list split; newer than this PR and probably the same stock-vkd3d-proton limit); PR head 644 ok / 3 failed / 21 ignored / 5 aborted. The only status change in tests present on both sides is this test, FAILED -> ok. The 3 that still fail are `gpu_f64_roots` and `gpu_f64_math_random` (#530) and `xma2_source_voice_decodes_and_manages_lifetime` (#890), and all three fail on `main` too. Under stock vkd3d-proton, D3D12.X tests take down the test process (`iface->lpVtbl == &d3d12_heap_vtbl`, #241), so the suite was run one test per process: every test in the binary, each with `--exact <name> --test-threads=1`, compared against `main` the same way. **Not tested** - Windows, NVIDIA, a retail title. The full suite with a patched vkd3d-proton. **AI use** - Claude Code (Claude Opus 5.5) built the branches, ran the tests and wrote this report; I checked the results. --- **Update: re-run at `bbf6c40` after @pablogonz12's RDNA4 result.** On RDNA2 it still passes with every vkd3d-proton / dxil-spirv build I have, including the dxil-spirv master `7c048638` used there. So the difference looks like it's in RADV's RDNA4 (gfx12) backend, not in dxil-spirv. - RX 6700 XT (gfx1031), Mesa 26.3.1 RADV (the same Mesa as the RX 9070 XT run), Proton Experimental's Wine; `--exact gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction --test-threads=1`: | vkd3d-proton | dxil-spirv | result | |---|---|---| | Proton Experimental's own | (Proton's) | pass 2/2 | | v3.1 + #257's patch, `-Db_ndebug=true` | `53aac418` (#775) | pass 2/2 | | v3.1, no patch, `-Db_ndebug=true` | `53aac418` | pass 2/2 | | v3.1 + #257's patch, `-Db_ndebug=true` | **`7c048638`** (master, as in the RDNA4 run) | pass 3/3 | - `RADV_DEBUG=shaders` on gfx1031: the lone control program compiles to one fused op, `v_fmac_f32_e32 v10, v3, v4` (`v10` holding `v5`, the addend). - So the PR's premise (a lone `v_fma_f32` is fused) holds on gfx1031 with Mesa 26.3.1, but per the RDNA4 report it does not on gfx1201. Comparing `RADV_DEBUG=shaders` (or `nir`) for the control on the RX 9070 XT would show whether ACO splits it there.
pablogonz12 commented 2026-11-24 18:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by pablogonz12 on 2026-11-24T17:26:11Z.


Test report for head bbf6c40 (based on 91f9a5e). It does not fix the test on this setup: the lone v_fma_f32 control is unfused here too.

Tested

  • AMD Radeon RX 9070 XT (RDNA4, RADV / Mesa 26.3.1), Ryzen 9 9900X, CachyOS (Linux 7.3), Wine (GE-Proton11-14), vkd3d-proton v3.1 + the #257 patch with subprojects/dxil-spirv moved to master 7c048638 (#1425), DXC 1.9.2609.5, Rust stable, release, x86_64-pc-windows-gnu, --test-threads=4.
  • gpu_nonfused_mad_and_mac_prevent_fma_contraction on this head fails at its new control: v_fma_f32 overflow control should stay fused, left 2139095040 (0x7F800000), right 1946157055 (0x73FFFFFF). Alone (--test-threads=1) it fails the same way. The non-fused asserts before it pass.
  • Whole xcl lib suite on this head: 716 passed, 6 failed, 21 ignored, 0 SKIPPED (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). main b7aa9f3 plus a test-only commit: 714 passed, 9 failed (the same six plus three interference failures that pass alone).
  • So the result from the description (a lone fma is fused on Mesa 26.2.6) does not hold on Mesa 26.3.1 here. I did not find out why (the SPIR-V I dumped is the non-fused program, not the control).

Not tested

  • Mesa 26.2.6, Windows, NVIDIA; the NIR of the lone control.

AI use

  • Claude Code (Claude Sonnet 5.5) ran the builds and tests on my machine and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7139191218 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7139191218). Originally posted by [pablogonz12](https://github.com/pablogonz12) on 2026-11-24T17:26:11Z. --- Test report for head `bbf6c40` (based on `91f9a5e`). **It does not fix the test on this setup**: the lone `v_fma_f32` control is unfused here too. **Tested** - AMD Radeon RX 9070 XT (RDNA4, RADV / Mesa 26.3.1), Ryzen 9 9900X, CachyOS (Linux 7.3), Wine (GE-Proton11-14), vkd3d-proton v3.1 + the #257 patch with `subprojects/dxil-spirv` moved to master `7c048638` (#1425), DXC 1.9.2609.5, Rust stable, release, `x86_64-pc-windows-gnu`, `--test-threads=4`. - `gpu_nonfused_mad_and_mac_prevent_fma_contraction` on this head fails at its new control: `v_fma_f32 overflow control should stay fused`, left `2139095040` (`0x7F800000`), right `1946157055` (`0x73FFFFFF`). Alone (`--test-threads=1`) it fails the same way. The non-fused asserts before it pass. - Whole `xcl` lib suite on this head: 716 passed, 6 failed, 21 ignored, 0 `SKIPPED` (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`). `main` `b7aa9f3` plus a test-only commit: 714 passed, 9 failed (the same six plus three interference failures that pass alone). - So the result from the description (a lone fma is fused on Mesa 26.2.6) does not hold on Mesa 26.3.1 here. I did not find out why (the SPIR-V I dumped is the non-fused program, not the control). **Not tested** - Mesa 26.2.6, Windows, NVIDIA; the NIR of the lone control. **AI use** - Claude Code (Claude Sonnet 5.5) ran the builds and tests on my machine and wrote this report.
crastinator commented 2026-11-24 18:09:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by crastinator on 2026-11-24T18:03:53Z.


@pablogonz12 for comparison: same Mesa 26.3.1 on RDNA2 (RX 6700 XT, gfx1031). At bbf6c40 the test passes with every dxil-spirv I have, your master 7c048638 included, and RADV_DEBUG=shaders shows the lone control as one v_fmac_f32. So it looks gfx12-specific. Details in my review above (edited).

<!-- greyfinch-sync:ivall/xcl:comment:7140104061 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7140104061). Originally posted by [crastinator](https://github.com/crastinator) on 2026-11-24T18:03:53Z. --- @pablogonz12 for comparison: same Mesa 26.3.1 on RDNA2 (RX 6700 XT, gfx1031). At `bbf6c40` the test passes with every dxil-spirv I have, your master `7c048638` included, and `RADV_DEBUG=shaders` shows the lone control as one `v_fmac_f32`. So it looks gfx12-specific. Details in my review above (edited).
JJAutoCompare commented 2026-11-25 07:05:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:24:40Z.


Empirical test report (bbf6c406)

Hardware / environment

  • Commit bbf6c406e5c1b831bb7aed57400c797f6e8cc42c (PR #676).
  • Intel Arc A770, driver 32.0.101.9175. AMD Ryzen 7 3800X 8-Core Processor. Windows build 10.0.26200.9974.
  • Rust 1.100.0 (0ef1bc386 2026-11-09), x86_64-pc-windows-msvc. DXC 1.9.2609.5 (01b62ad4) and DXIL 1.9.2609.5.
  • Cargo test profile, unoptimized, with incremental compilation and debug info disabled.

Commands and results

  • cargo test -p xcl --lib --no-run exited 0 outside the Arc lock and produced the library test executable. This step ran zero tests.
  • With XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1, ran this command under the lock held by Invoke-ArcTest.ps1. $testExe denotes the executable Cargo reported.
& $testExe gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction --exact --nocapture --test-threads=1
  • The test executable and lock wrapper both exited 0. The log reported 1 passed, 0 failed, 0 ignored, 672 filtered out, and 0 skipped (case-sensitive lines beginning with 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 separate V_FMA_F32 dispatch used the same inputs and passed the fused-result assertions (0x73FFFFFF and 0x28800000, 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.

<!-- greyfinch-sync:ivall/xcl:comment:7154761829 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7154761829). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T06:24:40Z. --- ### Empirical test report (bbf6c406) **Hardware / environment** - Commit `bbf6c406e5c1b831bb7aed57400c797f6e8cc42c` (PR #676). - Intel Arc A770, driver `32.0.101.9175`. AMD Ryzen 7 3800X 8-Core Processor. Windows build `10.0.26200.9974`. - Rust `1.100.0 (0ef1bc386 2026-11-09)`, `x86_64-pc-windows-msvc`. DXC `1.9.2609.5 (01b62ad4)` and DXIL `1.9.2609.5`. - Cargo test profile, unoptimized, with incremental compilation and debug info disabled. **Commands and results** - `cargo test -p xcl --lib --no-run` exited 0 outside the Arc lock and produced the library test executable. This step ran zero tests. - With `XCL_ADAPTER=A770` and `RUST_TEST_NOCAPTURE=1`, ran this command under the lock held by `Invoke-ArcTest.ps1`. `$testExe` denotes the executable Cargo reported. ```powershell & $testExe gpu::recomp::tests::gpu_nonfused_mad_and_mac_prevent_fma_contraction --exact --nocapture --test-threads=1 ``` - The test executable and lock wrapper both exited 0. The log reported 1 passed, 0 failed, 0 ignored, 672 filtered out, and 0 skipped (case-sensitive lines beginning with `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 separate `V_FMA_F32` dispatch used the same inputs and passed the fused-result assertions (`0x73FFFFFF` and `0x28800000`, 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 commented 2026-11-25 13:05:03 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:10:38Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7162021242 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7162021242). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:10:38Z. --- 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!
github-actions[bot] commented 2026-11-29 07:42:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:42:21Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252638886 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7252638886). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:42:21Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
relativespace2K commented 2026-11-30 03:12:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-30T03:12:37Z.


merge-check
base: 53e85fb1
head: bbf6c406e5
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2788 passed, 6 failed, 49 ignored, the base's own count because the PR moves assertions inside an existing test rather than adding one; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in --test gpu_two_pass_cache_e2e, so 5 failing tests give 6 failures). The same five fail on base 53e85fb1 alone (2788 passed, 6 failed, 49 ignored there).
review: no blocking finding; the whole diff is 12 lines in one test. The fused v_fma_f32 control moves out of the non-fused program into a program of its own, and both expectations (overflow staying fused, cancellation staying fused) move with it; the non-fused assertions are untouched. The comment states the reason and the hardware it was seen on (RADV through vkd3d-proton merging identical precise products across the shader and rounding twice), which is the failure mode that made the old shape flaky, and the new program gives that check nothing to merge with. The check is still meaningful: it fails if the backend stops fusing a lone v_fma_f32. No duplicate: #472 is the report this follows and nothing else changes this test.
performance: none: tests only.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.

<!-- greyfinch-sync:ivall/xcl:comment:7267685149 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7267685149). Originally posted by [relativespace2K](https://github.com/relativespace2K) on 2026-11-30T03:12:37Z. --- merge-check base: 53e85fb1 head: bbf6c406e5c1b831bb7aed57400c797f6e8cc42c merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2788 passed, 6 failed, 49 ignored, the base's own count because the PR moves assertions inside an existing test rather than adding one; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in `--test gpu_two_pass_cache_e2e`, so 5 failing tests give 6 failures). The same five fail on base 53e85fb1 alone (2788 passed, 6 failed, 49 ignored there). review: no blocking finding; the whole diff is 12 lines in one test. The fused `v_fma_f32` control moves out of the non-fused program into a program of its own, and both expectations (overflow staying fused, cancellation staying fused) move with it; the non-fused assertions are untouched. The comment states the reason and the hardware it was seen on (RADV through vkd3d-proton merging identical `precise` products across the shader and rounding twice), which is the failure mode that made the old shape flaky, and the new program gives that check nothing to merge with. The check is still meaningful: it fails if the backend stops fusing a lone `v_fma_f32`. No duplicate: #472 is the report this follows and nothing else changes this test. performance: none: tests only. verdict: safe to merge hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.
jsalzy commented 2026-11-30 03:24:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jsalzy on 2026-11-30T03:24:09Z.


merge-check claim
head: bbf6c406e5

<!-- greyfinch-sync:ivall/xcl:comment:7267860954 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7267860954). Originally posted by [jsalzy](https://github.com/jsalzy) on 2026-11-30T03:24:09Z. --- merge-check claim head: bbf6c406e5c1b831bb7aed57400c797f6e8cc42c
jsalzy commented 2026-11-30 03:33:13 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jsalzy on 2026-11-30T03:33:13Z.


merge-check
base: cfb9753a8c
head: bbf6c406e5
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2834 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64 on this GPU; 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1); 1 driver cache cannot be disabled without Windows Developer Mode); failing: none. The PR moves assertions inside gpu_nonfused_mad_and_mac_prevent_fma_contraction rather than adding a test; it passes here.
review: no blocking finding; whole diff read (12 lines in one test). The fused v_fma_f32 control leaves the non-fused program and runs as a program of its own, on the same inputs and options, with both of its expectations (overflow 0x73FF_FFFF and cancellation 0x2880_0000 staying fused); the non-fused assertions are unchanged. It still fails if the backend stops fusing a lone v_fma_f32, and it no longer gives a driver identical precise products to merge it with, which is the RADV failure the PR describes (#472). This run is NVIDIA only (wave32), where the test passes; RADV, where the old layout failed, is not covered here. No duplicate: #2119 (open) adds a different test after this one without changing it.
performance: none (test only).
verdict: safe to merge
hardware / tool and model: RTX 4070 SUPER 12 GB (621.24 / 32.0.16.2124), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 25H2 26200.9974, Rust 1.100.0, debug / Claude app (Claude Opus 5.5): merge, build and suite run on this PC with git and cargo only; diff review by Claude Opus 5.5.

<!-- greyfinch-sync:ivall/xcl:comment:7267991209 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7267991209). Originally posted by [jsalzy](https://github.com/jsalzy) on 2026-11-30T03:33:13Z. --- merge-check base: cfb9753a8cbf5517ee36914b7041cb62b4a97582 head: bbf6c406e5c1b831bb7aed57400c797f6e8cc42c merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2834 passed, 0 failed, 51 ignored; SKIPPED: 25 (22 no wave64 on this GPU; 2 no heap windows (opt-in XCL_HEAP_WINDOWS=1); 1 driver cache cannot be disabled without Windows Developer Mode); failing: none. The PR moves assertions inside gpu_nonfused_mad_and_mac_prevent_fma_contraction rather than adding a test; it passes here. review: no blocking finding; whole diff read (12 lines in one test). The fused v_fma_f32 control leaves the non-fused program and runs as a program of its own, on the same inputs and options, with both of its expectations (overflow 0x73FF_FFFF and cancellation 0x2880_0000 staying fused); the non-fused assertions are unchanged. It still fails if the backend stops fusing a lone v_fma_f32, and it no longer gives a driver identical precise products to merge it with, which is the RADV failure the PR describes (#472). This run is NVIDIA only (wave32), where the test passes; RADV, where the old layout failed, is not covered here. No duplicate: #2119 (open) adds a different test after this one without changing it. performance: none (test only). verdict: safe to merge hardware / tool and model: RTX 4070 SUPER 12 GB (621.24 / 32.0.16.2124), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 25H2 26200.9974, Rust 1.100.0, debug / Claude app (Claude Opus 5.5): merge, build and suite run on this PC with git and cargo only; diff review by Claude Opus 5.5.
Foniass commented 2026-12-01 03:56:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:56:07Z.


Triage (#1607) – head bbf6c40

No open or merged PR makes this change; main still runs the v_fma_f32 control in the same program as the non-fused ops. #927 also touches this test, but in a different way: inside a large Intel Arc PR, it loosens the v16 asserts to accept an unfused result. This PR keeps the exact fused values and moves the control into its own program.
No problems found in the diff: the non-fused checks are unchanged and the control's assertions keep their exact values.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300210948 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/676#issuecomment-7300210948). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:56:07Z. --- **Triage (#1607)** – head bbf6c40 No open or merged PR makes this change; main still runs the `v_fma_f32` control in the same program as the non-fused ops. #927 also touches this test, but in a different way: inside a large Intel Arc PR, it loosens the v16 asserts to accept an unfused result. This PR keeps the exact fused values and moves the control into its own program. No problems found in the diff: the non-fused checks are unchanged and the control's assertions keep their exact values. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/676:upstream-pr/676'
git switch 'upstream-pr/676'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/676'
git switch 'upstream-pr/676'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/676'
git switch 'upstream-pr/676'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/676'
git switch 'main'
git merge --squash 'upstream-pr/676'
git switch 'main'
git merge --ff-only 'upstream-pr/676'
git switch 'main'
git merge 'upstream-pr/676'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!671
No description provided.