Skip to content

Recompiler tests: compare FMA modifiers against Scarlett Layer - #1100

Open
akimfomin wants to merge 1 commit into
xcl-dev:mainfrom
akimfomin:portbridge/scarlett-fma-oracle
Open

akimfomin wants to merge 1 commit into
xcl-dev:mainfrom
akimfomin:portbridge/scarlett-fma-oracle

Conversation

@akimfomin

@akimfomin akimfomin commented Nov 24, 2026 •

Copy link
Copy Markdown

PortBridge connected Scarlett Layer's synthetic case 02 with XCL's FMA tests. This test checks all 64 inputs with abs, neg and clamp together, plus a plain FMA control. PortBridge tracks both projects.

Update at 1b3fbc4

Rebased onto 930e8b49 and kept both the upstream structured-loop test and the original FMA fixture. The focused FMA check passed again on the exact published head on the RTX 4070 Ti SUPER in Wave32 and split Wave64, with no skips. The locked build passed. The workspace run on the identical source tree reported 752 passed, 0 failed and 41 ignored, with four runtime skips (two native Wave64 checks and two checks requiring the D3D12 debug layer).

The independent AMD RDNA2 report below covers the earlier c612b626 revision. The Test Lab request tracks native RDNA4 on the current head. Previous tested revision · RDNA4 request

What is in it

  • One GPU test in crates/xcl/src/gpu/recomp/tests.rs using XCL's test harness and GPU availability checks. The test credits the original Scarlett Layer case.

Tested

  • RTX 4070 Ti SUPER (617.14), Intel i5-13600KF, Windows 11 Pro build 28000, Rust 1.100.0 gnullvm, DXC 1.9.2602.17, debug. Tested base 47efa2e with the diff from this PR.

  • cargo test -p xcl --lib gpu_fma_f32_abs_neg_clamp_oracle -- --nocapture: 1 passed. All 64 modified results and 64 plain controls matched within 1e-5 in each of Wave32 and split Wave64.

  • cargo build --offline --locked --workspace and cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored. Two of the reported passes logged SKIPPED because native Wave64 was unavailable: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware. Sample variables were unset.

  • A nonmatching adapter triggered the normal GPU skip path for the added test.

  • On exact head c612b626, the focused test passed on RTX 4070 Ti SUPER without skips. With the fixture and expected outputs unchanged, three local translator controls that omitted abs, neg, or clamp separately each failed GPU readback. The clean head passed again after restoring the translator. The fixture exercises the lower clamp bound.

  • bjarngard independently passed the focused test on AMD RDNA2 in native Wave64 at the same head. AMD report · PortBridge case

Not tested

AI use

  • Codex (GPT-6 family) prepared the test and ran the local checks.

@akimfomin

Copy link
Copy Markdown
Author

This test is ready for review. The one-file diff was checked on the current base, and the local GPU workspace suite completed with zero failures. Could a maintainer approve the pending Windows CI run when convenient? PortBridge found Scarlett Layer’s reference check and coordinated its replay here. The case record links the original result and the exact XCL test for anyone comparing it on another setup.

@bjarngard

bjarngard commented Nov 24, 2026 •

Copy link
Copy Markdown

Test report for head c612b62 (AMD, native wave64)

Tested

  • AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no SKIPPED
  • With XCL_REQUIRE_GPU=wave64: gpu_fma_f32_abs_neg_clamp_oracle passed
  • RTX 5080 (Blackwell, wave32), driver 621.24: full suite 742 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware

Not tested: retail titles, RDNA3/RDNA4.

AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.

Use Scarlett Layer's public case 02 as an input reference for XCL's synthetic regression harness. Check modified and unmodified results across all 64 inputs in native or split waves.
@akimfomin
akimfomin force-pushed the portbridge/scarlett-fma-oracle branch from c612b62 to 1b3fbc4 Compare November 24, 2026 13:48
@Cecerw

Cecerw commented Nov 24, 2026

Copy link
Copy Markdown

Tested on NVIDIA Ampere (32-lane waves, split wave64): passes

Tree Passed Failed Ignored SKIPPED
Head 1b3fbc4 (base 930e8b4) 752 0 41 2 (no wave64)
Head merged into main 930e8b4 752 0 41 2 (no wave64)
  • RTX 3060 Ti 8 GB, driver 32.0.16.1088; i5-14600K; Windows 11 26300.9818; Rust 1.100.0, debug; DXC 1.9.2602.17
  • .\scripts\test.ps1 (cargo test --workspace -- --test-threads=4), no local changes; the merge was done locally, no conflicts
  • gpu_fma_f32_abs_neg_clamp_oracle: ok
  • SKIPPED: the usual two on this adapter (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware)

