Repository navigation
Docs: no game CS takes the SHADER-309 LDS bounds check; drop the stale hypothesis - #3941
465d6a0eac wants to merge 2 commits into
Conversation
…e hypothesis The Workgroup memory limit row still opened with "Hypothesis, not yet counted over the corpus: the 16 of 486 LDS-using CS ...", directly before towade's count (ItsNotRexed#1882) that answers it, and the count pointed at the Compute shaders row, which no longer has the figure. The comment at the CS RSRC2 block in rdna2spirv.py still said 470 of 486 stay below LDS_SIZE. One statement now: no game shader takes the path. Recounted at aa2988c by running translate() on all 2,689 CS of a 1.0.2.1 corpus (counts only): 485 access LDS, all with an RSRC2 allocation; none reaches past it with a constant offset and none is shrunk, natively or with --wave64-emulate. The old offset + 4-dword bound flags 37 of the 485, all inside their allocation. The code comment says the same. Comment and docs only: a 200-shader slice translates byte-identically. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent recount with my own 1.0.2.1 copy (Apple M4, Python 3.15): your numbers hold exactly. At
That is the same split as your table, with the 485 read from the translator rather than from the FSSM header. So the rewritten row and the comment are right: no game CS takes the SHADER-309 bounds check. On
No game data (counts only). AI-assisted. |
|
Independently checked the LDS census in e2c7d8f from my local 1.0.2.1 package. CachyOS Linux 7.3.5, LLVM 23.1.5, translator aa2988c. I ran all 2,689 compute listings through translate() in native mode and with wave64 emulation. Both modes translated all 2,689, with 485 LDS users, zero constant extents beyond the declared allocation and zero shaders setting lds_bound. These are CPU-side translator counts. No game data attached. |
|
Checked this on my machine (RTX 2070, Linux), one data point for the pile:
One honest limit: my local shader carve is 11,983 blobs and contains no CS with LDS memory access at all (only |
|
Checked against my own 1.0.2.1 copy (counts only) at I translated every corpus compute shader (2,689
So no game CS takes the bounds-checked path at the default cap, either way, which is what the updated row says. A related number for the 32 KiB drivers (AMD Windows, which this row measures on an RX 9070 XT, and Intel). In the full-corpus AI-assisted (Claude Code). |
docs/design.md conflicted in the Workgroup memory limit (SHADER-309) row: main added the SHADER-579 clause (the 3 barrier-round counts move into the LDS array past 16,384 B), this branch rewrote the hypothesis sentence. Both kept. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01G9awjJFWaLKL6vcYaYtu2r
|
Merged Recount at the merge, so the claim holds on today's
Tested under WSL Ubuntu (Python 3.14.4, llvm-mc 21.1.8), CPU only. AI-assisted (Claude Code). |
Claimed in the coordination issue as: new docs item, SHADER-309 follow-up
What and why
The "Workgroup memory limit (SHADER-309)" row in
docs/design.mdcontradicts itself. It still says "Hypothesis, not yet counted over the corpus: the 16 of 486 LDS-using CS that index past LDS_SIZE with constant offsets (the Compute shaders row) now read 0 there", and the very next sentence is towade's count (#1882) answering it: none of the 485 does. That count also points at "the Compute shaders row" for the 16 of 486, but that row no longer has the figure. The only other copy is a comment intools/rdna2spirv.pyat the CS RSRC2 block, which still says "470 of 486 LDS-using CS stay below it; the rest index past it".This PR merges the two sentences into one statement: no game shader takes the bounds-checked path, so only the synthetic tests exercise it. It adds my independent recount and fixes the code comment. No behaviour change.
When I claimed this I hadn't seen towade's sentence; it arrived on
mainin the last merge round. This PR therefore confirms that count rather than replacing it.Measured (my own 1.0.2.1 copy, counts only)
At
mainaa2988cc, I ranrdna2spirv.translate()on each of the 2,689 CS and read theGenit builds (lds_declared,lds_need,lds_bound, and calls tolds_access), natively and with--wave64-emulate:--wave64-emulateLDS_SIZE0ds_const_extent)lds_boundset), including a shrunk arrayoffset // 4 + 4boundSo "16 of 486" came from the older estimate, as towade's sentence says. That bound flags 37 of the 485 today, and every one of them is inside its allocation once the access width is counted. The 485 agree with the FSSM header's LDS byte count at
+0x10C, which is non-zero in exactly 485 CS.Tested
python -I tests/test_docs_*.py: all 7 OK (design_rows,links,list_items,repo_paths,table_rows,cli_flags,python_deps).compileallontools/rdna2spirv.pyis clean, and so isgit diff --check.tests/semantic/test_cs_shared_memory_limit.pyin WSL (llvm-mc 21.1.8, SPIRV-Tools v2026.1): 15 tests OK.--limit 200slice fromaa2988ccand from this branch is byte-identical, 200 translated and 200 passingspirv-valboth times.Checklist
docs/design.md, with how it was confirmed. (n/a: no rule changes)AI-assisted (Claude Code).
🤖 Generated with Claude Code