Tests: 32-bit high and 24-bit integer multiply / mad ops on the GPU #699
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!699
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-699"
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?
@lordon1a on GitHub · 2026-11-24 03:46 UTC · original
lordon1a:tests/gpu-mul-hi-and-24bit→main· +79 −0 · 1 files · 1 commits · openAdds a per-instruction GPU test (
gpu_mul_hi_and_24bit_integer_ops) covering 8 RDNA2 integer multiply / multiply-add instructions that previously had no GPU test coverage:v_mul_hi_u32,v_mul_hi_i32,v_mul_u32_u24,v_mul_hi_u32_u24,v_mul_i32_i24,v_mul_hi_i32_i24,v_mad_u32_u24, andv_mad_i32_i24, checked across 16 edge cases (24-bit sign boundaries0x007F_FFFF/0x0080_0000, ignored upper 8 bits, 32-bit signed/unsigned extremes, and wrapping accumulation) against exact 64-bit CPU arithmetic.What is in it
crates/xcl/src/gpu/recomp/tests.rs: addsgpu_mul_hi_and_24bit_integer_ops(test-only; no runtime code changed).Tested
616.64, wave32, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200),rustc 1.100.0(x86_64-pc-windows-gnullvm), debug build, DXC1.9.2609.5(01b62ad4)cargo test -p xcl --lib gpu_mul_hi_and_24bit_integer_ops -- --nocapture: 1 passed, 0 failed, 0 ignored (1.51s)cargo build --workspace && cargo test --workspace -- --test-threads=1: 702 passed, 0 failed, 41 ignoredSKIPPEDGPU tests (expected on wave32-only NVIDIA hardware):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64--test-threads=4, pre-existingplaced_title_textures_share_vram_and_preserve_pixelshit a parallel race onf4ce27c(passes alone in1.31sand passes under--test-threads=1).Not tested
AI use
@lordon1a on GitHub · 2026-11-24 04:04 UTC · original
Thanks for catching the overlap with #590 @joeypercia — my title search missed it. Happy to close or narrow this down to just \_mul_u32_u24\ / \_mad_u32_u24\ if #590 lands first. (AI use: Antigravity)
@mastrr9 on GitHub · 2026-11-24 04:05 UTC · original
Code audit + Windows MSVC / NVIDIA RTX 5080 GPU test run on
af64a67c53368265459b56c7e1a1e5d51cf308b6:Review
v_mul_hi_u32/i32,v_mul_u32_u24,v_mul_hi_u32_u24,v_mul_i32_i24,v_mul_hi_i32_i24,v_mad_u32_u24,v_mad_i32_i24) checks out, including 24-bit sign-extension boundaries (0x007F_FFFF/0x0080_0000) and ignored upper 8 bits.tests.rs:7194with #703;CONTRIBUTING.mdasks for the exact model name in AI use.)Tested
rustc 1.100.0(MSVC), debug build.cargo build --workspace && cargo test --workspace -- --test-threads=4: 702 passed, 0 failed, 41 ignored.gpu::recomp::tests::gpu_mul_hi_and_24bit_integer_ops: passed on RTX 5080.SKIPPEDGPU/D3D12 tests:gpu_geometry_wave32_prefix_count_over_a_mask/gpu_wave32_program_in_wave64_hardware(no wave64), plus 2 D3D12 debug-layer tests (no d3d12SDKLayers.dll).Not tested
AI use: code review and GPU test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.
@joeypercia on GitHub · 2026-11-24 04:03 UTC · original · edited 2026-11-24 04:05 UTC
Overlap note for review: 6 of the 8 instructions this test covers are also covered by #590 (open, earlier):
v_mad_i32_i24,v_mul_hi_i32,v_mul_hi_i32_i24,v_mul_hi_u32,v_mul_hi_u32_u24,v_mul_i32_i24. Onlyv_mad_u32_u24andv_mul_u32_u24are new here, so the two PRs may want to be folded into one.(Found by comparing the
V_*names each PR's test adds; not a test run.) Written with Claude Code (Claude Opus 5.5).AMD run (the Not tested item):
af64a67merged ontomainf4ce27c(clean merge).gpu_mul_hi_and_24bit_integer_ops: passes on the RDNA2 iGPU (native wave64; the split form on the RTX 4070 Ti) and on the RTX 4070 Ti; noSKIPPEDRun and report by Claude Code (Claude Opus 5.5).
@joeypercia on GitHub · 2026-11-24 04:06 UTC · original
Thanks @lordon1a. Narrowing now to
v_mul_u32_u24/v_mad_u32_u24would let this and #590 merge in either order without a reviewer comparing the overlap, and the AMD run above covers the new cases as they are. Your call, of course.Written with Claude Code (Claude Opus 5.5).
@MesshM on GitHub · 2026-11-24 04:08 UTC · original
Test run of
af64a67c53368265459b56c7e1a1e5d51cf308b6on AMD RDNA4. I merged it onto currentmainf4ce27clocally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 702 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 661 passed, 0 failed, 21 ignoredSKIPPED;gpu_mul_hi_and_24bit_integer_opspasses.Review: Overlap with #590 (open), which adds a GPU test for six of these eight instructions (
v_mul_hi_u32,v_mul_hi_i32,v_mul_hi_u32_u24,v_mul_i32_i24,v_mul_hi_i32_i24,v_mad_i32_i24); this one addsv_mul_u32_u24andv_mad_u32_u24. If both land, the six are tested twice; folding the two new ones into one of them would avoid that. The references are right.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.
@JJAutoCompare on GitHub · 2026-11-25 06:10 UTC · original
Empirical test report (
af64a67c)Verified the detached head of PR #699 at
af64a67c53368265459b56c7e1a1e5d51cf308b6in a clean Windows worktree.Hardware / environment
XCL_ADAPTER=A770, on Windows x64 build 26200. The host reported AMD64 family 23, model 113.1.100.0 (0ef1bc386 2026-11-09), host targetx86_64-pc-windows-msvc. DXC and the loaded DXIL library both reported1.9.2609.5(DXC build01b62ad4).Commands and results
cargo test -p xcl --lib --no-runcompleted outside the adapter lock with exit code 0 and one deprecation warning in XGameRuntime.Invoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. The executable receivedgpu::recomp::tests::gpu_mul_hi_and_24bit_integer_ops --exact --nocapture --test-threads=1.Observed behavior
The fixture compiled a compute shader with DXC and dispatched it on the Arc A770. All eight instruction results agreed with the fixture's CPU reference for each of the 16 checked operand triples. Those cases exercise signed and unsigned 32-bit high-half multiplies, signed and unsigned 24-bit multiplies and multiply-adds, sign extension at the 24-bit boundary, discarded upper operand bits, and wrapping accumulation.
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 pr699-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 11:54 UTC · original
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!
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.