Tests: verify VALU carry/borrow ops and V_MAD_U64_U32 on the GPU #519
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!519
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-519"
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?
@Vadson159 on GitHub · 2026-11-24 01:13 UTC · original
Vadson159:test/recomp-carry-borrow→main· +700 −0 · 1 files · 1 commits · openAdd GPU verification tests for RDNA2 VALU carry/borrow arithmetic (
V_ADD_CO_U32,V_SUB_CO_U32,V_SUBREV_CO_U32,V_ADD_CO_CI_U32,V_SUB_CO_CI_U32,V_SUBREV_CO_CI_U32) across bothENC_VOP2andVOP3_SDST_ENC, plusV_MAD_U64_U32, verified against the AMD RDNA 2 ISA specification.Tests only — no runtime code in
crates/xcl/srcis changed.What is in it
crates/xcl/tests/gpu_recomp_carry_borrow.rs:carry_borrow_translate_and_compile_with_dxc: verifies HLSL translation and DXC compilation across all four wave modes (wave64,split-wave64,wave32,wave32@hw64), includingx64_masksemittingxcl_x_ballot_local(for lane-by-lane intermediate carry/borrow masks alongsidexcl_x_ballot(for whole-live masks.gpu_carry_borrow_single_ops_and_edge_cases: verifies per-lane results andSDST/VCCcarry/borrow masks across boundary pairs, LCG operands, SGPR / inline-1/ 32-bit literal sources, andV_CNDMASK_B32upper-half readback forwave32@hw64.gpu_multiword_chains_in_place_and_divergent_exec: verifies 96-bit add, sub, and subrev carry/borrow chains,VDST == SRC0andSDST == SRC2in-place aliasing, and divergentEXECmask preservation/clearing.gpu_v_mad_u64_u32_carry_and_aliasing: verifies 64-bitV_MAD_U64_U32results andSDSTcarry-out masks across wraparound boundaries, SGPR / inline-1/ literal operands,VDST == SRC2aliasing, and divergentEXEC.Tested
32.0.32029.2010; AMD Radeon(TM) Graphics driver32.0.21045.29003also present), Windows10.0.26300.0,rustc 1.100.0(0ef1bc386 2026-11-09), DXC1.8.2502.11(C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0\x64), debug build.XCL_REQUIRE_GPU=wave64,mesh+.\scripts\test.ps1(cargo test --workspace -- --test-threads=4): 680 passed, 0 failed, 41 ignored (0 GPU tests skipped;XCL_SAMPLE_*unset). Note: an initial run hit an unrelated pre-existing race inhle::d3d12x::cpu_writes::tests::writes_land_after_the_queue(passed 1/1 standalone and in the subsequent full run).cargo test -p xcl --test gpu_recomp_carry_borrow: 4 passed, 0 failed, 0 ignored.cargo clippy -p xcl --test gpu_recomp_carry_borrow: 0 warnings incrates/xcl/tests/gpu_recomp_carry_borrow.rs.rustfmt --check crates/xcl/tests/gpu_recomp_carry_borrow.rs: passed.Regression run
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
@thehollowedone on GitHub · 2026-11-24 01:19 UTC · original
Tested
The focused integration suite passed on the RTX 3080 Ti in native wave32 and split-wave64 mode. GPU readback matched for the carry and borrow edge cases, multiword chains with divergent EXEC, and
V_MAD_U64_U32carry and aliasing. The separate translation test compiled all four wave configurations with DXC. Tested commit 40fc19dWindows 11 build 26300, Ryzen 7 9800X3D, NVIDIA driver 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11, debug.
cargo test --offline --locked -p xcl --test gpu_recomp_carry_borrow -- --test-threads=1 --nocapturereported 4 passed, 0 failed, 0 ignored, and no reported skips.Not tested
Execution on native 64-lane hardware, the full workspace suite, and retail titles.
AI use
Codex with GPT-6.2 Sol ran the tests and drafted this report.
@PHeitor1 on GitHub · 2026-11-24 01:26 UTC · original
Tested
40fc19dmerged ontomain508a0c7.RTX 5060 Ti 8 GB (Blackwell, 32-lane waves), NVIDIA 621.24, Ryzen 5 5600X, Windows 11 Pro 26300 (native, Graphics Tools + XGameRuntime installed), rustc 1.100.0 MSVC, debug,
cargo test --workspace --no-fail-fast -- --test-threads=4, noXCL_SAMPLE_*.Pass: 684 passed, 0 failed, 41 ignored. SKIPPED: only the 2
no wave64tests. The 3 tests ingpu_recomp_carry_borrowpass on native wave32:carry_borrow_translate_and_compile_with_dxc,gpu_carry_borrow_single_ops_and_edge_casesandgpu_v_mad_u64_u32_carry_and_aliasing.Run and written with Claude Code (Claude Opus 5.5).
@ghost on GitHub · 2026-11-24 01:32 UTC · original
RDNA4 pass, plus an RDNA2 data point: on a Steam Deck under Proton, the three GPU tests hang. That's the same as #478's GPU tests there.
RDNA4, native Windows:
40fc19dmerged ontomain508a0c7(clean merge). AMD Radeon RX 9060 XT (RDNA4), driver 32.0.32029.2010; Ryzen 7 5800X3D; Windows 11 Pro 26200; Rust 1.100.0x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug build..\scripts\test.ps1: 684 passed, 0 failed, 41 ignored.XCL_REQUIRE_GPU=wave64,mesh cargo test -p xcl --test gpu_recomp_carry_borrow: 4 passed in 0.39 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,VKD3D_CONFIG=ignore_shared_fence), DXC 1.9.2602.17 viaXCL_DXC_DIR, each test alone (--exact --test-threads=1):carry_borrow_translate_and_compile_with_dxc: passes.gpu_carry_borrow_single_ops_and_edge_cases,gpu_multiword_chains_in_place_and_divergent_exec,gpu_v_mad_u64_u32_carry_and_aliasing: each still running when killed at 75 s.In the same setup,
main's lib GPU tests (e.g.gpu_typed_buffer_loads_and_stores,gpu_dispatch_matches_native_wave64_reference) pass in under a second. This PR and #478 both run their GPU tests from acrates/xcl/tests/gpu_recomp_*.rsintegration test, and both hang there. So it may be something about that path under vkd3d-proton rather than these instructions. I couldn't confirm it withmain's own GPU integration test (gpu_compute_e2e): that one stops earlier on a vkd3d-proton assertion (iface->lpVtbl == &d3d12_fence_vtbl). RDNA2 through vkd3d-proton isn't native Windows, so take this as a lead, not a verdict.AI use
@ghost on GitHub · 2026-11-24 01:58 UTC · original
Follow-up: joeypercia's native-Windows RDNA2 run on #478 passes, so the Steam Deck hang above is the Proton / vkd3d-proton path, not RDNA2 or this PR. This PR's RDNA4 pass stands. The Deck result only matters for running under Proton/Wine.
AI use
@ghost on GitHub · 2026-11-24 06:00 UTC · original
Correction to my Steam Deck result above: the hangs came from how I launched the tests over SSH, not from Proton, vkd3d-proton or this PR. With an X display the three GPU tests pass on the Deck.
Tested (head
40fc19d, the same Windows test binary setup as above: Proton 11.0wine, vkd3d-proton, each test alone with--exact --test-threads=1, 75 s timeout)DISPLAYandXAUTHORITY, as in my earlier runs:gpu_carry_borrow_single_ops_and_edge_cases,gpu_multiword_chains_in_place_and_divergent_execandgpu_v_mad_u64_u32_carry_and_aliasinghang, 5 of 5 runs.DISPLAY=:0and the desktop session'sXAUTHORITY: all three pass, in 0.83–0.94 s.DISPLAYalone orXDG_RUNTIME_DIRalone still hangs.Not tested
main's lib GPU tests passed without a display in my earlier runs while these integration tests hang. I don't know what differs.So the RDNA2-under-Proton data point for this PR is a pass. The same applies to #478 (note there).
AI use
@DavidM1911 on GitHub · 2026-11-25 13:53 UTC · original
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!
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.