Repository navigation
Tests: cover split-wave64 and native-wave64 parity on partial waves and cross-lane ops - #1620
GustavoEllwanger wants to merge 1 commit into
Conversation
|
Update for head Update for head AMD run with native 64-lane waves, so both sides of the parity tests run on one GPU. Tested: pass, head
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. |
|
Tested commit Tested
Not tested
AI use
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Arc A770 compatibility validation for xcl-dev/xcl PR #1620Tested Clean detached checkout of Outside the Arc mutex, Under 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.
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 ( |
d6a9cee to
8193588
Compare
|
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 68a284a the commit no longer applies cleanly: main also appended tests at the end of The three new tests pass ( Suggestion: they compile with - let t = translate(&p, &Options { mode: Mode::Compute(cs), wave64: true, split_wave64, ..Default::default() }).unwrap();
+ let opt = Options { mode: Mode::Compute(cs), wave64: true, split_wave64, ..Default::default() };
+ let t = translate(&p, &opt).unwrap();
assert!(t.complete(), "split={split_wave64} {dims:?}: {:?}", t.unsupported_why);
- let dxil = dxc::compile(&t.hlsl, "main", "cs_6_6", &[]).unwrap_or_else(|e| panic!("{e}\n{}", t.hlsl));
+ let dxil = direct_or(&p, &opt, dxc::compile(&t.hlsl, "main", "cs_6_6", &[]).unwrap_or_else(|e| panic!("{e}\n{}", t.hlsl)));(the same in Not tested: AMD with the change (the native-wave64 branch also goes through AI use: Claude Code (claude-opus-5-5) ran the tests, made the change locally and drafted this comment; I reviewed it. |
8193588 to
3a18590
Compare
|
Thanks @IgorAntunes66, both points are in. I rebased onto On an RTX 5060 (split wave64) and an AMD RDNA2 iGPU (native and split wave64), the three tests pass with |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
Prime1997
left a comment
There was a problem hiding this comment.
Exact reviewed head: 3a185909fe54f817c9533e9ea3399ab2cf1d6ef3.
Keep the partial-wave coverage, but correct the first fixture's bpermute oracle. At tests.rs:10085, byte address 4*(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 to lane ^ 1 here. In the 48-thread case, lane 0 should read 0x1001, not 0x1021; lane 16 should read 0x1011, 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.
…nd cross-lane ops The three tests build their DXIL through direct_or, so with XCL_DIRECT_DXIL=1 they also check the direct translator's split forms (missing partner, partial xn, spin) on partial waves (suggested by IgorAntunes66). The ds_bpermute_b32 case reads lane ^ 16, inside the lane's own 32-lane half: in wave64 on RDNA2 the instruction does not cross halves (xcl-dev#772), which xcl-dev#1022 fixes in the translators. Waves of 16 and 48 lanes still read absent lanes and must get 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3a18590 to
95a3244
Compare
|
Thanks @Prime1997, you're right: with the half-wave rule from #772, Fixed in
On an RTX 5060 (split) and an RDNA2 iGPU (native and split), the test passes with and without cc @upipibi, for #1022: this PR no longer asserts anything across halves for |
What 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)(Recompiler: ds_bpermute_b32 in wave64 may stay within each 32-lane half on RDNA2 (needs a hardware run) #772), which Recompiler: ds_bpermute_b32 in wave64 stays in each 32-lane half (#772) #1022 fixes in both translators, so this test is right on hardware and passes before and after Recompiler: ds_bpermute_b32 in wave64 stays in each 32-lane half (#772) #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, DXIL fuzz tests: fuzz_validate_and_gpu_1 fails on AMD (seed 722 and others, RDNA2-4), so the default suite is red there #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