Tests: check 64/96/128-bit and paired LDS loads and stores on the GPU #1168

Open
jesuarchive wants to merge 1 commit from upstream-pr/1177 into main
jesuarchive commented 2026-11-24 12:53:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jesuarchive on 2026-11-24T12:53:39Z.


ds_read/write_b64/b96/b128, ds_read2/write2_b64 and the four *2st64* forms are translated (emit.rs, the rw table of the DS emitter) but had no GPU test. This adds one, test-only.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: gpu_ds_wide_and_paired_loads_stores. It stores with each form and reads the data back with another width, from the neighbouring lane after s_barrier, and into a destination that overlaps the address register (ds_read_b128 v[6:9], v6). It checks which dword lands at which byte address: OFFSET for the single forms, OFFSET0 / OFFSET1 times 8, 256 or 512 bytes for the paired ones. Runs on every adapter through gpu_waves().

Tested

  • NVIDIA GeForce RTX 3060 12 GB (32-lane waves only), driver 32.0.16.1088; AMD Ryzen 7 5800XT; Windows 11 Pro build 26300; rustc 1.95.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 from the Windows SDK; debug.
  • cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored (SKIPPED GPU tests: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, no wave64). main 47efa2e on the same machine: 741 / 0 / 41, the same two skipped.
  • cargo test -p xcl --lib -- gpu_ds_wide_and_paired_loads_stores --nocapture --test-threads=1: 1 passed, not skipped (wave32 pass only on this adapter).
  • Negative controls, each a temporary edit of emit.rs, reverted: the ds_write2_b64 stride 4 instead of 8, the ds_read2st64_b32 stride 64 instead of 256, ds_read_b96 reading two dwords. The test fails on each, naming the instruction.

Regression run

  • Not needed: test-only change.

Not tested

  • The wave64 pass (no 64-lane waves on this GPU): AMD and Intel GPUs.
  • Wine, release build.

AI use

  • Claude Code with Claude Opus 5.5: found the untested instructions, wrote the test and this description, ran the tests and negative controls on the machine above.
<!-- greyfinch-sync:ivall/xcl:issue:5472524430 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1177). Originally posted by [jesuarchive](https://github.com/jesuarchive) on 2026-11-24T12:53:39Z. --- `ds_read/write_b64/b96/b128`, `ds_read2/write2_b64` and the four `*2st64*` forms are translated (`emit.rs`, the `rw` table of the DS emitter) but had no GPU test. This adds one, test-only. **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: `gpu_ds_wide_and_paired_loads_stores`. It stores with each form and reads the data back with another width, from the neighbouring lane after `s_barrier`, and into a destination that overlaps the address register (`ds_read_b128 v[6:9], v6`). It checks which dword lands at which byte address: `OFFSET` for the single forms, `OFFSET0` / `OFFSET1` times 8, 256 or 512 bytes for the paired ones. Runs on every adapter through `gpu_waves()`. **Tested** - NVIDIA GeForce RTX 3060 12 GB (32-lane waves only), driver 32.0.16.1088; AMD Ryzen 7 5800XT; Windows 11 Pro build 26300; rustc 1.95.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17 from the Windows SDK; debug. - `cargo test --workspace -- --test-threads=4`: 742 passed, 0 failed, 41 ignored (SKIPPED GPU tests: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, no wave64). `main` `47efa2e` on the same machine: 741 / 0 / 41, the same two skipped. - `cargo test -p xcl --lib -- gpu_ds_wide_and_paired_loads_stores --nocapture --test-threads=1`: 1 passed, not skipped (wave32 pass only on this adapter). - Negative controls, each a temporary edit of `emit.rs`, reverted: the `ds_write2_b64` stride 4 instead of 8, the `ds_read2st64_b32` stride 64 instead of 256, `ds_read_b96` reading two dwords. The test fails on each, naming the instruction. **Regression run** - Not needed: test-only change. **Not tested** - The wave64 pass (no 64-lane waves on this GPU): AMD and Intel GPUs. - Wine, release build. **AI use** - Claude Code with Claude Opus 5.5: found the untested instructions, wrote the test and this description, ran the tests and negative controls on the machine above.
towiice commented 2026-11-24 13:08:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by towiice on 2026-11-24T13:08:26Z.

Review: COMMENTED


Tested:

  • Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, wave32, driver 610.88), Windows 11 x64 (26H2 / build 26300), DXC v1.9.2609 (01b62ad4), toolchain stable-x86_64-pc-windows-gnullvm (llvm-mingw 23.1.6), debug build.
  • Test command: cargo test -p xcl --lib gpu_ds_wide_and_paired_loads_stores -- --nocapture
  • Result: 1 passed, 0 failed (0.65 s) — gpu::recomp::tests::gpu_ds_wide_and_paired_loads_stores passes cleanly on Turing wave32 hardware without skips.

Not tested: full workspace suite, release builds, AMD/Intel GPUs, retail titles (test-only PR).

<!-- greyfinch-sync:ivall/xcl:review:6039740822 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1177#pullrequestreview-6039740822). Originally posted by [towiice](https://github.com/towiice) on 2026-11-24T13:08:26Z. **Review:** COMMENTED --- **Tested:** - Hardware: NVIDIA GeForce GTX 1650 SUPER (Turing TU116, 4 GB VRAM, wave32, driver 610.88), Windows 11 x64 (26H2 / build 26300), DXC v1.9.2609 (`01b62ad4`), toolchain `stable-x86_64-pc-windows-gnullvm` (llvm-mingw 23.1.6), debug build. - Test command: `cargo test -p xcl --lib gpu_ds_wide_and_paired_loads_stores -- --nocapture` - Result: **1 passed, 0 failed** (0.65 s) — `gpu::recomp::tests::gpu_ds_wide_and_paired_loads_stores` passes cleanly on Turing wave32 hardware without skips. **Not tested:** full workspace suite, release builds, AMD/Intel GPUs, retail titles (test-only PR).
DavidM1911 commented 2026-11-24 14:06:27 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T13:06:13Z.


Independent verification on current main 384f7f7 (branch already contains it — clean).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.

  • cargo test -p xcl --lib wide_and_paired: 1 passed, 0 failed — gpu_ds_wide_and_paired_loads_stores covers 64/96/128-bit and paired LDS accesses on real hardware.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

<!-- greyfinch-sync:ivall/xcl:comment:7132352205 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1177#issuecomment-7132352205). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T13:06:13Z. --- Independent verification on current `main` `384f7f7` (branch already contains it — clean). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11. - `cargo test -p xcl --lib wide_and_paired`: **1 passed, 0 failed** — `gpu_ds_wide_and_paired_loads_stores` covers 64/96/128-bit and paired LDS accesses on real hardware. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
bjarngard commented 2026-11-24 14:06:32 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bjarngard on 2026-11-24T13:23:59Z.


Test report for head 24250f2 (AMD, native wave64)

Tested

  • AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 742 passed, 0 failed, 41 ignored, no SKIPPED
  • With XCL_REQUIRE_GPU=wave64: gpu_ds_wide_and_paired_loads_stores passed
  • The test loops over gpu_waves(), so on this adapter both the wave64 and the wave32 pass ran

Not tested: Intel, Wine.

AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.

<!-- greyfinch-sync:ivall/xcl:comment:7132773791 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1177#issuecomment-7132773791). Originally posted by [bjarngard](https://github.com/bjarngard) on 2026-11-24T13:23:59Z. --- Test report for head `24250f2` (AMD, native wave64) **Tested** - AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug - `XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`: 742 passed, 0 failed, 41 ignored, no SKIPPED - With `XCL_REQUIRE_GPU=wave64`: `gpu_ds_wide_and_paired_loads_stores` passed - The test loops over `gpu_waves()`, so on this adapter both the wave64 and the wave32 pass ran **Not tested:** Intel, Wine. **AI use:** the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
Mischief8713 commented 2026-11-24 16:07:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Mischief8713 on 2026-11-24T15:55:13Z.


GPU run of 24250f2 on Windows (NVIDIA GTX 1660 Ti, Turing): 699 passed, 0 failed; the new test passes

Tested

  • NVIDIA GeForce GTX 1660 Ti 6 GB (Turing, driver 32.0.16.2114), Ryzen 5 2600X, Windows 11 (10.0.26300), rustc 1.100.0, debug build
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask and gpu_wave32_program_in_wave64_hardware (no wave64)
  • main at 930e8b4 on the same machine: lib 707 passed, 0 failed, 21 ignored; e2e 3 passed
  • The head does not contain current main (930e8b4). It was run as it is.
  • lib: 699 passed, 0 failed, 21 ignored. gpu::recomp::tests::gpu_ds_wide_and_paired_loads_stores ran on the GPU and passed. Earlier reports are both RTX 3060 Ti.

Not tested

  • No retail title and no scripts/smoke.ps1 run, so no regression run
  • AMD GPUs; only Turing was run here
  • Not merged with current main

AI use

  • Claude Code with Claude Sonnet 5.5 ran the commands and wrote this report. I checked the output.
<!-- greyfinch-sync:ivall/xcl:comment:7136832348 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1177#issuecomment-7136832348). Originally posted by [Mischief8713](https://github.com/Mischief8713) on 2026-11-24T15:55:13Z. --- **GPU run of `24250f2` on Windows (NVIDIA GTX 1660 Ti, Turing): 699 passed, 0 failed; the new test passes** **Tested** - NVIDIA GeForce GTX 1660 Ti 6 GB (Turing, driver 32.0.16.2114), Ryzen 5 2600X, Windows 11 (10.0.26300), rustc 1.100.0, debug build - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask` and `gpu_wave32_program_in_wave64_hardware` (no wave64) - `main` at `930e8b4` on the same machine: lib 707 passed, 0 failed, 21 ignored; `e2e` 3 passed - The head does not contain current `main` (`930e8b4`). It was run as it is. - lib: 699 passed, 0 failed, 21 ignored. `gpu::recomp::tests::gpu_ds_wide_and_paired_loads_stores` ran on the GPU and passed. Earlier reports are both RTX 3060 Ti. **Not tested** - No retail title and no `scripts/smoke.ps1` run, so no regression run - AMD GPUs; only Turing was run here - Not merged with current `main` **AI use** - Claude Code with Claude Sonnet 5.5 ran the commands and wrote this report. I checked the output.
github-actions[bot] commented 2026-11-28 08:00:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-28T08:00:19Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7236298872 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1177#issuecomment-7236298872). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T08:00:19Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 05:00:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:00:12Z.


Triage (#1607) – head 24250f2

#544 (opened first) tests the same wide and paired DS ops (DS_WRITE/READ_B96/B128, DS_WRITE2_B64, DS_*2ST64_*) among many others in a new 1233-line integration test; this PR is a 76-line per-instruction test in recomp/tests.rs using gpu_waves/run_wave. #1178 (d16 LDS ops) is the companion test, not a duplicate. Main exercises only the st64 forms (gpu_permlane16_wqm_and_lds_stride64).
No problems found in the diff; the LDS regions and offsets do not overlap.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7301322608 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1177#issuecomment-7301322608). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:00:12Z. --- **Triage (#1607)** – head 24250f2 #544 (opened first) tests the same wide and paired DS ops (`DS_WRITE/READ_B96/B128`, `DS_WRITE2_B64`, `DS_*2ST64_*`) among many others in a new 1233-line integration test; this PR is a 76-line per-instruction test in `recomp/tests.rs` using `gpu_waves`/`run_wave`. #1178 (d16 LDS ops) is the companion test, not a duplicate. Main exercises only the st64 forms (`gpu_permlane16_wqm_and_lds_stride64`). No problems found in the diff; the LDS regions and offsets do not overlap. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1177:upstream-pr/1177'
git switch 'upstream-pr/1177'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/1177'
git switch 'upstream-pr/1177'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1177'
git switch 'upstream-pr/1177'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1177'
git switch 'main'
git merge --squash 'upstream-pr/1177'
git switch 'main'
git merge --ff-only 'upstream-pr/1177'
git switch 'main'
git merge 'upstream-pr/1177'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!1168
No description provided.