Tests: cover RDNA2 bitops, 3-op min/max/med3, SAD/LERP and VOP3P on GPU #1566
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1576"
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 piyonchu on 2026-11-24T17:51:00Z.
Tests only — adds two GPU hardware execution tests to
crates/xcl/src/gpu/recomp/tests.rs(d7b52f9e, rebased ontomainfa204595) covering previously untested RDNA2 VALU bit-manipulation, 3-operand integermin3/max3/med3, videosad/msad/lerp, and packed 16-bitVOP3Pinstructions under the split-wave64 compute recompiler.What is in it
crates/xcl/src/gpu/recomp/tests.rs:gpu_bitops_min3_max3_med3_and_sad: runsV_FFBH_U32,V_FFBL_B32,V_FFBH_I32,V_BCNT_U32_B32,V_BFI_B32,V_BFM_B32,V_ALIGNBIT_B32,V_ALIGNBYTE_B32,V_PERM_B32, 32-bit and 16-bitV_MIN3/V_MAX3/V_MED3(unsigned and signed),V_SAD_U32,V_SAD_U8,V_SAD_HI_U8,V_SAD_U16,V_MSAD_U8, andV_LERP_U8across 64 lanes on the GPU and checks bit-exact outputs against RDNA2 reference semantics (zero inputs, signed extremes, 5-bit shift/width masking, byte selector modes0..=16+, and zero-mask lane skips inV_MSAD_U8).gpu_packed_16bit_shifts_minmax_mul_and_fma: runsV_PK_FMA_F16(includingOP_SELandNEG_HI),V_PK_MIN_F16,V_PK_MAX_F16,V_PK_LSHLREV_B16,V_PK_LSHRREV_B16,V_PK_ASHRREV_I16(including shift counts>= 16masked to 4 bits),V_PK_MUL_LO_U16,V_PK_MIN_U16/V_PK_MAX_U16, andV_PK_MIN_I16/V_PK_MAX_I16on the GPU.Tested
1.8.2502.11(10.0.26100.0), debug build at commitd7b52f9eda11f403c4dd983e0ae4647cca33c8aa:cargo test -p xcl --lib gpu_bitops_min3_max3_med3_and_sad -- --nocapture: 1 passed, 0 failed (0.28s).cargo test -p xcl --lib gpu_packed_16bit_shifts_minmax_mul_and_fma -- --nocapture: 1 passed, 0 failed (0.27s).cargo test -p xcl --lib gpu::recomp::tests -- --test-threads=1: 205 passed, 0 failed, 18 ignored (20.13s).python scripts/pr_check.py --localandgit diff --check upstream/main..HEAD: passed.Regression run
crates/xcl/src/gpu/recomp/tests.rs(only new GPU instruction tests added; no runtime code changed).Not tested
AI use
main, ran the local tests, and drafted this PR description.Imported from ivall/xcl. Originally posted by coenflict on 2026-11-24T17:57:41Z.
Tested
70eb0a5060333d45a20bb577119f177cfa3461e1, Windows 11 build 26340, Ryzen 7 9800X3D with integrated AMD Radeon Graphics driver32.0.21042.62, Rust 1.97.1 MSVC, DXC and DXIL 1.9.2602.17, debug build. SetXCL_ADAPTER=radeonandXCL_REQUIRE_GPU=wave64.cargo test -p xcl --lib -- --nocapture gpu_bitops_min3_max3_med3_and_sad gpu_packed_16bit_shifts_minmax_mul_and_fma gpu_wave32_program_in_wave64_hardwarereported 3 passed, 0 failed, 0 ignored, 0 skips. Both new tests ran, and the existing native-wave64 check also passed.Not tested
AI use
gpt-6.2-sol) ran the tests and wrote this report.Imported from ivall/xcl. Originally posted by JesusAtirador on 2026-11-24T18:03:23Z.
The whole workspace at this head, which the report above lists as not tested, on the same integrated Radeon and on an NVIDIA card. Measurements only, no code.
Tested
70eb0a5(clean worktree), debug, Windows 11 Pro 26200, Ryzen 7 9800X3D, 47 GB. Rust 1.100.0stable-x86_64-pc-windows-gnu(MinGW-w64 linker, not MSVC). DXC and DXIL 1.9.2609.5 (GitHub releasev1.9.2609).XCL_TRANSLATED_CACHE=0and an emptyXCL_DXIL_CACHEper run.cargo test --workspace -- --test-threads=1:XCL_ADAPTER=radeon): 778 passed, 0 failed, 41 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows). Both wave64-only tests ran.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--exact, one thread).Note
--test-threads=4run on the integrated Radeon was stopped part-way, because the host ran short of commit memory. Before it stopped,hle::d3d12x::list_x::tests::cross_queue_cycle_and_same_queue_fifo_do_not_deadlockfailed. That test passes in both single-thread runs above, and this PR does not touch it. I am reporting it only in case it turns up elsewhere under memory pressure.Not tested
--test-threads=4on the integrated GPU, Intel, retail titles.AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T19:51:39Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored. (Intermittent single-test flake under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T02:03:53Z.
CI \Build and test\ and \PR description\ passed on \
693e0a9. With #1617\ now merged at the end ofecomp/tests.rs, please rebase onto \main\ and get an independent AMD GPU pass on the updated head (earlier AMD RDNA2 pass was on \
70eb0a5).Imported from ivall/xcl. Originally posted by piyonchu on 2026-11-25T02:34:40Z.
Rebased onto
main(cbc296a, with#1617merged) atbc24ac3and re-ran the full GPU/workspace test suite on RTX 4060 Laptop GPU (1156 passed, 0 failed, 46 ignored, both new tests passing in0.31s/0.30s).Updated the PR description with the new head and counts. I do not have AMD GPU hardware locally, so native-wave64 AMD validation on
bc24ac3remains untested on my end.Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T02:53:52Z.
Intel Arc A770 verification for XCL PR #1576
Tested clean PR head
bc24ac30f82c8e409b46bacee578dd8889a8a19bon 2026-11-25. The PR was open at that SHA before and after execution. The PR description has NVIDIA results for this SHA, and the discussion has AMD results for an earlier SHA. The final dedup check found no Arc report for this head in the PR discussion, reviews, or issue #42. PR #1576Tested
Windows 11 Enterprise Evaluation 25H2 (26200.9974), Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 (
0ef1bc386,x86_64-pc-windows-msvc), unoptimized Cargo test profile with debug info disabled. The run loaded DXC and DXIL 1.9.2609.5 from the configured DXC directory.Both fixtures compiled HLSL to
cs_6_6with DXC and dispatched one logical wave64 each on the Arc. The runner selects the split kernel with two 32-lane hardware waves. The same host's existing D3D12 capability probe recorded wave lane minimum/maximum 8/32. Both fixtures checked the results for every logical lane, 0–63.gpu_bitops_min3_max3_med3_and_sadgpu_packed_16bit_shifts_minmax_mul_and_fmaLibtest reported 2 passed, 0 failed, 0 ignored, 0 skipped, with 1,124 filtered out and a 0.61 s harness time. The 39 instruction cases are within the two test functions. The GPU process exited 0 after 39.55 s including the shared-lock wait. The prebuild exited 0 after 54.61 s outside the lock.
Commands
Process-local settings and the prebuild command, with log redirection omitted:
The child script ran the Cargo-reported executable under the shared Arc lock.
XCL_DIRECT_DXILwas unset.Logs in
L:/XclTooling/pr1576areprebuild-20261125-034421-736.jsonl,prebuild-20261125-034421-736.stderr.log,arc-20261125-034534-728.stdout.log, andarc-20261125-034534-728.stderr.log.Not tested
Native wave64 (including AMD), direct DXIL, other adapters, release builds, the rest of the test suite, retail smoke runs, and performance.
AI use
T3 Code / Codex (
gpt-6.2-sol) verified the exact PR head, ran the two tests, and wrote this report from their outputs.upstream-sync referenced this pull request2026-11-25 16:12:19 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T05:48:34Z.
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.Imported from ivall/xcl. Originally posted by piyonchu on 2026-11-26T09:39:01Z.
@DavidM1911 Thanks for checking —
#1576is already rebased directly onto currentmain(b49be18) at5c047f7(0commits behindmain), showsMERGEABLE/CLEANon GitHub, and merges cleanly withupstream/main(git merge-tree --write-treeclean,Build and testandPR descriptionpassing). Could your test runner be using a cached ref before fetching5c047f7?Imported from ivall/xcl. Originally posted by piyonchu on 2026-11-29T01:22:49Z.
Rebased onto latest
main(fa204595, headd7b52f9e) resolving the conflict at the end ofcrates/xcl/src/gpu/recomp/tests.rs.Verified locally after rebase on RTX 4060 Laptop GPU (
Windows 11, debug):cargo test -p xcl --lib gpu_bitops_min3_max3_med3_and_sad -- --nocapture: 1 passed, 0 failed (0.28s)cargo test -p xcl --lib gpu_packed_16bit_shifts_minmax_mul_and_fma -- --nocapture: 1 passed, 0 failed (0.27s)cargo test -p xcl --lib gpu::recomp::tests -- --test-threads=1: 205 passed, 0 failed, 18 ignored (20.13s)python scripts/pr_check.py --local:description ok;git diff --check upstream/main..HEAD: cleanImported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:10:22Z.
Triage (#1607) – head
d7b52f9Most of this overlaps open test PRs: #445 (first; v_bfi/bfm/perm/alignbit/alignbyte and 32-bit min3/max3/med3, on wave32 and wave64 with edge values), #1057 (align/perm), #1199 (32/16-bit min3/max3/med3), #1226 (ffbh/ffbl/bfi/bfm/perm) and #657 (packed 16-bit integer shifts/min/max/mul_lo, also with swapped halves and v_pk_mad_*16).
Not in any of them: v_bcnt_u32_b32, the u16 min3/max3/med3, v_sad_u8/hi_u8/u16/u32, v_msad_u8, v_lerp_u8 and the packed f16 fma/min/max cases. The references read correct against the ISA; the test runs only the adapter's native wave size (run_program), not both.
Consider trimming it to the instructions the other PRs do not cover.
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.