Tests: verify direct DXIL vs HLSL GPU parity for wide, paired, d16, and ADDTID LDS ops #2093

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

@⁠ramon-victor on GitHub · 2026-11-25 03:51 UTC · original
ramon-victor:tests/gpu-dxil-lds-wide-d16-parity → main · +321 −0 · 1 files · 1 commits · open

Add GPU differential parity tests between the direct RDNA2 → DXIL translator (xcl::gpu::dxil::kernel::translate, validated with dxil.dll) and the HLSL + DXC path (xcl::gpu::recomp) for lower_mem.rs LDS wide, paired/ST64, sub-dword/D16, and ADDTID load/store instructions across wave32 and wave64 (split wave64 on wave32-only GPUs). Test-only change; no runtime files modified.

What is in it

  • crates/xcl/tests/gpu_dxil_lds_wide_d16_parity.rs:
    • direct_dxil_lds_wide_64_96_128_parity: DS_WRITE_B64/B96/B128 + S_BARRIER + cross-lane DS_READ_B64/B96/B128 with OFFSET1 and V_CMPX_GT_U32 inactive-lane EXEC masking.
    • direct_dxil_lds_two_address_and_st64_parity: DS_WRITE2_B32/DS_READ2_B32 (including VDST == ADDR register overlap), DS_WRITE2_B64/DS_READ2_B64, DS_WRITE2ST64_B32/DS_READ2ST64_B32 (256-byte stride), and DS_WRITE2ST64_B64/DS_READ2ST64_B64 (512-byte stride).
    • direct_dxil_lds_subdword_and_d16_parity: DS_WRITE_B8, DS_WRITE_B8_D16_HI, DS_WRITE_B16, DS_WRITE_B16_D16_HI across neighbouring lanes sharing dwords, read back with DS_READ_{U8,I8,U16,I16} and all six DS_READ_{U8,I8,U16}_D16{,_HI} variants preserving the untouched 16-bit half of VDST.
    • direct_dxil_lds_addtid_and_exec_mask_parity: DS_READ_ADDTID_B32 and DS_WRITE_ADDTID_B32 addressing via M0[15:0] + offset + 4*lane (with non-zero high half in M0) and EXEC-masked even-lane updates.

Tested

  • Hardware: NVIDIA GeForce RTX 3070 (8 GiB, driver 621.24, wave32), AMD Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.99.0 (x86_64-pc-windows-msvc), DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), debug build.
  • cargo test -p xcl --test gpu_dxil_lds_wide_d16_parity -- --nocapture: 4 passed, 0 failed, 0 ignored (0 SKIPPED; each test ran both wave32 and split wave64 through both Direct DXIL and HLSL+DXC).
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4) on head 5e4d004: 1158 passed, 0 failed, 46 ignored (24 SKIPPED GPU tests: 20 no wave64, 3 per-lane form #1426, 1 no heap windows).

Not tested

  • Native 64-lane hardware wave64 (AMD RDNA2/3/4) — RTX 3070 only supports 32-lane waves, so wave64 ran in split-wave64 mode.
  • Release build and retail game titles (test-only PR, no runtime changes).

AI use

  • Antigravity (Google DeepMind; Gemini frontier model — exact minor version not exposed to the agent): wrote the integration test file, ran the full test suite on the RTX 3070, and drafted this PR description.
**@⁠ramon-victor** on GitHub · 2026-11-25 03:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/2093) `ramon-victor:tests/gpu-dxil-lds-wide-d16-parity` → `main` · +321 −0 · 1 files · 1 commits · open Add GPU differential parity tests between the direct RDNA2 → DXIL translator (`xcl::gpu::dxil::kernel::translate`, validated with `dxil.dll`) and the HLSL + DXC path (`xcl::gpu::recomp`) for `lower_mem.rs` LDS wide, paired/ST64, sub-dword/`D16`, and `ADDTID` load/store instructions across wave32 and wave64 (split wave64 on wave32-only GPUs). Test-only change; no runtime files modified. **What is in it** - `crates/xcl/tests/gpu_dxil_lds_wide_d16_parity.rs`: - `direct_dxil_lds_wide_64_96_128_parity`: `DS_WRITE_B64`/`B96`/`B128` + `S_BARRIER` + cross-lane `DS_READ_B64`/`B96`/`B128` with `OFFSET1` and `V_CMPX_GT_U32` inactive-lane `EXEC` masking. - `direct_dxil_lds_two_address_and_st64_parity`: `DS_WRITE2_B32`/`DS_READ2_B32` (including `VDST == ADDR` register overlap), `DS_WRITE2_B64`/`DS_READ2_B64`, `DS_WRITE2ST64_B32`/`DS_READ2ST64_B32` (256-byte stride), and `DS_WRITE2ST64_B64`/`DS_READ2ST64_B64` (512-byte stride). - `direct_dxil_lds_subdword_and_d16_parity`: `DS_WRITE_B8`, `DS_WRITE_B8_D16_HI`, `DS_WRITE_B16`, `DS_WRITE_B16_D16_HI` across neighbouring lanes sharing dwords, read back with `DS_READ_{U8,I8,U16,I16}` and all six `DS_READ_{U8,I8,U16}_D16{,_HI}` variants preserving the untouched 16-bit half of `VDST`. - `direct_dxil_lds_addtid_and_exec_mask_parity`: `DS_READ_ADDTID_B32` and `DS_WRITE_ADDTID_B32` addressing via `M0[15:0] + offset + 4*lane` (with non-zero high half in `M0`) and `EXEC`-masked even-lane updates. **Tested** - Hardware: NVIDIA GeForce RTX 3070 (8 GiB, driver 621.24, wave32), AMD Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.99.0 (`x86_64-pc-windows-msvc`), DXC 1.8.2502.11 (Windows SDK 10.0.26100.0), debug build. - `cargo test -p xcl --test gpu_dxil_lds_wide_d16_parity -- --nocapture`: 4 passed, 0 failed, 0 ignored (0 SKIPPED; each test ran both wave32 and split wave64 through both Direct DXIL and HLSL+DXC). - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`) on head `5e4d004`: 1158 passed, 0 failed, 46 ignored (24 SKIPPED GPU tests: 20 `no wave64`, 3 `per-lane form` `#1426`, 1 `no heap windows`). **Not tested** - Native 64-lane hardware wave64 (AMD RDNA2/3/4) — RTX 3070 only supports 32-lane waves, so wave64 ran in split-wave64 mode. - Release build and retail game titles (test-only PR, no runtime changes). **AI use** - Antigravity (Google DeepMind; Gemini frontier model — exact minor version not exposed to the agent): wrote the integration test file, ran the full test suite on the RTX 3070, and drafted this PR description.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:18:32 +00:00
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 04:10 UTC · original

Arc A770 test report for XCL PR #2093

Tested

  • PR #2093 was open at 5e4d004939bee3aefe9079d5994c590a7920e17c before and after the run. The existing checkout was clean and detached at that commit. The live discussion contained zero comments or reviews before and after testing. The PR description records the author's RTX 3070 results.
  • STOR-WINLAB ran Windows 11 Enterprise Evaluation build 26200.9974, with an AMD Ryzen 7 3800X (6 cores and 12 logical processors exposed) and an Intel Arc A770 on driver 32.0.101.9175. Rust and Cargo were 1.100.0 on x86_64-pc-windows-msvc. The test logged dxcompiler and dxil 1.9.2609.5 loaded from %LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64.
  • Prebuilt outside the Arc mutex with cargo test --locked -p xcl --test gpu_dxil_lds_wide_d16_parity --no-run. Cargo exited 0 after 36.57 s in the unoptimized test profile. Used CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0, CARGO_TARGET_DIR=L:/XclTooling/pr2014-1c971de6/target, and TEMP and TMP under L:/XclTooling/pr2093/temp.
  • Ran the prebuilt executable from the crates/xcl package directory with XCL_ADAPTER=A770 and XCL_DXC_DIR set to the DXC directory above. The mutex wrapper ran in a local PowerShell.exe -NoProfile -ExecutionPolicy RemoteSigned child. The callback launched the executable via System.Diagnostics.Process with these exact arguments and recorded its stdout, stderr, and exit code separately.
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test {
    & 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/d3d638d6f97ebe8d/out/gpu_dxil_lds_wide_d16_parity-d3d638d6f97ebe8d.exe' direct_dxil_lds_subdword_and_d16_parity --exact --nocapture --test-threads=1
}
  • 1 passed, 0 failed, 0 ignored, 0 GPU skips, 3 filtered out in 1.54 s. The test and mutex wrapper both exited 0. The wrapper recorded the mutex release at 04:09:38 UTC. The Cargo target slot was released after the run.

