Skip to content

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

Closed
0xTehuti wants to merge 1 commit into
xcl-dev:mainfrom
0xTehuti:test-rdna2-gpu-ops
Closed

0xTehuti wants to merge 1 commit into
xcl-dev:mainfrom
0xTehuti:test-rdna2-gpu-ops

Conversation

@0xTehuti

Copy link
Copy Markdown

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.

… GPU

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.

Assisted-by: Antigravity (Gemini 3.8 Flash)
@DavidM1911

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown

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 Linux: docs/linux.md, scripts/linux and Wine start-up checks for vkd3d-proton and DXVK (#154, #241) #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.

@ivall ivall added the off-goal Does not bear on the current goal (world loading); waits until it is reached label Nov 24, 2026
@github-actions

Copy link
Copy Markdown

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

Foniass commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

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

throny commented Dec 1, 2026

Copy link
Copy Markdown
Collaborator

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).

@throny throny added the duplicate This issue or pull request already exists label Dec 1, 2026
@throny throny closed this Dec 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

duplicate This issue or pull request already exists off-goal Does not bear on the current goal (world loading); waits until it is reached stale No activity for 3 days; closed 4 days later unless something happens

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants