Tests: verify RDNA2 DPP16, DPP8, and SDWA VALU/VOPC ops on the GPU #1356

Open
Vadson159 wants to merge 1 commit from upstream-pr/1366 into main
Vadson159 commented 2026-11-24 15:18:11 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Vadson159 on 2026-11-24T15:18:11Z.


Add an integration test suite in crates/xcl/tests/gpu_recomp_dpp_sdwa.rs covering RDNA2 DPP16, DPP8, and SDWA (including VOPC VOP_SDWA_SDST_ENC) translation, DXC compilation, and GPU execution.

What is in it

  • crates/xcl/tests/gpu_recomp_dpp_sdwa.rs (4 tests, 1,117 lines):
    • dpp_sdwa_translate_and_compile_with_dxc: verifies RDNA2 to HLSL translation and DXC compilation for DPP16, DPP8, SDWA, and VOPC SDWA test shaders.
    • gpu_dpp16_controls_masks_and_fetch_inactive: executes DPP16 controls, masks, and fetch-inactive handling on the GPU.
    • gpu_dpp8_permutations_and_fetch_inactive: executes DPP8 permutations and fetch-inactive handling on the GPU.
    • gpu_sdwa_selectors_unused_modifiers_and_vopc: executes SDWA selectors, unused-lane modes, modifiers, and VOPC (VOP_SDWA_SDST_ENC, including verifying wave32 preserves the upper 32 bits 0xDEAD_BEEF of s[10:11] via S_MOV_B32 s16, s11).

Tested

  • Hardware and toolchain: AMD Radeon RX 9070 XT (driver 32.0.32029.2010; AMD Radeon(TM) Graphics driver 32.0.21045.29003 also present), AMD Ryzen 7 9800X3D 8-Core Processor, Microsoft Windows NT 10.0.26300.0, rustc 1.100.0 (0ef1bc386 2026-11-09) (stable-x86_64-pc-windows-msvc), debug build, dxcompiler 1.8.2502.11 (C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64).
  • $env:XCL_REQUIRE_GPU="wave64,mesh"; .\scripts\test.ps1: 755 passed, 0 failed, 41 ignored across 20 test suites, 0 GPU skips (xcl lib: 707 passed, 0 failed, 21 ignored; gpu_recomp_dpp_sdwa: 4 passed, 0 failed, 0 ignored; e2e: 3 passed, 0 failed, 0 ignored; console_shaders: 3 passed, 0 failed, 4 ignored; heap_probe: 0 passed, 0 failed, 4 ignored; xg_oracle: 6 passed, 0 failed, 12 ignored; all XCL_SAMPLE_* unset).
  • $env:XCL_REQUIRE_GPU="wave64,mesh"; cargo test -p xcl --test gpu_recomp_dpp_sdwa: 4 passed, 0 failed, 0 ignored.
  • rustfmt --check H:\XCL_1\crates\xcl\tests\gpu_recomp_dpp_sdwa.rs: passed (exit 0).
  • cargo clippy -p xcl --test gpu_recomp_dpp_sdwa -- --no-deps: 0 warnings in crates/xcl/tests/gpu_recomp_dpp_sdwa.rs.
  • python -m unittest discover -s H:\XCL_1\scripts -p "test_*.py" -v: 9 passed, 0 failed.

Regression run
Not required (changes are confined to crates/xcl/tests/gpu_recomp_dpp_sdwa.rs).

Not tested

  • NVIDIA, Intel, wave32-only GPUs, and AMD RDNA1/2/3 GPUs.
  • Release build configuration.
  • Retail Xbox titles (XCL_SAMPLE_* environment variables unset; no local game folder available).

AI use

  • Antigravity, Gemini 4 Hydrogen: checked open PRs/issues and RDNA2 DPP16/DPP8/SDWA emitter behavior, wrote crates/xcl/tests/gpu_recomp_dpp_sdwa.rs, ran the test suite and linters, and prepared this PR.