Not tested: AMD, any title (no smoke run).

AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

@JoaoPauluu

Copy link
Copy Markdown

A run on Linux with vkd3d-proton, where the shaders go through dxil-spirv to Vulkan instead of a Windows driver's DXIL compiler.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 1b3fbc4 as it is (based on 930e8b4), no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact).
  • gpu::recomp::tests::gpu_fma_f32_abs_neg_clamp_oracle: ok, no SKIPPED.

Not tested

  • whether the new tests fail without the change on this stack; the rest of the suite on this head; a retail title; native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built the head, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.

@akimfomin

Copy link
Copy Markdown
Author

@eizispark, your Windows RX 9070 XT report confirmed native Wave64 on the hardware this FMA check needs. Would you try the two synthetic checks at this PR's current head 1b3fbc4bc8c3088e69d78f85a2e73f1cccf4df51 if that setup is available?

PortBridge Test Lab opens the exact revision, instructions and expected output, and can copy the same task to an agent. The earlier AMD run covered RDNA2 at c612b62. For this revision the useful result is native Wave64 with split=false and 64/64 matching FMA values. A skip reason is useful too. A reply here with the toolchain and output is enough.

@PastiiJay

Copy link
Copy Markdown

Native RDNA4 check of exact head 1b3fbc4 (PortBridge #14)

  • GPU: AMD Radeon RX 9070 XT (RDNA4), D3D12, selected explicitly with XCL_ADAPTER=9070 (an NVIDIA adapter is also present)
  • Driver: 32.0.32029.2010
  • Windows 11 Pro 25H2, build 26200.9457
  • Rust 1.98.1 x86_64-pc-windows-msvc, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), debug
  • Commit: akimfomin/xcl 1b3fbc4bc8c3088e69d78f85a2e73f1cccf4df51, --locked

Environment: XCL_REQUIRE_GPU=wave64, XCL_NETWORK=0, XCL_ADAPTER=9070

cargo test -p xcl --lib --locked gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware -- --exact --nocapture
-> ok, 1 passed, no skip

cargo test -p xcl --lib --locked gpu::recomp::tests::gpu_fma_f32_abs_neg_clamp_oracle -- --exact --nocapture
-> ok, 1 passed, no skip
   wave64 split=false: 64/64 modified and plain values agree
   wave32 split=false: 64/64 modified and plain values agree
   wave64 split=true: 64/64 modified and plain values agree

Same results with the default adapter (no XCL_ADAPTER). Control: the wave64-hardware test with XCL_ADAPTER pointed at the NVIDIA card fails as intended ("no wave64, but XCL_REQUIRE_GPU=wave64"), so the requirement was active. Small note: gpu_fma_f32_abs_neg_clamp_oracle still passes on the NVIDIA card under XCL_REQUIRE_GPU=wave64 (it just leaves out the native-wave64 case), so it may be worth making it fail there too. Synthetic inputs only.

@akimfomin

Copy link
Copy Markdown
Author

PastiiJay's PortBridge Test Lab report identified a coverage gap. I reproduced it at the same head 1b3fbc4bc8c3088e69d78f85a2e73f1cccf4df51 using an RTX 4070 Ti SUPER, NVIDIA 617.14, Windows build 28000.3501 and DXC 1.9.2602.17. Both checks used synthetic inputs and XCL_NETWORK=0.

The original FMA test passed even with XCL_REQUIRE_GPU=wave64 on this Wave32-only adapter. Its two available cases gave 64/64 each, and native Wave64 was omitted. The separate hardware probe correctly failed under the same requirement.

I tried this test-only change at the end of gpu_fma_f32_abs_neg_clamp_oracle, using the existing requirement-aware hardware helper:

if wave64_hardware() {
    run_case(true, false);
}
run_case(false, false);
run_case(true, true);

With the change, ordinary mode still passes both 64/64 cases and reports the missing native case. Strict Wave64 fails with the expected no wave64, but XCL_REQUIRE_GPU=wave64. The separate probe behaves as before. The candidate has been run on RTX only. The published branch is unchanged, so PastiiJay's AMD report still covers its exact head.

Codex helped prepare and run this check. PortBridge case and paired test evidence

@PastiiJay

Copy link
Copy Markdown

Thanks @akimfomin for reproducing the gap and following up so quickly, glad the RDNA4 run helped. Happy to run the next AMD check whenever it's useful.

@ivall ivall added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 24, 2026
@DavidM1911

Copy link
Copy Markdown
Contributor

Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

off-goal Does not bear on the current goal (world loading); waits until it is reached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants