Tests: check VOP3 3-operand integer ALU, bitwise and align ops on the GPU #1197

Closed
0xTehuti wants to merge 1 commit from upstream-pr/1206 into main
0xTehuti commented 2026-11-24 13:14:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by 0xTehuti on 2026-11-24T13:14:06Z.


Add GPU coverage for 14 translated RDNA2 3-operand integer and bitwise instructions with no existing GPU tests: v_alignbit_b32, v_alignbyte_b32, v_xad_u32, v_add_lshl_u32, v_lshl_or_b32, v_and_or_b32, v_or3_b32, v_xor3_b32, v_med3_u32, v_med3_i32, v_min3_u32, v_max3_u32, v_min3_i32 and v_max3_i32.

Exercises bit alignment shifts, 3-operand bitwise combinations, combined add-shifts, and signed/unsigned median and min/max selection across all 64 lanes.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: gpu_recomp_vop3_three_operand_int_and_bit_ops exercising 14 VOP3 instructions on the GPU.

Tested

  • NVIDIA GeForce RTX 2070 SUPER (Driver 595.79 / 32.0.15.9579), Intel Core i7-10700K, Windows 11 x64, Rust 1.99.0
  • .\scripts\test.ps1: 699 passed, 0 failed, 21 ignored, 2 skipped (no wave64)
  • Specific test: cargo test -p xcl --lib gpu_recomp_vop3_three_operand_int_and_bit_ops: 1 passed, 0 failed (0.26s)

Not tested

  • Retail game packages (XCL_SAMPLE_* unset).

AI use

  • Tool: Antigravity / T3 Code
  • Model: Gemini 3.8 Flash
  • Details: Identified unexercised VOP3 instructions in emit.rs, wrote the test program and assertions, verified on real hardware with DXC.
<!-- greyfinch-sync:ivall/xcl:issue:5472835985 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1206). Originally posted by [0xTehuti](https://github.com/0xTehuti) on 2026-11-24T13:14:06Z. --- Add GPU coverage for 14 translated RDNA2 3-operand integer and bitwise instructions with no existing GPU tests: `v_alignbit_b32`, `v_alignbyte_b32`, `v_xad_u32`, `v_add_lshl_u32`, `v_lshl_or_b32`, `v_and_or_b32`, `v_or3_b32`, `v_xor3_b32`, `v_med3_u32`, `v_med3_i32`, `v_min3_u32`, `v_max3_u32`, `v_min3_i32` and `v_max3_i32`. Exercises bit alignment shifts, 3-operand bitwise combinations, combined add-shifts, and signed/unsigned median and min/max selection across all 64 lanes. **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: `gpu_recomp_vop3_three_operand_int_and_bit_ops` exercising 14 VOP3 instructions on the GPU. **Tested** - NVIDIA GeForce RTX 2070 SUPER (Driver 595.79 / 32.0.15.9579), Intel Core i7-10700K, Windows 11 x64, Rust 1.99.0 - `.\scripts\test.ps1`: 699 passed, 0 failed, 21 ignored, 2 skipped (no wave64) - Specific test: `cargo test -p xcl --lib gpu_recomp_vop3_three_operand_int_and_bit_ops`: 1 passed, 0 failed (0.26s) **Not tested** - Retail game packages (`XCL_SAMPLE_*` unset). **AI use** - Tool: Antigravity / T3 Code - Model: Gemini 3.8 Flash - Details: Identified unexercised VOP3 instructions in emit.rs, wrote the test program and assertions, verified on real hardware with DXC.
DavidM1911 commented 2026-11-24 14:06:29 +00:00 (Migrated from github.com)

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


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 vop3: 3 passed, 0 failed — includes the new gpu_recomp_vop3_three_operand_int_and_bit_ops.

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

<!-- greyfinch-sync:ivall/xcl:comment:7132614050 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1206#issuecomment-7132614050). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:17:16Z. --- 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 vop3`: **3 passed, 0 failed** — includes the new `gpu_recomp_vop3_three_operand_int_and_bit_ops`. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
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:15Z.


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. e4307f2 as it is (based on 47efa2e), no uncommitted changes. The lib test binary runs under Wine.
  • gpu::recomp::tests::gpu_recomp_vop3_three_operand_int_and_bit_ops (--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:7133286326 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1206#issuecomment-7133286326). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T13:45:15Z. --- 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`. `e4307f2` as it is (based on `47efa2e`), no uncommitted changes. The lib test binary runs under Wine. - `gpu::recomp::tests::gpu_recomp_vop3_three_operand_int_and_bit_ops` (`--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.
github-actions[bot] commented 2026-11-28 08:00:24 +00:00 (Migrated from github.com)

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


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:7236299960 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1206#issuecomment-7236299960). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:00:24Z. --- 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:07:23 +00:00 (Migrated from github.com)

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


Triage (#1607) – head e4307f2

The ops in gpu_recomp_vop3_three_operand_int_and_bit_ops are already tested by two earlier open PRs: #445 (v_alignbit_b32, v_alignbyte_b32, v_min3/max3/med3_u32/i32, with edge values on wave32 and wave64) and #703 (v_xad_u32, v_add_lshl_u32, v_lshl_or_b32, v_and_or_b32, v_or3_b32, v_xor3_b32 over 16 edge cases). This PR tests one fixed input per op. The expected values here are correct, but the PR adds no op that those two do not cover.
Recommendation: close (duplicate of #445 and #703).

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:7301443540 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1206#issuecomment-7301443540). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:07:23Z. --- **Triage (#1607)** – head e4307f2 The ops in `gpu_recomp_vop3_three_operand_int_and_bit_ops` are already tested by two earlier open PRs: #445 (`v_alignbit_b32`, `v_alignbyte_b32`, `v_min3/max3/med3_u32/i32`, with edge values on wave32 and wave64) and #703 (`v_xad_u32`, `v_add_lshl_u32`, `v_lshl_or_b32`, `v_and_or_b32`, `v_or3_b32`, `v_xor3_b32` over 16 edge cases). This PR tests one fixed input per op. The expected values here are correct, but the PR adds no op that those two do not cover. Recommendation: close (duplicate of #445 and #703). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 15:57:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T15:57:23Z.


Closing as superseded: the same change is in #445, #703 (open, mergeable, required checks green). From Foniass's rechecked close list on #1607, checked again by script just now. If something here is still missing, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7316795125 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1206#issuecomment-7316795125). Originally posted by [throny](https://github.com/throny) on 2026-12-01T15:57:23Z. --- Closing as superseded: the same change is in #445, #703 (open, mergeable, required checks green). From Foniass's rechecked close list on #1607, checked again by script just now. If something here is still missing, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5).

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