<!-- greyfinch-sync:ivall/xcl:issue:5474973505 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1366). Originally posted by [Vadson159](https://github.com/Vadson159) on 2026-11-24T15:18:11Z. --- Add an integration test suite in `crates/xcl/tests/gpu_recomp_dpp_sdwa.rs` covering RDNA2 `DPP16`, `DPP8`, and `SDWA` (including `VOPC` `VOP_SDWA_SDST_ENC`) translation, DXC compilation, and GPU execution. **What is in it** - `crates/xcl/tests/gpu_recomp_dpp_sdwa.rs` (4 tests, 1,117 lines): - `dpp_sdwa_translate_and_compile_with_dxc`: verifies RDNA2 to HLSL translation and DXC compilation for DPP16, DPP8, SDWA, and VOPC SDWA test shaders. - `gpu_dpp16_controls_masks_and_fetch_inactive`: executes DPP16 controls, masks, and fetch-inactive handling on the GPU. - `gpu_dpp8_permutations_and_fetch_inactive`: executes DPP8 permutations and fetch-inactive handling on the GPU. - `gpu_sdwa_selectors_unused_modifiers_and_vopc`: executes SDWA selectors, unused-lane modes, modifiers, and `VOPC` (`VOP_SDWA_SDST_ENC`, including verifying `wave32` preserves the upper 32 bits `0xDEAD_BEEF` of `s[10:11]` via `S_MOV_B32 s16, s11`). **Tested** - Hardware and toolchain: AMD Radeon RX 9070 XT (driver `32.0.32029.2010`; `AMD Radeon(TM) Graphics` driver `32.0.21045.29003` also present), AMD Ryzen 7 9800X3D 8-Core Processor, Microsoft Windows NT 10.0.26300.0, `rustc 1.100.0 (0ef1bc386 2026-11-09)` (`stable-x86_64-pc-windows-msvc`), debug build, `dxcompiler 1.8.2502.11` (`C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64`). - `$env:XCL_REQUIRE_GPU="wave64,mesh"; .\scripts\test.ps1`: 755 passed, 0 failed, 41 ignored across 20 test suites, 0 GPU skips (`xcl` lib: 707 passed, 0 failed, 21 ignored; `gpu_recomp_dpp_sdwa`: 4 passed, 0 failed, 0 ignored; `e2e`: 3 passed, 0 failed, 0 ignored; `console_shaders`: 3 passed, 0 failed, 4 ignored; `heap_probe`: 0 passed, 0 failed, 4 ignored; `xg_oracle`: 6 passed, 0 failed, 12 ignored; all `XCL_SAMPLE_*` unset). - `$env:XCL_REQUIRE_GPU="wave64,mesh"; cargo test -p xcl --test gpu_recomp_dpp_sdwa`: 4 passed, 0 failed, 0 ignored. - `rustfmt --check H:\XCL_1\crates\xcl\tests\gpu_recomp_dpp_sdwa.rs`: passed (exit 0). - `cargo clippy -p xcl --test gpu_recomp_dpp_sdwa -- --no-deps`: 0 warnings in `crates/xcl/tests/gpu_recomp_dpp_sdwa.rs`. - `python -m unittest discover -s H:\XCL_1\scripts -p "test_*.py" -v`: 9 passed, 0 failed. **Regression run** Not required (changes are confined to `crates/xcl/tests/gpu_recomp_dpp_sdwa.rs`). **Not tested** - NVIDIA, Intel, wave32-only GPUs, and AMD RDNA1/2/3 GPUs. - Release build configuration. - Retail Xbox titles (`XCL_SAMPLE_*` environment variables unset; no local game folder available). **AI use** - Antigravity, Gemini 4 Hydrogen: checked open PRs/issues and RDNA2 DPP16/DPP8/SDWA emitter behavior, wrote `crates/xcl/tests/gpu_recomp_dpp_sdwa.rs`, ran the test suite and linters, and prepared this PR.
futurepro62 commented 2026-11-24 16:07:04 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T15:24:04Z.


Full-suite run, since this PR has no test report yet. Tested exact head 2e73789 (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 755 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: dpp_sdwa_translate_and_compile_with_dxc, gpu_dpp16_controls_masks_and_fetch_inactive, gpu_dpp8_permutations_and_fetch_inactive, gpu_sdwa_selectors_unused_modifiers_and_vopc.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 755 passed, 0 failed, 41 ignored, no skips.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7135961591 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1366#issuecomment-7135961591). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T15:24:04Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `2e73789` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **755 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `dpp_sdwa_translate_and_compile_with_dxc`, `gpu_dpp16_controls_masks_and_fetch_inactive`, `gpu_dpp8_permutations_and_fetch_inactive`, `gpu_sdwa_selectors_unused_modifiers_and_vopc`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **755 passed, 0 failed, 41 ignored**, no skips. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-24 17:06:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T16:33:35Z.


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

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7137855139 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1366#issuecomment-7137855139). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T16:33:35Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
github-actions[bot] commented 2026-11-28 08:00:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:39Z.


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:7236302749 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1366#issuecomment-7236302749). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:00:39Z. --- 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.
Foniass commented 2026-12-01 05:31:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:31:43Z.


Triage (#1607) – head 2e73789

No open or merged PR adds the same tests. #1620, #1778 and #858 have a few DPP/SDWA encodings in wider test suites, and main has some DPP cases in gpu/recomp/tests.rs, but nothing covers DPP16/DPP8/SDWA modifiers like this file.
In gpu_ready, wave64_programs_supported() == Ok(false) skips every mode, including the wave32 and split-wave64 forms that do not need wave64. The file is 1117 lines (over the ~800 line limit) and the description should say why it cannot be split.
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:7301865725 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1366#issuecomment-7301865725). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:31:43Z. --- **Triage (#1607)** – head 2e73789 No open or merged PR adds the same tests. #1620, #1778 and #858 have a few DPP/SDWA encodings in wider test suites, and main has some DPP cases in `gpu/recomp/tests.rs`, but nothing covers DPP16/DPP8/SDWA modifiers like this file. In `gpu_ready`, `wave64_programs_supported() == Ok(false)` skips every mode, including the wave32 and split-wave64 forms that do not need wave64. The file is 1117 lines (over the ~800 line limit) and the description should say why it cannot be split. 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/1366:upstream-pr/1366'
git switch 'upstream-pr/1366'

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/1366'
git switch 'upstream-pr/1366'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1366'
git switch 'upstream-pr/1366'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1366'
git switch 'main'
git merge --squash 'upstream-pr/1366'
git switch 'main'
git merge --ff-only 'upstream-pr/1366'
git switch 'main'
git merge 'upstream-pr/1366'
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!1356
No description provided.