Tests: cover split-wave64 and native-wave64 parity on partial waves and cross-lane ops #1620
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!1620
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1620"
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?
@GustavoEllwanger on GitHub · 2026-11-24 18:18 UTC · original
GustavoEllwanger:tests/wave64-split-parity→main· +260 −0 · 1 files · 1 commits · openWhat is in it
Adds three GPU tests in
crates/xcl/src/gpu/recomp/tests.rsthat exercise wave64 edge cases across both 32-lane halves, running both native wave64 (split_wave64 = false) and paired split-wave64 (split_wave64 = true) on wave64-capable GPUs (andsplit_wave64 = trueon 32-lane GPUs) against the exact per-lane reference. Each test builds its DXIL throughdirect_or, asgpu_split_wave64_waves_divergedoes, so withXCL_DIRECT_DXIL=1the same cases also check the direct DXIL translator's split forms (missing partner, partialxn, spin); without it they check the HLSL path (suggested by IgorAntunes66 below).gpu_split_wave64_partial_waves_and_cross_half_exchanges: partial last console waves inMode::Compute:[48, 1, 1](asymmetric 32+16 barrier meet),[80, 1, 1]and[96, 1, 1](unpaired lower half withxcl_xn = 0underXCL_X_SPIN),[112, 1, 1]and 3-D[7, 4, 4](asymmetric 32+16 underXCL_X_SPIN+xcl_x_threadreordering). Covers active-lane ballots (v_cmp+s_bcnt1_i32_b64),v_mbcnt_lo/hi, scalar-branch-guarded cross-halfv_readlane_b32, andds_bpermute_b32from lane^ 16, inside the lane's own 32-lane half, including reads of absent lanes (16 of them in each 48-, 80- and 112-thread case), which must return 0. The index stays in the half on purpose: in wave64 on RDNA2ds_bpermute_b32reads lane(l & 32) | ((addr >> 2) & 31)(#772), which #1022 fixes in both translators, so this test is right on hardware and passes before and after #1022 (review by Prime1997 below).gpu_wave64_writelane_and_permlane16_across_halves:v_writelane_b32ignoringEXECon inactive lanes in both halves (constant and SGPR lane indices) with cross-halfv_readlane_b32readback, plusv_permlane16_b32andv_permlanex16_b32across all four 16-lane rows under partialEXECforFIandBOUND_CTRLcombinations.gpu_wave64_dpp16_partial_exec_and_masks_across_halves:DPP16across all four 16-lane rows under partialEXEC(row_shl:1,row_shr:2,row_ror:3,row_xmask:5,ROW_MASK,BANK_MASK,FI,BOUND_CTRL).Tested
XCL_ADAPTER=5060XCL_ADAPTER=Radeonmain889ef3e(mainalso appends tests at the end oftests.rs; both blocks kept), head95a3244. On that head:cargo test -p xcl --lib -- gpu_split_wave64_partial_waves_and_cross_half_exchanges gpu_wave64_writelane_and_permlane16_across_halves gpu_wave64_dpp16_partial_exec_and_masks_across_halves --test-threads=1: 3 passed, 0 failed on each GPU, both withXCL_DIRECT_DXILunset (HLSL path) and withXCL_DIRECT_DXIL=1(direct path; on the iGPU this includes the native wave64 form).ds_bpermuteread changed on purpose,gpu_split_wave64_partial_waves_and_cross_half_exchangesfails at[48, 1, 1]lane 32 (it reads absent lane 48 and gets 0), so the zeroing check is live.cargo test --workspace --no-fail-fast -- --test-threads=4, withmain889ef3erun the same way for comparison:SKIPPEDlines (main: 1413 passed, 0 failed, 46 ignored).SKIPPEDlines (main: 1412 passed, 1 failed, 46 ignored). The failure isgpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1(seed 783), the same as onmain, #2115.SKIPPEDlines are wave64-only and per-lanegpu::tests, plusheap_window_out_of_memory_falls_back_to_the_switch_form,shaders::tests::pso_measurement_compiles_an_exact_synthetic_record, the twothe title under the debug layerruns anduploads_start_from_each_subresources_state(no debug layer or Developer Mode here), and on the iGPUpassthrough_mesh_stream_accepts_a_triangle_driver_blob(no mesh shaders).direct_orchange) in the comments below.Not tested
scripts/smoke.ps1): test-only change touching onlycrates/xcl/src/gpu/recomp/tests.rs.direct_orchange on Intel and on RDNA3/RDNA4.AI use
gpu::recompwave64/split-wave64 test coverage, wrote the three GPU tests and ran the first test suites on both GPUs.889ef3e, applied thedirect_orchange, moved theds_bpermuteindex inside the half after the review, ran the tests above on both GPUs and updated this description.🤖 Generated with Claude Code
@thiagocalile on GitHub · 2026-11-24 20:27 UTC · original
Tested commit
c5e71313e2af587cffd5d38a4b59189b1aef8bf8on an AMD Radeon RX 6600 (RDNA2, native 64-lane waves): all targeted tests passed.Tested
32.0.21045.29003;XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11, debug build.XCL_ADAPTER=radeon cargo test -p xcl --lib gpu::recomp::tests -- --test-threads=4: 123 passed, 0 failed, 17 ignored (50.29s).XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 776 passed, 3 failed, 41 ignored (50.98s).mainon this RX 6600 (placed_title_textures_share_vram_and_preserve_pixels: 3D mip subresource mismatch, plus 2 mutex-poison cascadestransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory; tracked by #1028).SKIPPED(not counted as coverage):heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows(plus D3D12 debug-layer tests skip becaused3d12SDKLayers.dllis not installed).Not tested
scripts/smoke.ps1— no game executable here), D3D12 debug layer, NVIDIA / Intel GPUs, Linux / Wine.AI use
@DavidM1911 on GitHub · 2026-11-24 20:37 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
@JJAutoCompare on GitHub · 2026-11-25 05:42 UTC · original
Arc A770 compatibility validation for xcl-dev/xcl PR #1620
Tested
Clean detached checkout of
c5e71313e2af587cffd5d38a4b59189b1aef8bf8on STOR-WINLAB. Intel Arc A770 driver32.0.101.9175, AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 25H2 x64 build26200.9974, Rust1.100.0(0ef1bc386,x86_64-pc-windows-msvc), Cargo1.100.0(3acc79c0c), DXC and DXIL1.9.2609.5(DXC01b62ad4).Outside the Arc mutex,
cargo test --locked -p xcl --lib --no-runexited 0 in 28.49 s. Test profile was unoptimized with dev and test debuginfo disabled, two Cargo jobs, incremental disabled, targetL:/XclTooling/pr1778-2e2ee55-20261125-020159/target, and private TEMP/TMPL:/XclTooling/pr1620/temp.Under
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { ... }, ran the prebuiltxcl-77aca8ccb20e299f.exeonce per fixture, as<exe> gpu::recomp::tests::<fixture> --exact --nocapture --test-threads=1. UsedXCL_ADAPTER=A770,XCL_DIRECT_DXIL=0, andXCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64. The wrapper ran in a child PowerShell with process-scopedRemoteSigned.3 passed, 0 failed, 0 ignored, 0 GPU skips. Each native process and the mutex wrapper exited 0. All three fixtures reached GPU assertions through their stock split-wave64 HLSL/DXC path, using paired 32-lane waves.
gpu_split_wave64_partial_waves_and_cross_half_exchanges(0.99 s) checked 3,584 output words in two groups each of[48,1,1],[80,1,1],[96,1,1],[112,1,1]and[7,4,4]. The checks covered active-lane counts, masked prefix counts, conditional cross-half readlane, and cross-half bpermute with absent-lane zeroing.gpu_wave64_writelane_and_permlane16_across_halves(0.28 s) checked three scalar write/readback values for lanes 7, 41 and 53 and 384 vector values over all 64 lanes. The checks covered constant and SGPR lane selection, writes under partial EXEC, and five encoded permlane16/permlanex16 cases with FI and BOUND_CTRL.gpu_wave64_dpp16_partial_exec_and_masks_across_halves(0.20 s) checked 384 vector values over all 64 lanes for the encoded row shifts, rotate and XOR with partial EXEC, ROW_MASK, BANK_MASK, FI and BOUND_CTRL.PR #1620 was open at the exact SHA before and after the run. The visible PR discussion had AMD and NVIDIA results and no equivalent same-head Arc A770 result at either check.
Not tested
Native wave64, standalone wave32, direct DXIL, other adapters or revisions, release profile, full test suite, and retail smoke. The DPP16 fixture covers its six encoded cases, with no row-half-mirror case.
AI use
T3 Code / Codex (
gpt-6.2-sol) ran the verification and wrote this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts againstpr1620/*.stdout.logand published.@IgorAntunes66 on GitHub · 2026-11-25 18:01 UTC · original
Test report from a wave32-only Blackwell card, plus a coverage suggestion and a rebase note.
RTX 5070 12 GB (wave32 only → split), driver 621.24, Windows 11 26H2, rustc 1.100.0, DXC 1.9.2602.17; head 8193588's tests appended onto main
68a284a.Rebase: on main
68a284athe commit no longer applies cleanly: main also appended tests at the end ofcrates/xcl/src/gpu/recomp/tests.rs(compute_globallycoherent_only_when_needed, …), so the two additions conflict there. Keeping both blocks is all it takes.The three new tests pass (
--exact,--test-threads=1).Suggestion: they compile with
dxc::compiledirectly, so withXCL_DIRECT_DXIL=1they still test only the HLSL path (the A770 report above also lists direct DXIL as not tested). Routing the container throughdirect_or, asgpu_split_wave64_waves_divergedoes, makes them cover the direct translator's split forms too (Partner::Missing, partialxn, spin), which no test exercises with partial waves today. Three hunks of this shape:(the same in
gpu_wave64_writelane_and_permlane16_across_halvesandgpu_wave64_dpp16_partial_exec_and_masks_across_halves, withMode::Kernelandcode). With that change all three pass on this card both without and withXCL_DIRECT_DXIL=1, so the direct translator matches the reference on 48/80/96/112/7×4×4-thread partial waves, writelane/permlane16 and DPP16 under partial EXEC.Not tested: AMD with the change (the native-wave64 branch also goes through
direct_orthere), release build.AI use: Claude Code (claude-opus-5-5) ran the tests, made the change locally and drafted this comment; I reviewed it.
@GustavoEllwanger on GitHub · 2026-11-25 20:00 UTC · original
Thanks @IgorAntunes66, both points are in.
I rebased onto
main889ef3ekeeping both test blocks, and the three tests now go throughdirect_oras you suggested. The new head is3a18590.On an RTX 5060 (split wave64) and an AMD RDNA2 iGPU (native and split wave64), the three tests pass with
XCL_DIRECT_DXILunset and withXCL_DIRECT_DXIL=1, so the AMD native wave64 form you listed as not tested goes through the direct translator too. The whole suite ismainplus these three on both cards; the numbers are in the description.@DarkPanda69 on GitHub · 2026-11-24 18:27 UTC · original · edited 2026-11-25 20:14 UTC
Update for head
3a18590: same result. Applied onmain6d12f58, all three new tests pass on the RX 9070 XT (native wave64) and the RTX 3060. Wholegpu::filter: RX 9070 XT 701 passed, 2 failed (the AMD fuzz seeds tracked in #2115, same onmain); RTX 3060 703 passed, 0 failed.AMD run with native 64-lane waves, so both sides of the parity tests run on one GPU.
Tested: pass, head
c5e7131applied on its basemain9e3831e, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.cargo test -p xcl --lib -- gpu::recomp --test-threads=4:gpu_split_wave64_partial_waves_and_cross_half_exchanges,gpu_wave64_dpp16_partial_exec_and_masks_across_halvesandgpu_wave64_writelane_and_permlane16_across_halvesok.Not tested: the whole workspace suite; Intel.
AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
@DavidM1911 on GitHub · 2026-11-26 05:58 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@Prime1997 on GitHub · 2026-11-26 13:16 UTC · original · reviewed
Exact reviewed head:
3a185909fe54f817c9533e9ea3399ab2cf1d6ef3.Keep the partial-wave coverage, but correct the first fixture's bpermute oracle. At
tests.rs:10085, byte address4*(lane ^ 33)is expected to read the other 32-lane half. The primary native RDNA2 instruction reports in #772 establish(lane & 32) | ((address >> 2) & 31), which reduces tolane ^ 1here. In the 48-thread case, lane 0 should read0x1001, not0x1021; lane 16 should read0x1011, not zero.The gfx1031 raw-instruction report and gfx1036 opcode-verified report distinguish the two models. These are contributor measurements, not hardware runs performed by this review. Current main's HLSL and direct-DXIL implementations both retain the full-wave rule, so translated native-versus-split parity can pass while preserving the same underlying mistake.
Please coordinate with #1022, correct the bpermute source calculation and comments, and retain the true cross-half readlane assertions. XOR1 over the current even partial-wave lengths no longer tests absent-source zeroing; use an intentionally inactive source or an odd partial-lane count if that claim is retained.
Validation: exact-head source and arithmetic checked against those primary reports and both current-main lowerings. No new build, GPU dispatch or retail run was performed for this finding.
AI use: Codex (GPT-6) reviewed the source and checked the stated evidence. Optional temporary Discord for coordinating contributor work, testing and comparing results.
@GustavoEllwanger on GitHub · 2026-11-26 13:31 UTC · original
Thanks @Prime1997, you're right: with the half-wave rule from #772,
l ^ 33readsl ^ 1, so the old oracle only checked that native and split share the full-wave mistake.Fixed in
95a3244:ds_bpermute_b32case now reads lanel ^ 16, which stays in the lane's own 32-lane half. The expected value is written with the #772 rule,(l & 32) | ((l ^ 16) & 31), so it is right on hardware and does not depend on the translators: it passes onmaintoday and should keep passing once #1022 lands. The cross-half behaviour itself stays with #1022, which already tests it.[48, 1, 1]lane 32 (reads absent lane 48, gets 0), so the check is live.v_readlane_b32assertions are unchanged.On an RTX 5060 (split) and an RDNA2 iGPU (native and split), the test passes with and without
XCL_DIRECT_DXIL=1. Full suite numbers are in the description.cc @upipibi, for #1022: this PR no longer asserts anything across halves for
ds_bpermute, so the two don't overlap.3a185909feto95a32447d9View 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.