Tests: check v_movrelsd_b32 and v_movrelsd_2_b32 on the GPU #1165

Closed
microwave805 wants to merge 1 commit from upstream-pr/1174 into main
microwave805 commented 2026-11-24 12:51:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by microwave805 on 2026-11-24T12:51:44Z.


Adds GPU coverage for v_movrelsd_b32 and v_movrelsd_2_b32 in crates/xcl/src/gpu/recomp/tests.rs (existing gpu_packed_math_dots_movrel only exercises v_movrels_b32 and v_movreld_b32).

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: add gpu_v_movrelsd_and_movrelsd_2 alongside gpu_v_swaprel_b32, checking:
    • v_movrelsd_b32 (vdst[+M0] = src[+M0]) with all lanes active, under an even-lane EXEC mask (inactive lanes keep their original values), and as an overlapping self-copy (v11 = v11);
    • v_movrelsd_2_b32 (vdst[+M0[25:16]] = src[+M0[9:0]]) with non-zero upper M0 bits (0xFC00_FC00) masked out and under an odd-lane EXEC mask;
    • sibling VGPRs untouched.

Tested

  • NVIDIA GeForce RTX 3070 (driver 32.0.16.1742), AMD Ryzen 5 5600X, Windows 11 Pro (build 22631), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc, debug)
  • cargo test -p xcl --lib gpu_v_movrelsd -- --nocapture: 1 passed, 0 failed
  • .\scripts\test.ps1 (cargo build --workspace + cargo test --workspace -- --test-threads=4): 742 passed, 0 failed, 41 ignored
  • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64)
  • python -I scripts/pr_check.py --local on this PR's description and changed files: description ok

Regression run

  • Not needed: changes only crates/xcl/src/gpu/recomp/tests.rs (test-only).

Not tested

  • Native wave64 / AMD GPUs (ran on NVIDIA RTX 3070 via split-wave64)
  • Retail titles

AI use

  • Antigravity (Gemini 4 Neon): audited v_movrel* coverage in emit.rs/tests.rs, wrote the GPU test and this PR description, and ran the test commands above.
