test(gpu): cover the last three LDS-atomic rows (mskor, inc/dec/min/max, wrxchg b64) #1040

Closed
leonida/mandy
YaBulochka wants to merge 0 commits from feat/fixtures-batch5 into main

Pull request closed

This pull request cannot be reopened because the branch was deleted.

YaBulochka commented 2026-11-24 17:06:55 +00:00

Claimed in the coordination issue as: carried over from the closed original repository (branch feat/fixtures-batch5); no new claim

Depends on: none. Overlaps #173 (ds_mskor), #522 (ds_mskor atomicity) and #413 (which names existing GPU fixtures for the atomics rows); this PR adds the remaining three LDS-atomic rows (321, 322, 324), so the overlapping rows can be dropped from whichever lands second.

What and why

Six wave32 GPU fixtures for the last docs/design.md LDS-atomic rows without a GPU check. Each stores eight words derived in its header, and lane 0 alone runs the atomics:

  • cs_w32_lds_mskor (#321): ds_mskor_b32 and ds_mskor_rtn_b32, including DATA2 bits outside DATA being ORed in and the returned old word;
  • cs_w32_lds_atomics_incdec / _rtn (#322): ds_inc/dec/rsub_u32 at the DATA-1, DATA, above-DATA, 0 and 1 boundaries, the rsub wrap, and the pre-op word each _rtn_ form returns;
  • cs_w32_lds_minmax_f32 (#322): ds_min/max_f32 and the returning forms with a qNaN in either operand, -0/+0 and +inf/-inf;
  • cs_w32_lds_wrxchg_b64 (#324): ds_wrxchg_rtn_b64 and ds_wrxchg2_rtn_b64, the old pair, vdst order at *8 offsets 1 and 2, and the words written;
  • cs_w32_lds_wrxchg2st64_b64 (#324): ds_wrxchg2st64_rtn_b64 at *64 offsets 1 and 2 (0x200/0x400) over a 2 KiB LDS.

Registered in check.py (both wave32 lists and CS_DUMPS) and scripts/run_gpu_tests.py (the main table, the 64-bit exclusion and the skip list); tests/semantic/test_batch5_gpu_fixtures.py replays the same eight words through the translator and spirv_mini_interp and keeps the headers and runner tables in step. The .s fixtures are generated from the author's hand-written .asm sources, not game dumps. docs/design.md rows 321, 322 and 324 and docs/shader_validation.md name them.

Tested

  • python3 -m unittest discover -s tests/semantic -p "test_batch5_gpu_fixtures.py": 3 tests, OK.
  • python3 -m pytest tests/test_shader_checks.py -x -q: 91 passed, 405 subtests passed.
  • python3 tests/semantic/regen_fixtures.py --check: clean.
  • GPU (the author's measurement, not repeated here): gfx1036, RADV, Mesa 27.0.0-devel; 8/8 words per fixture, through both runners.

AI-assisted: yes.

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No new rule; the existing rows now name the GPU confirmation.)
Claimed in the coordination issue as: carried over from the closed original repository (branch `feat/fixtures-batch5`); no new claim Depends on: none. Overlaps #173 (`ds_mskor`), #522 (`ds_mskor` atomicity) and #413 (which names existing GPU fixtures for the atomics rows); this PR adds the remaining three LDS-atomic rows (321, 322, 324), so the overlapping rows can be dropped from whichever lands second. ### What and why Six wave32 GPU fixtures for the last `docs/design.md` LDS-atomic rows without a GPU check. Each stores eight words derived in its header, and lane 0 alone runs the atomics: - `cs_w32_lds_mskor` (#321): `ds_mskor_b32` and `ds_mskor_rtn_b32`, including DATA2 bits outside DATA being ORed in and the returned old word; - `cs_w32_lds_atomics_incdec` / `_rtn` (#322): `ds_inc/dec/rsub_u32` at the `DATA-1`, `DATA`, above-DATA, 0 and 1 boundaries, the rsub wrap, and the pre-op word each `_rtn_` form returns; - `cs_w32_lds_minmax_f32` (#322): `ds_min/max_f32` and the returning forms with a qNaN in either operand, -0/+0 and +inf/-inf; - `cs_w32_lds_wrxchg_b64` (#324): `ds_wrxchg_rtn_b64` and `ds_wrxchg2_rtn_b64`, the old pair, vdst order at `*8` offsets 1 and 2, and the words written; - `cs_w32_lds_wrxchg2st64_b64` (#324): `ds_wrxchg2st64_rtn_b64` at `*64` offsets 1 and 2 (0x200/0x400) over a 2 KiB LDS. Registered in `check.py` (both wave32 lists and `CS_DUMPS`) and `scripts/run_gpu_tests.py` (the main table, the 64-bit exclusion and the skip list); `tests/semantic/test_batch5_gpu_fixtures.py` replays the same eight words through the translator and `spirv_mini_interp` and keeps the headers and runner tables in step. The `.s` fixtures are generated from the author's hand-written `.asm` sources, not game dumps. `docs/design.md` rows 321, 322 and 324 and `docs/shader_validation.md` name them. ### Tested - `python3 -m unittest discover -s tests/semantic -p "test_batch5_gpu_fixtures.py"`: 3 tests, OK. - `python3 -m pytest tests/test_shader_checks.py -x -q`: 91 passed, 405 subtests passed. - `python3 tests/semantic/regen_fixtures.py --check`: clean. - GPU (the author's measurement, not repeated here): gfx1036, RADV, Mesa 27.0.0-devel; 8/8 words per fixture, through both runners. AI-assisted: yes. ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (No new rule; the existing rows now name the GPU confirmation.)
MoonEyes commented 2026-11-28 17:57:53 +00:00

Hi @YaBulochka, thanks for this pull request. It currently conflicts with main (conflicting file(s): runtime/test/shaders/check.py, scripts/run_gpu_tests.py), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

Hi @YaBulochka, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `runtime/test/shaders/check.py`, `scripts/run_gpu_tests.py`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
Tauwni commented 2026-11-29 08:01:37 +00:00

The head 4f762aca4 has committed conflict markers in scripts/run_gpu_tests.py, lines 1360-1366 (<<<<<<< HEAD / ======= / >>>>>>> ba9a1df7), so the runner does not start: SyntaxError: unmatched ')' at line 1365. MEASURED (py_compile on the file as committed). No other file in the PR has markers. READ IN CODE.

With the markers resolved locally, the six new fixtures pass on AMD RDNA4. I kept this PR's list and put back "cs_dpp_cmp", which the HEAD side has; nothing pushed. Radeon RX 9060 XT, driver 32.0.23033.1002 (Vulkan 26.3.1), Windows 10 22H2 19045.7846, llvm-mc 21.1.8. MEASURED, 3/3 each, PR head as is, since it also conflicts with main (check.py, run_gpu_tests.py): cs_w32_lds_atomics_incdec, cs_w32_lds_atomics_rtn, cs_w32_lds_minmax_f32, cs_w32_lds_mskor, cs_w32_lds_wrxchg2st64_b64, cs_w32_lds_wrxchg_b64.

Not checked by a second agent or human yet. AI-assisted: yes (Claude Code).

The head `4f762aca4` has committed conflict markers in `scripts/run_gpu_tests.py`, lines 1360-1366 (`<<<<<<< HEAD` / `=======` / `>>>>>>> ba9a1df7`), so the runner does not start: `SyntaxError: unmatched ')'` at line 1365. MEASURED (`py_compile` on the file as committed). No other file in the PR has markers. READ IN CODE. With the markers resolved locally, the six new fixtures pass on AMD RDNA4. I kept this PR's list and put back `"cs_dpp_cmp"`, which the `HEAD` side has; nothing pushed. Radeon RX 9060 XT, driver 32.0.23033.1002 (Vulkan 26.3.1), Windows 10 22H2 19045.7846, llvm-mc 21.1.8. MEASURED, 3/3 each, PR head as is, since it also conflicts with `main` (`check.py`, `run_gpu_tests.py`): `cs_w32_lds_atomics_incdec`, `cs_w32_lds_atomics_rtn`, `cs_w32_lds_minmax_f32`, `cs_w32_lds_mskor`, `cs_w32_lds_wrxchg2st64_b64`, `cs_w32_lds_wrxchg_b64`. Not checked by a second agent or human yet. AI-assisted: yes (Claude Code).
aslan2142 reviewed 2026-12-01 11:45:30 +00:00
aslan2142 left a comment
No description provided.
Head commit contains unresolved Git conflict markers in `scripts/run_gpu_tests.py:1360-1366` (`<<<<<<< HEAD` / `=======` / `>>>>>>> ba9a1df7`), causing a `SyntaxError` when importing or running the GPU test runner, in addition to merge conflicts with `main` in `runtime/test/shaders/check.py` and `scripts/run_gpu_tests.py`. Please remove the conflict markers, rebase cleanly onto current `main`, verify with `python -m py_compile scripts/run_gpu_tests.py`, and trigger a fresh green CI pass. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 17:22:04 +00:00

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.
Sign in to join this conversation.
No description provided.