Skip to content

docs: the s_load vcc-base row is GPU-checked on RDNA2 and under wave64 emulation (SHADER-VCC-BASE-GPU-VERIFIED) - #1872

Open
fiestorra wants to merge 1 commit into
ProjectLeonida:mainfrom
fiestorra:carry/shader-vcc-base-gpu
Open

fiestorra wants to merge 1 commit into
ProjectLeonida:mainfrom
fiestorra:carry/shader-vcc-base-gpu

Conversation

@fiestorra

@fiestorra fiestorra commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Claimed in the coordination issue as: SHADER-VCC-BASE-GPU-VERIFIED (#1608 (comment))

What and why

The s_load_dword* vcc 64-bit base row of docs/design.md ended in not GPU-verified, although the fixture that verifies it (runtime/test/shaders/cs_smem_vcc_base.asm, eight seeded words read through s_load_dwordx8 s[8:15], vcc, 0) already existed. This change records the GPU measurement in that row and says what it does not cover. No runtime or translator change.

Tested

The fixture as it is, through the standard runner (scripts/run_gpu_tests.py --build runtime/build --filter cs_smem_vcc_base, llvm-mc 21.1.8, spirv-val from Vulkan SDK 1.4.363):

  • AMD Radeon gfx1036 iGPU, Windows 11, driver 32.0.21045.29003: PASS cs_smem_vcc_base, the eight words 29200 29201 29202 29203 29204 29205 29206 29207 = 0x7210..0x7217, 1/1 passed.
  • NVIDIA GeForce RTX 4090, Windows 11, driver 32.0.16.2124, with LEONIDA_W64_EMULATE=1: the same eight words, 1/1 passed. Without the emulation the fixture skips on this card (SKIP (no 64-wide compute subgroup on this device)), so the emulated path is what was measured there.

Also run, for the documentation: the repository's docs-only set (tests/test_docs_*.py and tests/test_i18n_index.py) passes 13/13, and check-no-game-data reports the tree clean.

What this does not prove: eight words of one fixture are the whole hardware check; the 79-program corpus count in the row stays a translation count; and there is no native 32-wide-subgroup run of this form outside the emulation. I did not add a gpu-test-results/ record: this is one fixture, not the suite. Be precise about the records, though — #1777 is the RTX 4090 at NVIDIA 591.86, and the run this row describes is 32.0.16.2124 (621.24), which no 4090 record matches; #1473 is the gfx1036 at 24.10.24, while the record at 32.0.21045.29003 is #843 (Raphael-7600X-Win.txt). So the evidence here is inline, as other rows carry it, and it is not the same run as either record.

GPUs tested: AMD Radeon gfx1036 iGPU (Ryzen 7 7800X3D), AMD driver 32.0.21045.29003, Windows 11; NVIDIA GeForce RTX 4090, NVIDIA driver 32.0.16.2124, Windows 11.

AI-assisted: yes (DeepSeek Harness).

Checklist

  • Based on current main (a73a57e1) and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • 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. (n/a: no new rule; an existing row's evidence is updated)

Written with an AI assistant.

@Mby159

Mby159 commented Nov 25, 2026

Copy link
Copy Markdown
Contributor

The same fixture on an AMD Radeon 780M (RDNA3, gfx1103): a native wave64 run and a --wave64-emulate run

The fixture behind that row also passes on a third device overall (the PR's two are the author's gfx1036 and RTX 4090), on a different AMD generation and a different AMD Windows driver version (32.0.32015.12012 here vs the author's 32.0.21045.29003): AMD Radeon 780M Graphics (RDNA3 iGPU, gfx1103), Windows 11, Vulkan 1.4.359.

tools/vk_subgroup_info.py on this device reports subgroup_size: 64, min_subgroup_size: 32, max_subgroup_size: 64, native64_compute: true, native64: true, driver_id: 1.

Running the fixture as it is, through the standard runner, with the runner, the translator and the test programs all built from this PR's tree (head 9b038c57a0, base 77baf90627):

  • python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_smem_vcc_base gives PASS cs_smem_vcc_base 29200 29201 29202 29203 29204 29205 29206 29207, 1/1 passed. The runner runs this fixture with --require-wave64, and a native pass has to report a 64-wide compute subgroup, so that is a native 64-wide compute run, not an emulated one.
  • The same command with LEONIDA_W64_EMULATE=1 gives the same eight words, 1/1 passed. That exercises the --wave64-emulate translation on a device that also has native wave64; it is not evidence of emulation on 32-wide-only hardware like the NVIDIA run in that row.

The eight words are the 0x7210..0x7217 the row names. The CPU-checked half of that row also holds here: python -I tests/semantic/test_sload_vcc_base.py (5 tests, OK) and python -I tests/semantic/test_scalar_mem_smem.py (45 tests, OK).

This PR changes one documentation row only, so none of the above depends on it.

What this does not add: the 79-program corpus count stays a translation count, and the "no native 32-wide-subgroup run of this form" gap is unchanged - this device's native compute subgroup is 64 (range 32..64), so the native run above is the 64-wide one, not a 32-wide one. I ran this one fixture, not the suite, and there is no NVIDIA here.

AI-assisted (MiniMax Code). No game files.

@fiestorra

Copy link
Copy Markdown
Contributor Author

Thanks for the third device. Recording what it adds and what it does not, so the row's claim stays the same size as its evidence.

What it adds: the same fixture, cs_smem_vcc_base, passes on an AMD Radeon 780M (RDNA3, gfx1103, Windows 11, Vulkan 1.4.359, AMD driver 32.0.32015.12012) through the standard runner with --require-wave64, reporting the eight 0x7210..0x7217 words; and the same command with LEONIDA_W64_EMULATE=1 gives the same eight words. That is a third device across a different AMD generation and a different driver version from the two in the PR, and the CPU-checked half of the row holds there too (test_sload_vcc_base, 5 tests; test_scalar_mem_smem, 45 tests).

What it does not add, and I am quoting your own reading because it matches mine: the native run there is the 64-wide one (the device reports subgroup_size: 64, range 32..64), so the gap the row names - a native 32-wide-subgroup run of this form - is unchanged, and the 79-program corpus count stays a translation count.

I am leaving the row as it is rather than appending a third device to a 1,552-character table row that is already green: the sentence you tested is the one it makes, and none of your evidence depends on this PR, as you say. If a maintainer wants the row to list the three devices explicitly, say so here and I will add them in a follow-up rather than re-running CI on this one.

Written with an AI assistant.

@fiestorra

Copy link
Copy Markdown
Contributor Author

Checked against the translator, and one claim in the body corrected

The row describes the code: Gen.scalar_load in tools/rdna2spirv.py maps a vcc base to vcc_lo/vcc_hi, loads %vcc and %vcc_hi, and still raises s_buffer_load without V# for a two-dword base. The fixture seeds 0x7210..0x7217 at byte 128 and reads them with s_load_dwordx8 s[8:15], vcc, 0, and CS_SMEM_VCC matches that range. The heavy jobs being skipped is correct here: change-scope classifies the diff as documentation-only and runs the thirteen documentation tests instead.

Correction. The body said the two cards' records are "already covered by #1777 (RTX 4090) and #1473 (Radeon 7600 iGPU, gfx1036)". That is not right. #1777 is the RTX 4090 at NVIDIA 591.86; the run this row describes is 32.0.16.2124 (621.24), and no 4090 record matches that driver. #1473 is the gfx1036 at 24.10.24, while the record at 32.0.21045.29003 is #843 (Raphael-7600X-Win.txt). The body now says so: the evidence is inline, as other rows carry it, and it is not the same run as either record. If the maintainers want a gpu-test-results/ record for this, it has to be a new one — the existing files do not cover it.

Also updated the checklist's base SHA to a73a57e1.

Worth one clause in the row, and I can add it: the fixture's vcc is data (s_mov_b64 vcc, s[4:5]), which is what separates it from the neighbouring row that refuses emulated mask-valued pointers.

Not verified from here: the GPU measurements themselves (no GPU in this session) and the corpus counts, which need the game's data.

Written with an AI assistant.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants