Tests: packed 16-bit integer VOP3P ops on the GPU, with swapped halves #657
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!657
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-657"
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?
@acaracargo on GitHub · 2026-11-24 02:57 UTC · original
acaracargo:fork/packed-int-gpu-tests→main· +72 −0 · 1 files · 1 commits · openAdds GPU coverage for
v_pk_mul_lo_u16, the three packed shifts,v_pk_min/v_pk_max(u16 and i16), andv_pk_mad_u16/i16without clamp.Each half is compared against the ISA's pseudo-code using eight lanes of edge values, including sign boundaries, shift counts past 15 and 16-bit wraparound.
Every instruction runs twice: once with the usual half selection (
op_sel 0,op_sel_hi 1) and once with the halves swapped (op_sel 1,op_sel_hi 0). This also checks that the low result correctly reads the high halves of the sources when selected.The existing
gpu_clamp_and_omod_per_instructiontest covers packed add / sub / mad with clamp. #445 and #545 cover non-packed VOP3 instructions.What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_packed_16_bit_integer.Tested
x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug.cargo test --workspace -- --test-threads=4on8213152: 685 passed, 0 failed, 41 ignored (main9ce2070: 684 / 0 / 41).gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64).v_pk_min_i16unsigned or removing the 16-bit mask fromv_pk_lshlrev_b16causes the test to fail (checked locally, reverted).Regression run
Not tested
op_selcombinations other than the two tested above.AI use
@MonkeyPython on GitHub · 2026-11-24 03:05 UTC · original
AMD / native-wave64 data point (the "Not tested" axis):
gpu_packed_16_bit_integer(VOP3P with swapped halves) passes on an AMD Raphael iGPU (RDNA2, native wave64) and on NVIDIA wave32.Setup: Windows 11 Pro 26300, Ryzen 7 7800X3D, 32 GB; adapters: AMD Radeon(TM) Graphics (Raphael iGPU, wave64) and RTX 3080 Ti 12 GB (driver 621.01, wave32-only). PR head
8213152, release.Runs (
cargo test -p xcl --release --lib gpu_packed_16_bit_integer):XCL_ADAPTER=Radeon(selects the iGPU; the selector errors on no match, so a pass means it ran there): 1 passed / 0 failed, 0.11 s.The packed
op_selhalves agree on native wave64 and on the wave32 split path.Not tested: discrete AMD GPUs, other titles.
AI use: Gentle Shell (Pi coding agent), model qwen4-max: ran the tests and wrote this report from their logs; a human reviews it before posting. No code changes.
@MesshM on GitHub · 2026-11-24 03:18 UTC · original
Test run of
8213152573670933e75ba5fc558e74566d77baf3on AMD RDNA4 (native wave64). I merged it onto currentmain63cdc25locally (clean merge) and tested that tree.Tested
stable-x86_64-pc-windows-msvc, debugcargo build --workspace+cargo test --workspace -- --test-threads=4on the merge: 693 passed, 0 failed, 41 ignored, exit code 0;xcllib tests 653 passed, 0 failed, 21 ignoredSKIPPED;gpu_packed_16_bit_integerpasses.Review: The references and the swapped (op_sel 1 / op_sel_hi 0) half selection match the VOP3P definitions I checked (shift counts from the low 4 bits, signed variants through the sign-extended half). This adds RDNA4 next to the RDNA2 iGPU result above.
Not tested: no retail title (not needed for a test-only change), release build; the PR's head on its old base was not run, only its merge onto
main.Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
@lordon1a on GitHub · 2026-11-24 03:38 UTC · original
Independent GPU test report on
8213152: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_packed_16_bit_integer -- --nocapture0.74s(gpu::recomp::tests::gpu_packed_16_bit_integerok)Not tested
AI use
8213152in a detached worktree, audited the diff, ran the GPU test, and posted this report.@JJAutoCompare on GitHub · 2026-11-25 06:30 UTC · original
Empirical test report (
82131525)Hardware / environment
8213152573670933e75ba5fc558e74566d77baf3on a clean, detached worktree.32.0.101.9175. AMD Ryzen 7 3800X 8-Core Processor. Windows build10.0.26200.9974.rustc 1.100.0 (0ef1bc386 2026-11-09), hostx86_64-pc-windows-msvc. DXC loadeddxcompiler 1.9.2609.5 (01b62ad4)anddxil 1.9.2609.5.Commands and results
cargo test -p xcl --lib --no-runcompleted outside the Arc lock with exit code 0. Cargo built the unoptimized test executablexcl-00e28da3621caf64.exeand emitted one deprecation warning forAtomicU32::fetch_update. This step compiled the test binary.& $testExe gpu::recomp::tests::gpu_packed_16_bit_integer --exact --nocapture --test-threads=1ran insideInvoke-ArcTest.ps1withXCL_ADAPTER=A770andRUST_TEST_NOCAPTURE=1. Here$testExeis the executable from the build step. The wrapper acquired and released the Arc lock and returned exit code 0.SKIPPEDin the combined stdout and stderr log.Observed behavior
The new D3D12 test matched the CPU reference across eight input triples, ten packed 16-bit VOP3P operations and two half-selection modes, totaling 160 packed-result comparisons. The cases covered low-half multiply, three shifts, signed and unsigned min/max, and unclamped signed and unsigned multiply-add.
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 pr657-focused.log and published.
@DavidM1911 on GitHub · 2026-11-25 12:21 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.