Recompiler tests: GPU coverage for v_permlane16_b32 and v_permlanex16_b32 FI/BC flags #965
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/971"
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 certified-retart on 2026-11-24T09:43:33Z.
Adds GPU execution coverage for
v_permlane16_b32(previously untested on GPU) andv_permlanex16_b32across all four(FI, BC)(OP_SEL[1:0]) flag combinations and partialEXECmasks, verified against RDNA2 (gfx1036) hardware in native wave64. Test-only: nothing outsidecrates/xcl/src/gpu/recomp/tests.rschanges.What is in it
crates/xcl/src/gpu/recomp/tests.rs(gpu_permlane16_and_permlanex16_fi_bc_and_exec):EXEC = 0x5555_5555/0x5555_5555_5555_5555in wave32, native wave64 (on wave64-capable GPUs), and split wave64.sel[i] = 15 - i, reading inactive odd lanes) tests all four(FI, BC)combinations (OP_SEL = 0, 1, 2, 3) for bothv_permlane16_b32andv_permlanex16_b32:FI=0, BC=0preservesvdst;FI=0, BC=1writes0;FI=1, BC=0andFI=1, BC=1fetch the inactive source lane (FIoverridesBC).sel[i] = (i + 2) & 15, reading active even lanes) checks same-row (v_permlane16_b32) vs swapped-row (v_permlanex16_b32) reads within each 32-lane half across bothSRC1(lanes0..7) andSRC2(lanes8..15).v10..=v19) untouched.Hardware reference & negative control
(instruction, op_sel)cases (0x377/0x378,op_sel = 0..3) directly on AMD Radeon(TM) Graphics (gfx1036, Ryzen 7 9800X3D iGPU, driver32.0.21030.2001, AMD OpenCL2.1 AMD-APP (3652.0)with-cl-std=CL2.0 -Wf,-mwavefrontsize64) underEXEC = 0x5555_5555_5555_5555: the translated expectations match hardware on all 64 lanes.emit.rs, reverted): swappingfiandboundinemit.rsfailed the new test immediately (wave32 split=false lane 0: permlane16 FI=1 BC=0: left: 0, right: 1015).Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2602.17, debug build, Agility SDK v620 (XCL_D3D12_DIR).gfx1036RDNA2 iGPU, driver32.0.21030.2001, native wave64,XCL_ADAPTER=1):cargo test -p xcl --lib gpu::recomp::tests -- --test-threads=1 --nocapture: 118 passed, 0 failed, 17 ignored; 0SKIPPED(gpu_permlane16_and_permlanex16_fi_bc_and_execran wave32, native wave64, and split wave64).32.0.16.1074, wave32,XCL_ADAPTER=0):cargo test --workspace -- --test-threads=1 --nocapture: 717 passed, 0 failed, 41 ignored (gpu_permlane16_and_permlanex16_fi_bc_and_execran wave32 and split wave64).SKIPPEDon RTX 5070 / this host:gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64),test_title_draws_with_a_root_signature_under_the_debug_layer(no d3d12SDKLayers.dll),uploads_start_from_each_subresources_state(no D3D12 debug).Regression run
Not needed: this PR modifies only
crates/xcl/src/gpu/recomp/tests.rsand does not change the runtime.Not tested
AI use
gemini-4-neon) wrote and ran the RDNA2 OpenCL probe, wrote the GPU test and this description, and ran the test suites and negative control on both GPUs named above.Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-24T10:16:33Z.
Ran the new test on an NVIDIA Blackwell part at
7cc5661(wave32 only, so the wave32 and split-wave64 forms; no native wave64 here).Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC 14.44.35207, DXC 1.9.2609.5, debug build.
All four (FI, BC) modes under the partial EXEC mask match the expected RDNA2 values here. This is a second Blackwell part and driver line beyond the author's RTX 5070 run, on Windows 11 build 26200.
Not tested: native wave64, pixel shaders / helper lanes, Intel GPUs, Wine, release profile, retail titles.
AI-assisted (OpenCode), model: DeepSeek V4.1 Flash 1017 - checked out the PR's head commit in a detached worktree, built it, ran the test binary, wrote this report; the worktree was not modified.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T12:24:31Z.
Independent verification, merged onto current
main384f7f7locally (clean merge).Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
cargo test -p xcl --lib permlane: 1 passed, 0 failed — the new GPU testgpu_permlane16_and_permlanex16_fi_bc_and_execcovers the FI/BC flag combinations ofv_permlane16_b32/v_permlanex16_b32on real hardware.AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T03:27:52Z.
Tested
7cc566135b1f70cb6f04a929835ed871a3478177on Windows 11 build 26200, AMD Radeon RX 6800M (driver30.0.13002.13003), Ryzen 9 5980HX, Rust 1.99.0 MSVC, DXC/DXIL 1.9.2609.5.XCL_ADAPTER=6800MandXCL_REQUIRE_GPU=1were set.cargo test --locked -p xcl --lib -j 2 gpu::recomp::tests::gpu_permlane16_and_permlanex16_fi_bc_and_exec -- --exact --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored, no explicit skip. Repeated withXCL_DIRECT_DXIL=0and=1; both invocations passed.translate(...), compilest.hlslwith DXC, then runs that shader on the GPU. Therefore the environment change did not exercise the direct DXIL translator; these are two runs of the HLSL route. The test covers FI/BC combinations, partial EXEC, active and inactive source lanes, and wave32 plus split wave64. Native wave64 is conditional on adapter support and was not separately instrumented in this run.Not tested
AI use
OpenAI Codex (GPT-6, exact variant not exposed in this session) reviewed the exact test and logs, ran both GPU invocations, and drafted this report.
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:51:34Z.
Arc A770 verification for xcl-dev/xcl PR #971
Tested
7cc566135b1f70cb6f04a929835ed871a3478177before and after the run. The worktree was clean and detached at that SHA both times. The PR description and discussion contained AMD and NVIDIA results and no equivalent Arc report. Read upstreamAGENTS.mdandCONTRIBUTING.mdatcbc296ab65a2661a61e3e2da109134bcd5319f60.26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 driver32.0.101.9175. Rust1.100.0(0ef1bc386,x86_64-pc-windows-msvc), Cargo1.100.0, unoptimized test profile. The test logged DXC and DXIL1.9.2609.5.cargo test --locked -p xcl --lib --no-runsucceeded outside the Arc mutex.CARGO_TARGET_DIR=L:/XclTooling/pr1778-2e2ee55-20261125-020159/target,CARGO_BUILD_JOBS=2,CARGO_INCREMENTAL=0,CARGO_PROFILE_DEV_DEBUG=0,CARGO_PROFILE_TEST_DEBUG=0.TEMPandTMPpointed to thetempdirectory beside this report.XCL_ADAPTER=A770andXCL_DXC_DIR=$env:LOCALAPPDATA/XclTooling/dxc-1.9.2609/bin/x64were set.SKIPPEDlines, 696 filtered out. Test runner time was 0.27 s. The wrapper returned exit 0 and logged mutex release.cs_6_6with DXC, and checked 960 VGPR values across wave32 and split wave64. PartialEXEC(0x5555_5555/0x5555_5555_5555_5555) enabled even lanes and left all ten destination registers (v10..=v19) at their sentinels on odd lanes.15 - i, active lanes addressed inactive sources for bothv_permlane16_b32andv_permlanex16_b32.(FI, BC) = (0, 0)preserved the destination,(1, 0)fetched the inactive source,(0, 1)wrote zero, and(1, 1)fetched the inactive source. Selector(i + 2) & 15exercised active source reads with(0, 0)through both selector words (SRC1andSRC2), checking same-row reads and swapped-row reads within each 32-lane half.WaveLaneCountMin=8andWaveLaneCountMax=32(L:/XclTooling/pr1577/wave-capability-20261125-033726.log).Not tested
Native wave64, direct DXIL translation, pixel-shader helper lanes, other adapters, release builds, the wider test suite, and retail-title smoke.
AI use
T3 Code / Codex (
gpt-6.2-sol) verified the revision, ran the checked-in fixture, and wrote this report from the logs.Separate build and GPU stdout/stderr logs and the GPU exit record are in this run directory.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T03:23:27Z.
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
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:30:42Z.
merge-check claim
head:
7cc566135bImported from ivall/xcl. Originally posted by throny on 2026-11-28T02:45:23Z.
merge-check
base:
753e8b1ahead:
7cc566135bmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1513 passed, 0 failed, 47 ignored; its GPU test ran and passed on this wave32-only card (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored
review: none; test-only. The expected values follow the instructions' definitions (the selector nibbles, the row swap of the cross-row form, fetch-inactive and bound-control cases) and agree with the existing permlane test on main, which it partly overlaps; it adds the fetch-inactive and bound-control cases, the cross-row form across the modes, and split wave64.
performance: none.
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T11:38:15Z.
merge-check claim
head:
7cc566135bImported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T12:04:47Z.
merge-check
base:
e429936c10head:
7cc566135bmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2127 passed, 9 failed, 48 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole, gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops, gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange, gpu::recomp::heap_window_tests::gpu_heap_flat_reads_match_guarded_and_root_output, gpu::recomp::tests::gpu_compute_mode_dispatch_abi, gpu::recomp::tests::gpu_float_cas_uses_ieee_equality, test_title_draws_with_a_root_signature_under_the_debug_layer, test_title_runs_and_game_folder_is_untouched, test_title_runs_under_the_debug_layer_with_dred: these 9 fail on the base too (the base e429936c's suite, run alone on this PC with the same command: 2126 passed, 9 failed, 48 ignored, 25 SKIPPED, these same 9 failing), and each also failed when rerun alone on this merge (the two debug-layer e2e tests stop on the D3D12 debug layer rejecting a pixel shader as corrupt or unsigned, and test_title_runs_and_game_folder_is_untouched on the test title's console command list memory-methods check, "post-Wait32/64 write failed"); not caused by this PR. The suite ran on this PC at the same time as 3 other PRs' suites, in one queued job.
review: none. Whole diff read (one GPU test in recomp/tests.rs: v_permlane16_b32 / v_permlanex16_b32 in all four FI / BC modes under EXEC 0x5555..., with selectors that hit inactive and active source lanes, on wave32, native wave64 where supported, and split wave64). The expected lane arithmetic (same row, swapped row, 15 - i and (i + 2) & 15) checks out. Native wave64 is not available here, so that case did not run.
performance: no runtime change (test-only diff).
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge 9f8ce341302d4f563ee9eac79fe369614f4fc43f (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
correction (2026-11-28): the base counts above were first given as 2128 passed: that base run reused this PC's merge test binary (one cargo target dir for both sides). The base was rerun with its own target dir; the same 9 tests fail on it, so the classification and the verdict stand.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T04:33:50Z.
Triage (#1607) – head
7cc5661Overlap: #478 (
crates/xcl/tests/gpu_recomp_permlane.rs) runs the same check,v_permlane16_b32/v_permlanex16_b32with all fourOP_SEL(FI, BC) values under a divergent EXEC. It compares against the same ISA rule: FI or an active source gives the value, otherwise BC gives 0, otherwise vdst is unchanged. It also covers row permutations, VDST==SRC0 aliasing and wave32@hw64. #478 was opened first and has no conflicts. This PR conflicts with main inrecomp/tests.rs.The expected values in this test are consistent with #478's.
Recommendation: close (duplicate of #478).
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T15:57:00Z.
Closing as superseded: the same change is in #478 (open, mergeable, required checks green). From Foniass's rechecked close list on #1607, checked again by script just now. If something here is still missing, say so and reopen it, or ask and I will.
AI use: Claude Code (Claude Opus 5.5).
Pull request closed