The fixture validated the direct DXIL and compiled the HLSL reference with DXC for main at cs_6_6. Both backends dispatched and matched bit for bit in VGPRs v10–v21 for every lane of logical wave32 and split logical wave64, accounting for 384 and 768 compared output words, respectively. The split mode follows from the checked-in fixture's mode selection and the A770 capability recorded on STOR-WINLAB (D3D12 wave lane range 8–32).

Expected-value checks also passed. Neighboring lanes packed four bytes or two halfwords per LDS dword using DS_WRITE_B8, DS_WRITE_B16, and their D16_HI forms. Readback checked that the high-input forms selected the source bits starting at bit 16, and that U8/I8 and U16/I16 reads zero-extended or sign-extended across the sign boundary at lane 8. All six U8, I8, and U16 D16/D16_HI reads preserved the other half of the seeded destination 0x5A5A1234. The I8 D16 forms sign-extended to 16 bits before inserting the result.

Not tested

The three other fixtures in this integration target, the workspace suite, retail-title smoke, native hardware wave64, other adapters and drivers, and release builds.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the checked-in fixture, verified the live PR and logs, and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 04:10 UTC · [original](https://github.com/xcl-dev/xcl/pull/2093#issuecomment-7152605828) # Arc A770 test report for XCL PR #2093 ## Tested - [PR #2093](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2093) was open at `5e4d004939bee3aefe9079d5994c590a7920e17c` before and after the run. The existing checkout was clean and detached at that commit. The live discussion contained zero comments or reviews before and after testing. The PR description records the author's RTX 3070 results. - STOR-WINLAB ran Windows 11 Enterprise Evaluation build 26200.9974, with an AMD Ryzen 7 3800X (6 cores and 12 logical processors exposed) and an Intel Arc A770 on driver 32.0.101.9175. Rust and Cargo were 1.100.0 on `x86_64-pc-windows-msvc`. The test logged `dxcompiler` and `dxil` 1.9.2609.5 loaded from `%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64`. - Prebuilt outside the Arc mutex with `cargo test --locked -p xcl --test gpu_dxil_lds_wide_d16_parity --no-run`. Cargo exited 0 after 36.57 s in the unoptimized test profile. Used `CARGO_BUILD_JOBS=2`, `CARGO_INCREMENTAL=0`, `CARGO_PROFILE_DEV_DEBUG=0`, `CARGO_PROFILE_TEST_DEBUG=0`, `CARGO_TARGET_DIR=L:/XclTooling/pr2014-1c971de6/target`, and `TEMP` and `TMP` under `L:/XclTooling/pr2093/temp`. - Ran the prebuilt executable from the `crates/xcl` package directory with `XCL_ADAPTER=A770` and `XCL_DXC_DIR` set to the DXC directory above. The mutex wrapper ran in a local `PowerShell.exe -NoProfile -ExecutionPolicy RemoteSigned` child. The callback launched the executable via `System.Diagnostics.Process` with these exact arguments and recorded its stdout, stderr, and exit code separately. ```powershell & 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & 'L:/XclTooling/pr2014-1c971de6/target/debug/build/xcl/d3d638d6f97ebe8d/out/gpu_dxil_lds_wide_d16_parity-d3d638d6f97ebe8d.exe' direct_dxil_lds_subdword_and_d16_parity --exact --nocapture --test-threads=1 } ``` - **1 passed, 0 failed, 0 ignored, 0 GPU skips, 3 filtered out** in 1.54 s. The test and mutex wrapper both exited 0. The wrapper recorded the mutex release at 04:09:38 UTC. The Cargo target slot was released after the run. The fixture validated the direct DXIL and compiled the HLSL reference with DXC for `main` at `cs_6_6`. Both backends dispatched and matched bit for bit in VGPRs v10–v21 for every lane of logical wave32 and split logical wave64, accounting for 384 and 768 compared output words, respectively. The split mode follows from the checked-in fixture's mode selection and the A770 capability recorded on STOR-WINLAB (D3D12 wave lane range 8–32). Expected-value checks also passed. Neighboring lanes packed four bytes or two halfwords per LDS dword using `DS_WRITE_B8`, `DS_WRITE_B16`, and their `D16_HI` forms. Readback checked that the high-input forms selected the source bits starting at bit 16, and that U8/I8 and U16/I16 reads zero-extended or sign-extended across the sign boundary at lane 8. All six U8, I8, and U16 D16/D16_HI reads preserved the other half of the seeded destination `0x5A5A1234`. The I8 D16 forms sign-extended to 16 bits before inserting the result. ## Not tested The three other fixtures in this integration target, the workspace suite, retail-title smoke, native hardware wave64, other adapters and drivers, and release builds. ## AI use T3 Code / Codex (gpt-6.2-sol) ran the checked-in fixture, verified the live PR and logs, and wrote this report.
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-25 04:25 UTC · original

Native 64-lane wave64 run on AMD, which this PR lists as not tested (the RTX 3070 ran wave64 split; the other report here is Arc).

Tested: pass, head 5e4d004 applied on its base main cbc296a, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. cargo test -p xcl --test gpu_dxil_lds_wide_d16_parity -- --test-threads=4 with XCL_ADAPTER set to each GPU:

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

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

**@⁠DarkPanda69** on GitHub · 2026-11-25 04:25 UTC · [original](https://github.com/xcl-dev/xcl/pull/2093#issuecomment-7152823311) Native 64-lane wave64 run on AMD, which this PR lists as not tested (the RTX 3070 ran wave64 split; the other report here is Arc). **Tested:** pass, head `5e4d004` applied on its base `main` `cbc296a`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --test gpu_dxil_lds_wide_d16_parity -- --test-threads=4` with `XCL_ADAPTER` set to each GPU: - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 4 passed, 0 failed, 0 SKIPPED. - NVIDIA RTX 3060, driver 32.0.16.1088: 4 passed, 0 failed, 0 SKIPPED. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-25 05:26 UTC · original

A run with vkd3d-proton as the host D3D12, so both the direct DXIL and the HLSL → DXC output go through dxil-spirv and the NVIDIA Vulkan driver: all 4 parity tests pass, none skipped.

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 #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 5e4d004 as it is (merge base with main cbc296a), no uncommitted changes. The gpu_dxil_lds_wide_d16_parity test binary runs under Wine, one test per process.
    • direct_dxil_lds_addtid_and_exec_mask_parity: ok
    • direct_dxil_lds_subdword_and_d16_parity: ok
    • direct_dxil_lds_two_address_and_st64_parity: ok
    • direct_dxil_lds_wide_64_96_128_parity: ok

Not tested

  • wave64 forms (this GPU has 32-lane waves only), the whole suite on this head, native Windows, AMD.

AI use

  • Claude Code (Claude Opus 5.5) built the commit, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-25 05:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/2093#issuecomment-7153766837) A run with vkd3d-proton as the host D3D12, so both the direct DXIL and the HLSL → DXC output go through dxil-spirv and the NVIDIA Vulkan driver: all 4 parity tests pass, none skipped. **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 #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `5e4d004` as it is (merge base with `main` `cbc296a`), no uncommitted changes. The `gpu_dxil_lds_wide_d16_parity` test binary runs under Wine, one test per process. - `direct_dxil_lds_addtid_and_exec_mask_parity`: ok - `direct_dxil_lds_subdword_and_d16_parity`: ok - `direct_dxil_lds_two_address_and_st64_parity`: ok - `direct_dxil_lds_wide_64_96_128_parity`: ok **Not tested** - wave64 forms (this GPU has 32-lane waves only), the whole suite on this head, native Windows, AMD. **AI use** - Claude Code (Claude Opus 5.5) built the commit, ran the tests and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 05:43 UTC · original

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

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 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 05:43 UTC · [original](https://github.com/xcl-dev/xcl/pull/2093#issuecomment-7154081042) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
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/2093/head:github-bot/gh-2093'
git switch 'github-bot/gh-2093'

Merge

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