Repository navigation
Conversation
valu_fuzz_backends_agree runs every VOP3 / VOP3P VALU instruction of the RDNA2 table alone in a wave64 kernel, on 64 lanes x 4 rounds of edge and pseudo-random inputs, through the HLSL and the direct-DXIL backends, and reports where they differ (with each case's sources). With XCL_FUZZ_DIR it writes the results per adapter, and valu_fuzz_compare reports what differs between adapters. Both are #[ignore]d (GPU minutes) and skip without a GPU. Assisted-by: Claude Code (Claude Opus 5.5)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Fuzzer run on NVIDIA (listed as untested) and on an RX 9070 XT, at head Tested (debug, Windows 11 Pro 26200,
I have the two per-adapter Not tested: |
|
Independent RDNA2 run of the ignored VALU fuzzer on exact PR head Environment: Windows 11 build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver
The default run reproduced #2168's six differences with the same counts: I reran only those eight FMA instructions immediately afterward: 0/8 differed without All four ignored-test invocations completed with 1 test passed, 0 failed, 0 ignored. That test status means the fuzzer completed; it does not mean the backend outputs matched. I did not run the full workspace suite, a retail title, or a cross-device comparison on this PR head. Local logs and TSV outputs are preserved; no game data was used or uploaded. AI use: OpenAI Codex ran and repeated the comparisons, checked the exact revision and logs, and prepared this report. |
|
Diff audit on Note that |
|
Regression run of Against the limits in CONTRIBUTING.md: 104 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
The HLSL helpers wrote the negation as `-x`, which DXC compiles to `fsub -0.0, x`. With no denormal option the driver may flush a denormal there, and NVIDIA does: v_cubetc_f32 returned ±0 for a denormal source on an RTX 3070, where the direct backend (`fneg`) returns the negated denormal. The VALU fuzzer of xcl-dev#2169 found 58 of 256 cases; with the sign bit flipped it finds none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both backends negated with `fsub -0.0, x`: the HLSL helpers through `-x`, the direct lowering through `fneg`. With no denormal option a driver may flush a denormal there. NVIDIA does on the HLSL path (v_cubetc_f32 returned ±0 for a denormal source on an RTX 3070), and RADV under vkd3d-proton does on the direct path (reported on xcl-dev#2348). Both now flip the sign bit, as the direct backend's directed-rounding path already does for source modifiers (`fsrc_bits`). The VALU fuzzer of xcl-dev#2169 found 58 of 256 cases differing between the backends on NVIDIA; with this change it finds none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Both backends negated with `fsub -0.0, x`: the HLSL helpers through `-x`, the direct lowering through `fneg`. With no denormal option a driver may flush a denormal there. NVIDIA does on the HLSL path (v_cubetc_f32 returned ±0 for a denormal source on an RTX 3070), and RADV under vkd3d-proton does on the direct path (reported on xcl-dev#2348). Both now flip the sign bit, as the direct backend's directed-rounding path already does for source modifiers (`fsrc_bits`). The VALU fuzzer of xcl-dev#2169 found 58 of 256 cases differing between the backends on NVIDIA; with this change it finds none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds
valu_fuzz_backends_agree. It runs every VOP3 / VOP3P VALU instruction of the RDNA2 table alone in a wave64 kernel, on 64 lanes × 4 rounds of edge and pseudo-random inputs (signed zeros, denormals, infinities, NaNs, integer and f16 edges), through both backends (HLSL + DXC, direct DXIL). It reports every instruction whose results differ between them, with the sources of each case. WithXCL_FUZZ_DIRset, it writes the results per adapter.valu_fuzz_comparethen reports what differs between adapters (run once perXCL_ADAPTER). Both tests are#[ignore]d because they take a minute or two of GPU time, not to hide a failure, and skip without a GPU. A port of the fuzzer behind Marvisak/VIctory#1614 (same author), whose findings include the shared-dword i64 compare that 5195e27 also handles.Findings so far: #2168 (the HLSL backend's fast-math, and v_dot2_f32_f16 between RDNA4 and RDNA2).
What is in it
crates/xcl/src/gpu/recomp/valu_fuzz_tests.rs: the generator, the per-backend runs, the per-adapter files and the comparison.crates/xcl/src/gpu/recomp/mod.rs: one#[cfg(test)] mod valu_fuzz_tests;line. Test-only, so this asks for thetest-onlylabel.Tested
cargo test --workspace -- --test-threads=4on this branch, RX 9070: 1152 passed, 2 failed, 48 ignored. The 2 failures arefuzz_validate_and_gpu_1/_3(seeds 722 / 1599), which fail onmaintoo on this card. The 2 extra ignored tests are the new ones. 81 tests SKIPPED by validator 1.7, plus 9 others, as onmain.valu_fuzz_backends_agreeon each AMD adapter: 341 instructions, 333 compared on both backends, 6 differ (the issue above), 8 refused by both backends (the f64 div helpers,v_qsad/v_mqsad,v_mullit_f32,v_cvt_off_f32_i4). Rerun of those 6 withXCL_FUZZ_DXC_GIS=1(XCL_FUZZ_OPSset to them, RX 9070): 0 differ.valu_fuzz_compareover the two adapters: onlyv_dot2_f32_f16differs (7 of 256, on both backends).Regression run
scripts/smoke.ps1printed them:mainat568e7db7and this PR's heade792e6b2, same title and time, on an AMD Radeon RX 9070 (32.0.32029.2010). The PR's run shows 104 % ofmain's frames and 100 % of its peak commit, with no crash and no device removal. The change is test-only (an#[ignore]d test and one#[cfg(test)]line), so the title does not reach it.Not tested
cargo test --workspace -- --test-threads=4at this head onmain568e7db, RX 9070: 1152 passed, 2 failed (seeds 722 / 1599, as onmain), 48 ignored, 90 SKIPPED.)AI use
🤖 Generated with Claude Code