Tests: verify RDNA2 FLAT and GLOBAL memory ops on the GPU #1626
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1636"
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-24T18:27:37Z.
Adds standalone GPU execution and translation integration tests in crates/xcl/tests/gpu_recomp_flat_global.rs covering RDNA2 ENC_FLAT (FLAT_) and previously untested ENC_FLAT_GLBL (GLOBAL_) memory instructions per the AMD RDNA2 ISA specification.
What is in it
unner::skip_test("no DXC") if DXC is absent.
Tested
ustc 1.100.0 (0ef1bc386 2026-11-09).
Not tested
o heap windows).
AI use
Imported from ivall/xcl. Originally posted by mantavisual on 2026-11-24T20:03:06Z.
Test report for
a77b5050574c33379987476898442ba1f1c1d068on NVIDIA, which is not in the PR's hardware list.Tested
cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 780 passed, 0 failed, 41 ignored. All 4 new tests ran.c160d86: 862 passed, 0 failed, 42 ignored.gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Do the tests notice a broken translator?
flat_atomic, all 4 tests still pass, because the GLOBAL atomics only use offsets 0x00 to 0x48. Subtracting 0x40 from the GLOBAL 32-bit offsets (& 0xFFF) and adding 0x40 to v2 passes normally and fails with that break (I enlargedmem32to 0x8000 bytes to keep the broken run in bounds).Not tested: AMD, native wave64, retail title.
AI use: Claude Code (Claude Opus 5.5) ran this on my machine, wrote the report and posted it for me.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T20:56:14Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~22 ignored.Thanks!
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:46Z.
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 Foniass on 2026-12-01T06:21:18Z.
Triage (#1607) – head
a77b505No open or merged PR makes the same change. #2143 also covers FLAT/GLOBAL/SCRATCH, but it checks direct-DXIL against HLSL output, not values on the GPU.
No problems found in the diff. The tests skip without a GPU, DXC and wave64 programs, so CI does not run them. The expected values (offsets of +/-2048, D16 halves, CSUB clamping, CMPSWAP winners, EXEC-masked lanes) have only been checked on the author's hardware.
Recommendation: keep open.
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 grathepic on 2026-12-02T23:36:38Z.
merge-check
078358a058a77b505057git diff --checkexit 0)cargo +1.98.1-x86_64-pc-windows-msvc build --offline --locked --workspace— exit 0 (36 pre-existing warnings inxcllib)cargo +1.98.1-x86_64-pc-windows-msvc test --offline --locked --workspace --no-fail-fast -- --test-threads=4(withXCL_DXC_DIR=C:\VulkanSDK\1.4.363.0\Bin) — 3010 passed, 0 failed, 52 ignored across 45 harnesses; 27 SKIPPED (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps, 1 no dxil.dll, 1 cannot disable the driver cache (Windows Developer Mode required)). All 4 new tests intests\gpu_recomp_flat_global.rs(flat_and_global_translate_and_compile_with_dxc,gpu_flat_and_global_multi_dword_and_offsets,gpu_flat_and_global_sub_dword_and_d16,gpu_flat_and_global_atomics_32_and_64) ran and passed in 0.84s with 0 skips.crates/xcl/tests/gpu_recomp_flat_global.rswith zero production code or dependency changes)+433/-0, slightly over the ~400-line soft target). Covers FLAT unsigned vs GLOBAL signed offset encoding and DXC compilation across 4 wave configs, multi-dword loads/stores, sub-dword and D16 (including unaligned/straddling) ops, and 32/64-bit FLAT/GLOBAL atomics (table cases, shared-address multi-lane contention,EXECmasking,GLC=0/1). Memory layouts are in-bounds and disjoint per lane. Non-blocking note:GLOBAL_ATOMIC_*table entries only use non-negative offsets (0x00..0x48), while negative global offsets are covered by the load/store tests. No duplicates in #1607.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.