Skip to content

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

Open
YaBulochka wants to merge 1 commit into
ProjectLeonida:mainfrom
YaBulochka:feat/fixtures-batch5
Open

YaBulochka wants to merge 1 commit into
ProjectLeonida:mainfrom
YaBulochka:feat/fixtures-batch5

Conversation

@YaBulochka

Copy link
Copy Markdown
Contributor

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:

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.)

@github-actions github-actions Bot added the needs rebase Conflicts with the base branch: rebase it on main label Nov 24, 2026
…ax, wrxchg b64)

Six wave32 fixtures for the docs/design.md rows 321, 322 and 324, each an
eight-word dump and lane 0 alone running the atomics:

- cs_w32_lds_mskor (ProjectLeonida#321): ds_mskor_b32 and ds_mskor_rtn_b32, including DATA2
  bits outside DATA being ORed in (0x11223344, mask 0x0000FFFF, DATA2 8 ->
  0x11220008) and the rtn old word.
- cs_w32_lds_atomics_incdec / _atomics_rtn (ProjectLeonida#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 (ProjectLeonida#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 (ProjectLeonida#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 (ProjectLeonida#324): ds_wrxchg2st64_rtn_b64 at *64 offsets 1
  and 2 (0x200/0x400) over a 2 KiB LDS, with *8 markers so a wrong unit fails.

Registered in check.py (CS_DUMPS and both wave32 lists), run_gpu_tests.py
(every table and the wave64 exclusion), and regen_fixtures.py. Pinned by
tests/semantic/test_batch5_gpu_fixtures.py, which runs the same eight words
through spirv_mini_interp.

Both runners pass on the RDNA2 iGPU (gfx1036, RADV Mesa 27.0.0-devel), 8/8
words per fixture. No translator mismatch appeared.
@MoonEyes

Copy link
Copy Markdown
Collaborator

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

Tauwni commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase Conflicts with the base branch: rebase it on main

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants