Tests: verify direct DXIL vs HLSL parity for VOP3P, movrel, and 64-bit VALU #1823

Open
github-bot wants to merge 1 commit from github-bot/gh-1823 into main AGit
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-24 21:22 UTC · original
Ctrl-Alt-Haze:tests/direct-dxil-wide-and-movrel-parity → main · +252 −0 · 1 files · 1 commits · open

Add GPU differential parity tests between the direct RDNA2 -> DXIL translator (gpu::dxil::kernel::translate_full) and the HLSL + DXC path (gpu::recomp::translate + dxc::compile) for lower_wide instructions (VOP3P packed integer/dot ops, movrel/swaprel, and 64-bit integer / f64 VALU). Test-only change; no runtime files modified.

What is in it

  • crates/xcl/tests/gpu_dxil_wide_parity.rs:
    • direct_dxil_vop3p_packed_int_and_dot_parity: v_pk_add/sub/mad/mul_lo/lshlrev/lshrrev/ashrrev/min/max (u16/i16, wrapping & CLAMP, OP_SEL/OP_SEL_HI) and v_dot4_i32_i8/u8, v_dot4c_i32_i8, v_dot8_i32_i4/u4, v_dot2_i32_i16/u16, and exact-input v_dot2_f32_f16.
    • direct_dxil_movrel_and_swaprel_parity: v_movrels_b32, v_movreld_b32, v_movrelsd_b32, v_movrelsd_2_b32, and v_swaprel_b32 with dynamic/divergent EXEC masks.
    • direct_dxil_valu64_int_and_f64_parity: v_lshlrev_b64, v_lshrrev_b64, v_ashrrev_i64, v_mad_u64_u32 / v_mad_i64_i32 (with carry masks), v_cmp_*_u64/i64/f64, and f64 arithmetic / rounding / conversion ops (v_add_f64, v_mul_f64, v_fma_f64, v_min_f64, v_max_f64, v_floor_f64, v_ceil_f64, v_fract_f64, v_rndne_f64, v_cvt_f32_f64, v_cvt_f64_f32).
    • Validates every direct DXIL module with dxil::validate::validate and executes all runnable wave configurations (split-w64 + wave32 on Wave32 GPUs; native-w64 on Wave64 GPUs).

Tested

  • hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2135, Wave32), AMD Ryzen 9 5950X, Windows 11 Build 26340, rustc 1.99.1 (58cf8f9c3 2026-10-13), DXC 1.8.2502.11, debug, synthetic tests only (no game files).
  • cargo test -p xcl --test gpu_dxil_wide_parity -- --nocapture: 3 passed, 0 failed, 0 ignored (ran both split-w64 and wave32 on RTX 5070 Ti).
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 895 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 2 (no wave64) — gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware; 1 (no heap windows) — heap_window_out_of_memory_falls_back_to_the_switch_form).

Not tested

  • native-w64 execution path (RTX 5070 Ti supports Wave32 / split-Wave64 only; native Wave64 was skipped by configs()).
  • Retail game packs (XCL_SAMPLE_* variables unset).

AI use

  • Antigravity (Google DeepMind; exact model version not exposed to agent) wrote crates/xcl/tests/gpu_dxil_wide_parity.rs and ran the test suite.
**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-24 21:22 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823) `Ctrl-Alt-Haze:tests/direct-dxil-wide-and-movrel-parity` → `main` · +252 −0 · 1 files · 1 commits · open Add GPU differential parity tests between the direct RDNA2 -> DXIL translator (`gpu::dxil::kernel::translate_full`) and the HLSL + DXC path (`gpu::recomp::translate` + `dxc::compile`) for `lower_wide` instructions (`VOP3P` packed integer/dot ops, `movrel`/`swaprel`, and 64-bit integer / `f64` VALU). Test-only change; no runtime files modified. **What is in it** - `crates/xcl/tests/gpu_dxil_wide_parity.rs`: - `direct_dxil_vop3p_packed_int_and_dot_parity`: `v_pk_add/sub/mad/mul_lo/lshlrev/lshrrev/ashrrev/min/max` (`u16`/`i16`, wrapping & `CLAMP`, `OP_SEL`/`OP_SEL_HI`) and `v_dot4_i32_i8`/`u8`, `v_dot4c_i32_i8`, `v_dot8_i32_i4`/`u4`, `v_dot2_i32_i16`/`u16`, and exact-input `v_dot2_f32_f16`. - `direct_dxil_movrel_and_swaprel_parity`: `v_movrels_b32`, `v_movreld_b32`, `v_movrelsd_b32`, `v_movrelsd_2_b32`, and `v_swaprel_b32` with dynamic/divergent `EXEC` masks. - `direct_dxil_valu64_int_and_f64_parity`: `v_lshlrev_b64`, `v_lshrrev_b64`, `v_ashrrev_i64`, `v_mad_u64_u32` / `v_mad_i64_i32` (with carry masks), `v_cmp_*_u64`/`i64`/`f64`, and `f64` arithmetic / rounding / conversion ops (`v_add_f64`, `v_mul_f64`, `v_fma_f64`, `v_min_f64`, `v_max_f64`, `v_floor_f64`, `v_ceil_f64`, `v_fract_f64`, `v_rndne_f64`, `v_cvt_f32_f64`, `v_cvt_f64_f32`). - Validates every direct DXIL module with `dxil::validate::validate` and executes all runnable wave configurations (`split-w64` + `wave32` on Wave32 GPUs; `native-w64` on Wave64 GPUs). **Tested** - hardware (GPU + driver, CPU), Rust version, debug / release: NVIDIA GeForce RTX 5070 Ti (driver 32.0.16.2135, Wave32), AMD Ryzen 9 5950X, Windows 11 Build 26340, `rustc 1.99.1 (58cf8f9c3 2026-10-13)`, DXC `1.8.2502.11`, debug, synthetic tests only (no game files). - `cargo test -p xcl --test gpu_dxil_wide_parity -- --nocapture`: 3 passed, 0 failed, 0 ignored (ran both `split-w64` and `wave32` on RTX 5070 Ti). - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 895 passed, 0 failed, 42 ignored (SKIPPED GPU tests: `2 (no wave64)` — `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware`; `1 (no heap windows)` — `heap_window_out_of_memory_falls_back_to_the_switch_form`). **Not tested** - `native-w64` execution path (RTX 5070 Ti supports Wave32 / split-Wave64 only; native Wave64 was skipped by `configs()`). - Retail game packs (`XCL_SAMPLE_*` variables unset). **AI use** - Antigravity (Google DeepMind; exact model version not exposed to agent) wrote `crates/xcl/tests/gpu_dxil_wide_parity.rs` and ran the test suite.
Adds integration tests comparing direct RDNA2 -> DXIL lowering (`gpu::dxil::kernel::translate_full`)
against HLSL + DXC (`recomp::translate` + `dxc::compile`) on the GPU for VOP3P packed integer /
dot-product instructions, relative VGPR moves (`movrel` / `swaprel`) under divergent EXEC, and
64-bit integer / f64 VALU instructions.

Verified on NVIDIA GeForce RTX 5070 Ti (split-w64 and wave32): 895 passed, 0 failed, 42 ignored.

Assisted-by: Antigravity (Google DeepMind; exact model version not exposed to agent)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:06:26 +00:00
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-24 21:36 UTC · original

AMD run with native 64-lane waves, so the native-w64 configuration that configs() skipped on the RTX 5070 Ti runs here.

Tested: pass, head 2d86fe2 applied on its base main c4d37be, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.
cargo test -p xcl --test gpu_dxil_wide_parity -- --test-threads=4:

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 3 passed, 0 failed, 0 SKIPPED (direct_dxil_vop3p_packed_int_and_dot_parity, direct_dxil_movrel_and_swaprel_parity, direct_dxil_valu64_int_and_f64_parity).
  • NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 3 passed, 0 failed, 0 SKIPPED.

cargo test -p xcl --lib -- gpu::recomp --test-threads=4 with this PR applied: RX 9070 XT 261 passed, 0 failed, 18 ignored; RTX 3060 261 passed, 0 failed, 18 ignored (the SKIPPED lines on both are the same as on main).

Not tested: Intel; the whole workspace suite.

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

**@⁠DarkPanda69** on GitHub · 2026-11-24 21:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823#issuecomment-7145147833) AMD run with native 64-lane waves, so the `native-w64` configuration that `configs()` skipped on the RTX 5070 Ti runs here. **Tested:** pass, head `2d86fe2` applied on its base `main` `c4d37be`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --test gpu_dxil_wide_parity -- --test-threads=4`: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 3 passed, 0 failed, 0 SKIPPED (`direct_dxil_vop3p_packed_int_and_dot_parity`, `direct_dxil_movrel_and_swaprel_parity`, `direct_dxil_valu64_int_and_f64_parity`). - NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 3 passed, 0 failed, 0 SKIPPED. `cargo test -p xcl --lib -- gpu::recomp --test-threads=4` with this PR applied: RX 9070 XT 261 passed, 0 failed, 18 ignored; RTX 3060 261 passed, 0 failed, 18 ignored (the SKIPPED lines on both are the same as on `main`). **Not tested:** Intel; the whole workspace suite. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠upipibi on GitHub · 2026-11-24 21:41 UTC · original

Same on Ampere: RTX 3070 8 GB (32-lane waves, so split-w64 and wave32 run, native-w64 skips), driver 616.56, Windows 11, debug, 2d86fe2 merged onto main 1d027e5. cargo test -p xcl --test gpu_dxil_wide_parity: 3 passed, 0 failed, in 2 of 2 runs.

AI-assisted (Claude Code). Synthetic tests only.

**@⁠upipibi** on GitHub · 2026-11-24 21:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823#issuecomment-7145263756) Same on Ampere: RTX 3070 8 GB (32-lane waves, so `split-w64` and `wave32` run, `native-w64` skips), driver 616.56, Windows 11, debug, `2d86fe2` merged onto `main` `1d027e5`. `cargo test -p xcl --test gpu_dxil_wide_parity`: 3 passed, 0 failed, in 2 of 2 runs. AI-assisted (Claude Code). Synthetic tests only.
Author
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-24 22:15 UTC · original

Thanks @⁠DarkPanda69 (RX 9070 XT native-w64 + RTX 3060) and @⁠upipibi (RTX 3070) for testing 2d86fe2 and confirming all 3 wide-parity tests pass!

**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-24 22:15 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823#issuecomment-7146011720) Thanks @⁠DarkPanda69 (RX 9070 XT `native-w64` + RTX 3060) and @⁠upipibi (RTX 3070) for testing `2d86fe2` and confirming all 3 wide-parity tests pass!
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 00:39 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 00:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823#issuecomment-7148743300) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
Author
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-25 00:55 UTC · original

@⁠DavidM1911 Thanks for verifying 2d86fe2 merged with current main on RTX 3060 Ti!

**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-25 00:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823#issuecomment-7149034722) @⁠DavidM1911 Thanks for verifying `2d86fe2` merged with current `main` on RTX 3060 Ti!
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:27 UTC · original

Tested

PR #1823 was open at 2d86fe232f074e0c19bb4cc46233c9c2d57d757f before and after the run. The existing STOR-WINLAB worktree was clean and detached at that exact commit.

  • Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, and Intel Arc A770 (driver 32.0.101.9175). Debug test profile with debug info disabled. Rust 1.100.0 (0ef1bc386, x86_64-pc-windows-msvc) and Cargo 1.100.0. The test loaded DXC and DXIL 1.9.2609.5 from %LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64 via XCL_DXC_DIR. XCL_ADAPTER=A770.
  • CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0. Cargo used L:/XclTooling/pr1947-1831ec4-t3-97236edf/target. TEMP and TMP were L:/XclTooling/pr1823/temp.
cargo test --locked -p xcl --test gpu_dxil_wide_parity --no-run --message-format=json
$fixtureExe = 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target/debug/build/xcl/6043573efe2f2b4d/out/gpu_dxil_wide_parity-6043573efe2f2b4d.exe'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $fixtureExe --exact direct_dxil_vop3p_packed_int_and_dot_parity --nocapture --test-threads=1 }

Prebuild outside the mutex exited 0. The filtered binary ran under the Arc mutex in a fresh PowerShell with process-scoped RemoteSigned. The wrapper released the mutex and exited 0. 1 passed, 0 failed, 0 ignored, 0 explicit SKIPPED lines, 2 filtered out (1.43 s).

split-w64 (64 logical lanes) and wave32 (32 lanes) passed. The fixture validated direct DXIL and matched the HLSL/DXC readback across 22 VGPRs per lane. The wave branches follow from the checked-in configs() gates and the existing same-host A770 D3D12 capability log (wave lanes 8–32). The gate omitted native-w64 without emitting a test skip.

Not tested

native-w64, the movrel/swaprel and 64-bit VALU fixtures, fuzzing, the workspace suite, retail games, and other adapters.

AI use

T3 Code / Codex gpt-6.2-sol ran the fixture and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:27 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823#issuecomment-7151935626) **Tested** PR #1823 was open at `2d86fe232f074e0c19bb4cc46233c9c2d57d757f` before and after the run. The existing STOR-WINLAB worktree was clean and detached at that exact commit. - Windows 11 Enterprise Evaluation 26200.9974, AMD Ryzen 7 3800X, and Intel Arc A770 (driver 32.0.101.9175). Debug test profile with debug info disabled. Rust 1.100.0 (`0ef1bc386`, `x86_64-pc-windows-msvc`) and Cargo 1.100.0. The test loaded DXC and DXIL 1.9.2609.5 from `%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64` via `XCL_DXC_DIR`. `XCL_ADAPTER=A770`. - `CARGO_BUILD_JOBS=2`, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`. Cargo used `L:/XclTooling/pr1947-1831ec4-t3-97236edf/target`. `TEMP` and `TMP` were `L:/XclTooling/pr1823/temp`. ```powershell cargo test --locked -p xcl --test gpu_dxil_wide_parity --no-run --message-format=json $fixtureExe = 'L:/XclTooling/pr1947-1831ec4-t3-97236edf/target/debug/build/xcl/6043573efe2f2b4d/out/gpu_dxil_wide_parity-6043573efe2f2b4d.exe' & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & $fixtureExe --exact direct_dxil_vop3p_packed_int_and_dot_parity --nocapture --test-threads=1 } ``` Prebuild outside the mutex exited 0. The filtered binary ran under the Arc mutex in a fresh PowerShell with process-scoped `RemoteSigned`. The wrapper released the mutex and exited 0. **1 passed, 0 failed, 0 ignored, 0 explicit `SKIPPED` lines, 2 filtered out** (1.43 s). `split-w64` (64 logical lanes) and `wave32` (32 lanes) passed. The fixture validated direct DXIL and matched the HLSL/DXC readback across 22 VGPRs per lane. The wave branches follow from the checked-in `configs()` gates and the existing same-host A770 D3D12 capability log (wave lanes 8–32). The gate omitted `native-w64` without emitting a test skip. **Not tested** `native-w64`, the `movrel`/`swaprel` and 64-bit VALU fixtures, fuzzing, the workspace suite, retail games, and other adapters. **AI use** T3 Code / Codex `gpt-6.2-sol` ran the fixture and wrote this report.
Author
Owner

@⁠Ctrl-Alt-Haze on GitHub · 2026-11-25 03:35 UTC · original

@⁠JJAutoCompare Thanks for verifying 2d86fe2 on Intel Arc A770 (direct_dxil_vop3p_packed_int_and_dot_parity passing across split-w64 and wave32)!

**@⁠Ctrl-Alt-Haze** on GitHub · 2026-11-25 03:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1823#issuecomment-7152060316) @⁠JJAutoCompare Thanks for verifying `2d86fe2` on Intel Arc A770 (`direct_dxil_vop3p_packed_int_and_dot_parity` passing across `split-w64` and `wave32`)!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1823/head:github-bot/gh-1823'
git switch 'github-bot/gh-1823'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1823'
git switch 'github-bot/gh-1823'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1823'
git switch 'github-bot/gh-1823'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1823'
git switch 'main'
git merge --squash 'github-bot/gh-1823'
git switch 'main'
git merge --ff-only 'github-bot/gh-1823'
git switch 'main'
git merge 'github-bot/gh-1823'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.