<!-- greyfinch-sync:ivall/xcl:issue:6582196705 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1174). Originally posted by [microwave805](https://github.com/microwave805) on 2026-11-24T12:51:44Z. --- Adds GPU coverage for `v_movrelsd_b32` and `v_movrelsd_2_b32` in `crates/xcl/src/gpu/recomp/tests.rs` (existing `gpu_packed_math_dots_movrel` only exercises `v_movrels_b32` and `v_movreld_b32`). **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: add `gpu_v_movrelsd_and_movrelsd_2` alongside `gpu_v_swaprel_b32`, checking: - `v_movrelsd_b32` (`vdst[+M0] = src[+M0]`) with all lanes active, under an even-lane `EXEC` mask (inactive lanes keep their original values), and as an overlapping self-copy (`v11 = v11`); - `v_movrelsd_2_b32` (`vdst[+M0[25:16]] = src[+M0[9:0]]`) with non-zero upper `M0` bits (`0xFC00_FC00`) masked out and under an odd-lane `EXEC` mask; - sibling VGPRs untouched. **Tested** - NVIDIA GeForce RTX 3070 (driver 32.0.16.1742), AMD Ryzen 5 5600X, Windows 11 Pro (build 22631), DXC 1.9.2602.17 (Windows SDK 10.0.26100.0), Rust 1.100.0 (stable-x86_64-pc-windows-msvc, debug) - `cargo test -p xcl --lib gpu_v_movrelsd -- --nocapture`: 1 passed, 0 failed - `.\scripts\test.ps1` (`cargo build --workspace` + `cargo test --workspace -- --test-threads=4`): 742 passed, 0 failed, 41 ignored - SKIPPED GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (no wave64) - `python -I scripts/pr_check.py --local` on this PR's description and changed files: `description ok` **Regression run** - Not needed: changes only `crates/xcl/src/gpu/recomp/tests.rs` (test-only). **Not tested** - Native wave64 / AMD GPUs (ran on NVIDIA RTX 3070 via split-wave64) - Retail titles **AI use** - Antigravity (Gemini 4 Neon): audited `v_movrel*` coverage in `emit.rs`/`tests.rs`, wrote the GPU test and this PR description, and ran the test commands above.
DavidM1911 commented 2026-11-24 14:06:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:06:59Z.


Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.

  • cargo test -p xcl --lib movrelsd: 2 passed, 0 failed — gpu_v_movrelsd_and_movrelsd_2 plus the mask-analysis test.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7132370544 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1174#issuecomment-7132370544). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:06:59Z. --- Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11. - `cargo test -p xcl --lib movrelsd`: **2 passed, 0 failed** — `gpu_v_movrelsd_and_movrelsd_2` plus the mask-analysis test. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
bjarngard commented 2026-11-24 14:06:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bjarngard on 2026-11-24T13:24:01Z.


Test report for head c88c74f (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_v_movrelsd_and_movrelsd_2 passed

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.

<!-- greyfinch-sync:ivall/xcl:comment:7132774451 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1174#issuecomment-7132774451). Originally posted by [bjarngard](https://github.com/bjarngard) on 2026-11-24T13:24:01Z. --- Test report for head `c88c74f` (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_v_movrelsd_and_movrelsd_2` passed **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.
JoaoPauluu commented 2026-11-24 14:06:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T13:45:19Z.


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 #257 (DXIL → SPIR-V through dxil-spirv), DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. c88c74f as it is (based on 47efa2e), no uncommitted changes. The lib test binary runs under Wine.
  • gpu::recomp::tests::gpu_v_movrelsd_and_movrelsd_2 (--exact, one process): ok, no SKIPPED. DXC compiled it and it ran on the GPU in about 0.8 s.

Not tested

  • the rest of the suite on this head; native Windows; AMD / native wave64.

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.
<!-- greyfinch-sync:ivall/xcl:comment:7133287831 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1174#issuecomment-7133287831). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T13:45:19Z. --- 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 #257 (DXIL → SPIR-V through dxil-spirv), DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `c88c74f` as it is (based on `47efa2e`), no uncommitted changes. The lib test binary runs under Wine. - `gpu::recomp::tests::gpu_v_movrelsd_and_movrelsd_2` (`--exact`, one process): **ok**, no SKIPPED. DXC compiled it and it ran on the GPU in about 0.8 s. **Not tested** - the rest of the suite on this head; native Windows; AMD / native wave64. **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.
upstream-sync closed this pull request 2026-11-24 20:04:39 +00:00
throny commented 2026-11-24 21:08:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-24T19:38:29Z.


Two contributors checked independently and found that this PR makes the same change as #1167: #1607, group D26. They suggest keeping #1167. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps.

This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

<!-- greyfinch-sync:ivall/xcl:comment:7142384385 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1174#issuecomment-7142384385). Originally posted by [throny](https://github.com/throny) on 2026-11-24T19:38:29Z. --- <!-- xcl-1607-hint:D26 --> Two contributors checked independently and found that this PR makes the same change as #1167: #1607, group D26. They suggest keeping #1167. If you agree, closing this PR or joining the other one would save the maintainers a review. If the two differ in a way the checks missed, a note in #1607 helps. This is a hint, not a request from the maintainers; nobody from the project has adopted #1607 so far. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
microwave805 commented 2026-11-24 21:09:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by microwave805 on 2026-11-24T19:42:06Z.


Closing in favor of #1167 — checked both diffs and #1167 (opened right before this) is a clean strict superset covering VOP1 + VOP3, M0 masking, overlapping moves, partial EXEC, and both wave32/wave64. Thanks for flagging it in #1607!

<!-- greyfinch-sync:ivall/xcl:comment:7142467609 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1174#issuecomment-7142467609). Originally posted by [microwave805](https://github.com/microwave805) on 2026-11-24T19:42:06Z. --- Closing in favor of #1167 — checked both diffs and #1167 (opened right before this) is a clean strict superset covering VOP1 + VOP3, M0 masking, overlapping moves, partial EXEC, and both wave32/wave64. Thanks for flagging it in #1607!

Pull request closed

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!1165
No description provided.