Recompiler tests: GPU checks for 32-bit high and 24-bit VOP3 multiplies #585
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/590"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by 13hourstilliland on 2026-11-24T02:12:23Z.
Adds a GPU test for six RDNA2 VOP3 multiply/mad instructions that
emit.rsalready translates but no test runs:v_mul_hi_u32,v_mul_hi_i32,v_mul_hi_u32_u24,v_mul_i32_i24,v_mul_hi_i32_i24andv_mad_i32_i24. Test only, no runtime change.What is in it
gpu_vop3_mul_hi_and_24bitincrates/xcl/src/gpu/recomp/tests.rs: one kernel with all six instructions, run as wave64 where the adapter has it and as wave32 everywhere (gpu_waves), 32 waves of operand triples from a fixed LCG mixed with 24-bit and 32-bit sign/mask boundaries (0,1,2,0x007FFFFF,0x00800000,0x00FFFFFF,0x01000000,0xFF800000,0x7FFFFFFF,0x80000000,0xFFFFFFFF,0xA55AC33C), each lane compared with the RDNA2 definition computed on the CPU.gpu_valu_float_and_int, away from#545and#445, so it does not conflict with them.emit.rsexpressions fails the test and names only that instruction (v_mul_hi_u32: 949/1024,v_mul_hi_i32: 669/1024,v_mul_hi_u32_u24: 807/1024,v_mul_i32_i24: 621/1024,v_mul_hi_i32_i24: 621/1024,v_mad_i32_i24: 954/1024 mismatches).Tested
stable-x86_64-pc-windows-gnu(MinGW linker), DXC 1.9.2609.5, debug build, commit1abd49b(on main508a0c7)cargo build --workspace+cargo test --workspace --no-fail-fast -- --test-threads=4(withcargo test -p xcl --test e2e -- --test-threads=1run in the interactive desktop session): 681 passed, 0 failed, 41 ignored (lib: 641 passed, 0 failed, 21 ignored;gpu_vop3_mul_hi_and_24bitpassed in 0.31s;e2e3 of 3 passed in 11.60s; every other integration binary passed; 0 Display 4101 TDRs)SKIPPED(no wave64 on this GPU):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardwareNot tested
stable-x86_64-pc-windows-msvc): built with the GNU toolchain only.crates/xcl/srcruntime file changes).AI use
Imported from ivall/xcl. Originally posted by fladit123 on 2026-11-24T02:19:20Z.
Independent RTX 4060 validation of PR #590 in both debug and release using the MSVC toolchain.
Tested
1abd49b5446a17e5285b9322962d15885065241fx86_64-pc-windows-msvcXCL_ADAPTER=4060Commands
Both commands exited with code 0. The test covers six instructions across 1,024 lane operand triples per wave32 execution, corresponding to 6,144 GPU/CPU result comparisons per profile.
The worktree remained clean.
Not tested: native wave64, AMD/Intel adapters, mutation checks, full workspace suite or retail titles.
No blocking findings within the tested scope.
AI use: ChatGPT (GPT-6.2) assisted with diff review, test planning and report preparation. All commands were executed locally by me.
Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T02:46:38Z.
Test run of
1abd49b5446a17e5285b9322962d15885065241fon AMD RDNA4; the PR was tested on NVIDIA only. I merged it onto currentmain3db536elocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 687 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 647 passed, 0 failed, 21 ignoredSKIPPED;gpu_vop3_mul_hi_and_24bitpasses, as wave64 and as wave32 (both run natively here).Review: The CPU expectations match the RDNA2 definitions:
v_mul_hi_u32_u24is the high word of the 48-bit product of the low 24 bits,v_mul_i32_i24/v_mul_hi_i32_i24the low / high word of the signed 24-bit product (arithmetic shift),v_mad_i32_i24adds S2 as a 32-bit signed value with wrap-around. I found nothing to change.Not tested: no retail title or regression run (I have no unpacked game), no
XCL_SAMPLE_*tests, release build; the PR's head on its old base was not run, only its merge ontomain.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Imported from ivall/xcl. Originally posted by zhouzhidong3-hash on 2026-11-24T03:07:31Z.
Additional Blackwell data point for
1abd49b5446a17e5285b9322962d15885065241f: the focusedgpu_vop3_mul_hi_and_24bitfixture passed on a physical RTX 5070 (driver 591.86, Windows 10 build 19045, Rust 1.100.0 x86_64-pc-windows-msvc, release build, DXC 1.8.2502.11). Command:cargo test --offline --locked --release -p xcl --lib gpu_vop3_mul_hi_and_24bit -- --nocapture. Result: 1 passed, 0 failed, 0 ignored, 661 filtered out, 0.41 s. Scoped to this wave32 fixture; no wave64, full-suite or retail run for this PR. AI-assisted local validation by Codex.upstream-sync referenced this pull request2026-11-24 08:03:33 +00:00
mainreaches on Windows; the obstacle is replaced vtables — proposal: proxies #172Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T06:43:14Z.
Empirical test report (
1abd49b5)Hardware / environment
1abd49b5446a17e5285b9322962d15885065241f, verified after fetchingpull/590/headand checking out detachedFETCH_HEAD.32.0.101.9175, and AMD Ryzen 7 3800X 8-Core Processor. Windows 11 Enterprise Evaluation, build10.0.26200.1.100.0 (0ef1bc386 2026-11-09),x86_64-pc-windows-msvc. DXC and DXIL1.9.2609.5, compiler revision01b62ad4in the test log. Cargo used the unoptimized test profile.Commands and results
cargo test -p xcl --lib --no-runexited 0 outside the Arc lock and produced the library test executable.xcl-00e28da3621caf64.exe --list --exact gpu::recomp::tests::gpu_vop3_mul_hi_and_24bitexited 0 and listed one test.xcl-00e28da3621caf64.exe gpu::recomp::tests::gpu_vop3_mul_hi_and_24bit --exact --nocapture --test-threads=1ran insideInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. The executable and wrapper exited 0. The initial wrapper invocation was blocked by PowerShell execution policy before any test ran. The successful run used a process-scoped bypass.SKIPPED. The harness reported 0.24 s.Observed behavior
The six VOP3 operations matched their CPU reference values. The test dispatches 32 batches per enabled wave width and compares the high 32 bits of signed and unsigned 32-bit products, plus signed and unsigned 24-bit multiply variants and signed 24-bit multiply-add. The inputs exercise 24-bit sign and mask boundaries and 32-bit edge values.
Not tested
The full GPU workspace suite and game smoke runs were omitted.
AI use
Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr590-focused.log and published.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T13:06:55Z.
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!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:43:16Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:45:41Z.
Triage (#1607) – head
1abd49b#699 adds a GPU test of the same instructions (v_mul_hi_u32/i32 and the 24-bit multiplies/mad) with fixed edge cases, and it also covers v_mul_u32_u24, v_mad_u32_u24 and the VOP2 forms. Main's
gpu_scalar_sext_mulhi_and_vector_i24_sub_co_ci_u64_shifts(ce22d27) already checks 5 of these 6 VOP3 ops on fixed patterns. This PR adds wave32/wave64 and randomized edge operands.The CPU reference values in the diff look correct. The PR conflicts with main's tests.rs.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.