Tests: verify V_PERMLANE16_B32 and V_PERMLANEX16_B32 on the GPU #473
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/478"
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 Vadson159 on 2026-11-24T00:53:11Z.
Add GPU verification tests for RDNA2
V_PERMLANE16_B32(previously untested) andV_PERMLANEX16_B32against the AMD RDNA 2 ISA specification (V_PERMLANE16_B32/V_PERMLANEX16_B32VOP3 reference).Tests only — no runtime code in
crates/xcl/srcis changed.What is in it
crates/xcl/tests/gpu_recomp_permlane.rs:permlane16_and_permlanex16_translate_and_compile_with_dxc: verifies HLSL translation and DXC compilation across all(FI, BOUND_CTRL)flags and all four wave configurations (wave64,split-wave64,wave32,wave32@hw64).gpu_permlane_row_permutations_and_inplace_aliasing: checks row-local vs cross-row (^ 16) permutations with SGPR, inline-constant (0,-1), and 32-bit literal selectors, plus in-placeVDST == SRC0aliasing.gpu_permlane_fi_bound_ctrl_and_divergent_exec: checks all four(FI, BOUND_CTRL)flag combinations (OP_SEL[0..1]) and in-placeVDST == SRC0under an asymmetric divergentEXECmask covering active/inactive source and destination lanes across all supported wave modes.Tested
32.0.32029.2010, 16191 MiB VRAM; AMD Radeon(TM) Graphics iGPU also present), Windows 11 (10.0.26300),rustc 1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11(SDK10.0.26100.0), debug build.XCL_REQUIRE_GPU=wave64,mesh+cargo test --workspace -- --test-threads=4: 679 passed, 0 failed, 41 ignored (0 GPU tests skipped;XCL_SAMPLE_*unset).cargo clippy -p xcl --test gpu_recomp_permlane: 0 warnings incrates/xcl/tests/gpu_recomp_permlane.rs.rustfmt --check crates/xcl/tests/gpu_recomp_permlane.rs: passed.Regression run
crates/xcl/tests/gpu_recomp_permlane.rs(crates/xcl/srcis untouched).Not tested
split-wave64andwave32paths were exercised on the RX 9070 XT).--release) and retail titles (XCL_SAMPLE_*unset; no game folder locally).AI use
Imported from ivall/xcl. Originally posted by thehollowedone on 2026-11-24T01:11:45Z.
Tested
The two GPU readback tests passed on a wave32-only RTX 3080 Ti (driver 621.35), covering both native wave32 and XCL's split-wave64 path. The per-lane comparisons passed for row permutations, in-place destinations, and all four FI / BOUND_CTRL combinations under divergent EXEC. The separate translation test compiled all four configurations with DXC 1.8.2502.11. Tested commit bdc8a0a
Ryzen 7 9800X3D, Windows 11 build 26300, Rust 1.99.1 MSVC, debug.
cargo test --offline --locked -p xcl --test gpu_recomp_permlane -- --test-threads=1 --nocapturereported 3 passed, 0 failed, 0 ignored, with no reported skips.Not tested
Execution on native 64-lane hardware, the full workspace suite, or retail titles.
AI use
Codex with GPT-6.2 Astra ran the tests and drafted this report.
Imported from ivall/xcl. Originally posted by nullmarsh on 2026-11-24T01:12:17Z.
RDNA2 run, since Not tested lists RDNA2 (plus a native RDNA4 run): the two GPU tests hang on RDNA2 under Proton, while XCL's existing GPU tests pass in the same setup. On native Windows / RDNA4 all three pass.
RDNA4, native Windows. Head
bdc8a0a(already onmain2997c9a), AMD Radeon RX 9060 XT, driver 32.0.32029.2010, Windows 11 Pro 26200, Rust 1.100.0, DXC 1.9.2602.17, debug.XCL_REQUIRE_GPU=wave64,mesh: 3 passed in 0.72 s.RDNA2, Steam Deck (Van Gogh, RADV, Mesa 26.2.0-devel), SteamOS 3.8.28. The same Windows test binary, run with Proton 11.0-2e's
wineand vkd3d-proton (WINEDLLOVERRIDES=d3d12,d3d12core,dxgi=n), with DXC 1.9.2602.17 viaXCL_DXC_DIR:permlane16_and_permlanex16_translate_and_compile_with_dxc: passes.gpu_permlane_row_permutations_and_inplace_aliasingandgpu_permlane_fi_bound_ctrl_and_divergent_exechang. Libtest prints "running for over 60 seconds" and they are killed at 240 s (both together) or 120 s (row test alone,--test-threads=1), with and withoutVKD3D_CONFIG=ignore_shared_fence. No amdgpu ring timeout or reset in the kernel log, so the GPU isn't stuck; something is waiting.main's lib tests:gpu_typed_buffer_loads_and_storespasses in 0.67 s, andgpu_dispatch_matches_native_wave64_reference/paired_halves_match_independent_native_wave64_referencespass.So it's specific to these tests on this stack. It could be the vkd3d-proton / RADV path rather than XCL (this isn't native Windows on RDNA2), but the existing native-wave64 GPU tests don't hang there. The tests loop over four wave modes, and I couldn't tell which one hangs without changing the test. If you want, I can rerun a build that prints the mode before each dispatch.
AI use
Imported from ivall/xcl. Originally posted by 13hourstilliland on 2026-11-24T01:35:05Z.
Full workspace and targeted run on Ampere 8 GB (RTX 3070, 32-lane waves) at exact PR head
bdc8a0a.Tested
bdc8a0acaffdbce326562251a5e6b71f07eb1ee2(PR #478 head), clean worktreestable-x86_64-pc-windows-gnu, not MSVC); DXC 1.9.2609.5 (01b62ad4) viaXCL_DXC_DIR; debug build; noXCL_SAMPLE_*setcargo test -p xcl --test gpu_recomp_permlane -- --show-outputpermlane16_and_permlanex16_translate_and_compile_with_dxc,gpu_permlane_row_permutations_and_inplace_aliasing,gpu_permlane_fi_bound_ctrl_and_divergent_execall ran and passed on the GPU in 0.32 s, no skip)cargo test --workspace --no-fail-fast -- --test-threads=4 --show-output(interactive desktop session)xcllib: 636 passed, 0 failed, 21 ignored;gpu_recomp_permlane: 3/0;e2e: 3/0)SKIPPED(4, not coverage):no wave64(2):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask,gpu::recomp::tests::gpu_wave32_program_in_wave64_hardwareno D3D12 debug layer(2):test_title_draws_with_a_root_signature_under_the_debug_layer,uploads_start_from_each_subresources_stateNot tested
scripts/smoke.ps1, D3D12 debug-layer testsAI use
gemini-4-neon: ran the commands and wrote this report from the logs; the human reviewed it.Imported from ivall/xcl. Originally posted by joeypercia on 2026-11-24T01:40:10Z.
RDNA2 on native Windows, to set against the Proton hang above: all three pass.
Tested — head
bdc8a0amerged ontomain7ebf1b8(clean merge)XCL_ADAPTER=radeon; Windows 11 Pro 26200; Rust 1.100.0 MSVC, debug; DXC 1.8.2502.11 (SDK 10.0.26100)cargo test -p xcl --test gpu_recomp_permlane -- --nocapture --test-threads=1: 3 passed, 0 failed, 0 ignored (0.69 s, no hang)scripts\test.ps1: 680 passed, 0 failed, 41 ignored;SKIPPED:gpu_geometry_mode_es_gs_strip,gpu_mesh_mode_two_passes(no mesh shaders), neither in this PRgpu_recomp_permlane3 passed; whole suite with--no-fail-fast680 passed, 0 failed, 41 ignoredSo the RDNA2 hang looks specific to RADV / vkd3d-proton rather than RDNA2 hardware, though this is an iGPU (Raphael), not a Van Gogh APU.
Not tested
AI use
Imported from ivall/xcl. Originally posted by nullmarsh on 2026-11-24T06:00:09Z.
Correction to my Steam Deck result above: the hang came from launching the tests over SSH without an X display, not from Proton or this PR. Rerun at
bdc8a0a, same setup: withoutDISPLAY/XAUTHORITY,gpu_permlane_row_permutations_and_inplace_aliasingandgpu_permlane_fi_bound_ctrl_and_divergent_exechang as before; withDISPLAY=:0and the session'sXAUTHORITY, both pass (0.79 s each). Details on #519.AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T14:05:13Z.
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!
Imported from ivall/xcl. Originally posted by tyr0nsur on 2026-11-25T14:58:22Z.
Tested
The three tests at
bdc8a0acaffdpassed on a desktop RTX 4060 (Ada, fixed 32-lane waves), Windows 11 Pro build 26300, NVIDIA 32.0.16.2114, DXC 1.8.2502.11, Rust 1.100.0 MSVC.cargo test --locked -p xcl --test gpu_recomp_permlane -- --nocapture --test-threads=1passed 3/3 with zero test skips.I also repeated the divergent-EXEC test with wholly inactive rows and halves. I kept the original nine destination/flag cases and the expected-value function. The seven
(EXEC_LO, EXEC_HI)pairs in hex were(0,0), (0,FFFFFFFF), (FFFFFFFF,0), (8000,10000), (80000000,1), (FFFF0000,FFFF), (FFFF,FFFF0000). The three(SRC1,SRC2)pairs were(F1B38E40,2D69C075), (FFFFFFFF,FFFFFFFF), (76543210,FEDCBA98). Native wave32 and split-wave64 produced 18,144/18,144 expected lane/register values in 42 GPU dispatches.Not tested
Native wave64 and wave32 on 64-wide hardware are outside this adapter’s range. This targeted run covered the PR tests and the added boundary cases.
AI use
OpenAI Codex (GPT-6) prepared the additional matrix, ran it locally and wrote this report.
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T20:42:28Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T17:25:02Z.
merge-check claim
head:
bdc8a0acafImported from ivall/xcl. Originally posted by saintwolf on 2026-11-30T17:30:51Z.
merge-check
base:
9dfbe3ea66head:
bdc8a0acafmerge: clean (trial merge 5482383bbb65c46b3ff1ed68ca62080b496aa95f; git diff --check clean; +433/-0, one new file: crates/xcl/tests/gpu_recomp_permlane.rs)
build: cargo build --workspace -> ok (pre-existing warnings only, none from the PR's lines)
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2888 passed, 1 failed, 51 ignored (44 suites; +3 passed from the new test binary); SKIPPED: 27, the standard set for this card (22 "no wave64" — wave32-only GPU, 2 "no heap windows", 1 "cannot disable the driver cache (Developer Mode)", 2 "no xgameruntime.dll"). Failing: gpu::dxil::msaa_tests::gpu_direct_image_get_resinfo_d16 — pre-existing on this machine, identical on base
9dfbe3ea. All three new tests pass here with no skip: the two GPU tests ran the split-wave64 and wave32 configurations, and the translation test compiled all four wave options through DXC.review: read the whole diff. Test-only PR: GPU verification of V_PERMLANE16_B32 / V_PERMLANEX16_B32 against a CPU reference model. I checked the model against the RDNA2 ISA: 16-lane row-local permutations, the per-lane 4-bit indices from SRC1 for row positions 0-7 and SRC2 for 8-15, the cross-row op reading the sibling 16-lane group, FI = 1 forcing the read regardless of source-lane activity, FI = 0 reading only from active source lanes (0 with BOUND_CTRL set, old VDST otherwise), all under a divergent EXEC, with wave32-on-64-lane-hardware modeled as a second independent 32-lane wave sharing the 32-bit EXEC. The tests exercise row-local vs cross-row, SGPR / inline-constant / 32-bit-literal select words, in-place VDST == SRC0 aliasing, all four (FI, BOUND_CTRL) combinations under a divergent EXEC, and every wave configuration the hardware supports. I verified the encoding assumptions against the recompiler's decoders: inline constants 128 -> 0u and 193 -> 0xFFFFFFFF (code32's 128..=192 / 193..=208 literal ranges, emit.rs:817-818), 255 -> the 32-bit literal field; the translation test pins the rla / xcl_x_rla_half lowering, the cross-row XOR, and the FI = 0/1 lane-bit checks, and DXC-compiles every wave option. The GPU tests run DXIL compiled from the HLSL path (runner::run takes precompiled DXIL), so they exercise the HLSL lowering in each wave mode. Thread: 3/3 on an RTX 3080 Ti, RTX 3070 (with a full workspace run), an RX 9060 XT (native wave64), an RDNA2 iGPU and an RTX 4070 Ti, an RTX 3060 Ti (lib), and an RTX 4060 (Ada, wave32-only) that additionally repeated the divergent-EXEC matrix with 7 EXEC pairs and 3 select pairs (18,144 values, 42 dispatches, all matching); the one RDNA2/Proton hang was traced to an SSH-without-X-display launch, not this PR (#519). Note: open #971 adds the same FI/BC x EXEC matrix as an 82-line addition to the lib tests — overlapping, though its gfx1036 native-wave64 run complements; flagged for the duplicate tracker.
performance: none; tests only.
verdict: safe to merge
hardware / tool and model: RTX 4070 SUPER (driver 32.0.16.2140), Ryzen 7 7800X3D, Windows 11 build 26300, Rust 1.100.0 / OpenCode, Qwen 3.8 27B
Imported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T17:50:10Z.
merge-check claim
head:
bdc8a0acafImported from ivall/xcl. Originally posted by brainhay5 on 2026-11-30T18:19:31Z.
merge-check claim
head:
bdc8a0acafWithdrawn: saintwolf claimed this head first (about 25 minutes earlier) and I missed it when selecting. Not duplicating the work - the claim is yours.
Imported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T00:26:53Z.
merge-check claim
head:
bdc8a0acafImported from ivall/xcl. Originally posted by brainhay5 on 2026-12-01T00:32:31Z.
merge-check
base:
d0832e614fhead:
bdc8a0acafmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2892 passed, 1 failed, 51 ignored; 29 SKIPPED lines
failing: test_title_runs_and_game_folder_is_untouched
review: automated overnight check — diff inspected for safety only (no build/CI/toolchain/script changes, no process/network/runtime-loading code); no duplicate search performed; no line-by-line code review.
performance: not assessed beyond the suite.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB, driver 610.88 (32.0.16.1088); Ryzen 7 5800X3D, 64 GB; Windows 11 22631; OpenCode agent, DeepSeek V4.1 Flash 1017
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:34:25Z.
Triage (#1607) – head
bdc8a0a#971 adds a GPU test for the same thing: permlane16/permlanex16 in all four FI/BOUND_CTRL modes under a partial EXEC. This PR was opened first and covers more: SGPR, inline and literal selects, VDST == SRC0, and the wave32@hw64 mode. main already has
gpu_permlane16_wqm_and_lds_stride64, which covers three of the modes.Minor:
gpu_readyskips the whole test with "no wave64" whenwave64_programs_supportedis false, even though the split-wave64 and wave32 configurations could still run on that GPU.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.