Repository navigation
Conversation
facc028 to
d94d97f
Compare
|
Checked at
Looks right to me. AI-assisted (Claude Code). |
|
Verified on main a73a57e (Ubuntu 24.04 x86-64, Python 3.13, no GPU). Merges cleanly into main. python -m unittest discover -s tests/semantic -p test_ms_shared_memory_limit.py: 7 tests OK with this PR; the same file against main's translator: 1 failure and 6 errors, so it fails on main and passes with the change. compileall clean. Not run: the whole semantic suite and the translated / spirv-val counts over a corpus (no game data here). Note for review: it conflicts with #2183 in tools/rdna2spirv.py, so whichever lands later needs a rebase. AI-assisted: yes (Claude Code) |
|
Tested
No mesh fixture runs on these drivers (no AI-assisted (Claude Code). No game data. |
… memory (SHADER-MESH-SHARED-LIMIT) design.md listed mesh shaders against maxMeshSharedMemorySize as not covered. A MeshEXT module's Workgroup memory (the LDS array, the 4-byte %ms_counts and, under --wave64-emulate, %x_buf) can now be capped at translation with --max-mesh-shared-memory BYTES, refused with the needed and allowed byte counts. The default is 0 (no check), so every mesh shader that translated before still does; a --mesh-compute module keeps the compute cap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RAL8MMXUuNpQAVa1iiyAMP
d94d97f to
c9a480e
Compare
|
#2155 | head The baseline CLI rejects the new option and the translator lacks the new mesh-memory setting. Pinned main |
|
#2155 | head
AI-assisted. |
|
Discord: Generated by Claude Code |
timbot103
left a comment
There was a problem hiding this comment.
Static audit of c9a480e37 only. No builds, tests, or GPU runs. The MeshEXT total agrees with lds_bytes for %lds, %ms_counts, and the optional %x_buf. The Workgroup objects use 32-bit scalar elements throughout. Vertex and primitive staging lives in Function storage, and the exported arrays and structs use Output storage. On current main, --mesh-serial-waves sizes the exchange for one 64-lane wave and keeps per-pass export copies in Function storage.
- [MAJOR]
tools/rdna2spirv.py:16702—--mesh-computenow refuses the 65,540 B module made by the new fixture with 65,536 B of group-shared memory, even with both caps omitted. The base emitted that GLCompute module because the old compute check ran only for source stagecs. Please preserve the fallback's default acceptance and apply its cap when explicitly supplied, or document and justify the new hard default. - [MINOR]
docs/design.md:435— Document passingmin(maxMeshSharedMemorySize, maxMeshPayloadAndSharedMemorySize)in the CLI help and mesh docs. For a 65,536 B shared limit and 32,768 B combined limit, the current advice accepts the fixture's 32,772 B module at translation, andruntime/src/vulkan_mesh_limits.h:39refuses it. VUIDs08754and08755both apply with a zero-byte task payload. - [MINOR]
tests/semantic/test_ms_shared_memory_limit.py:30— Please usesupport.TOOLS_DIRfor the subprocess. WithLEONIDA_TOOLS_DIRset to a translator copy missing just the new CLI flag, the subprocess currently exercises the checkout's working CLI and can mask the regression.
AI-assisted.
Claimed in the coordination issue as: SHADER-MESH-SHARED-LIMIT (#1608)
What and why
docs/design.mdlisted "mesh shaders againstmaxMeshSharedMemorySize" as not covered. The translator already caps acompute shader's Workgroup memory (
--max-shared-memory); a MeshEXT module had no equivalent.--max-mesh-shared-memory BYTES(MAX_MESH_SHARED_BYTES): a MeshEXT module whose Workgroup memory (the LDSarray, the 4-byte
%ms_countsand, under--wave64-emulate,%x_buf, the same totallds_bytesrecords) is overit is refused (
Unsupported) with the needed and allowed byte counts, e.g.MS workgroup memory 32772 B (LDS 32768 B + %ms_counts 4 B) over maxMeshSharedMemorySize 28672 B.%ms_countsis already 65,540 B, so any non-zerodefault would refuse mesh shaders that translate today. Pass a device's limit (28,672 is the
VK_EXT_mesh_shaderminimum) to refuse at translation what that device can't run; the runtime keeps checkinglds_bytesagainst the device it runs on either way.--mesh-computemodule is GLCompute, so it keeps the compute cap.Tested
tests/semantic/test_ms_shared_memory_limit.py(new, 7 tests, hand-written fixturems_shared_limit.asm, PSV0written in the test): under the cap; over it with the byte counts; the exact boundary (32,772 passes, 32,771
refuses);
%x_bufcounted under--wave64-emulate;--mesh-computeuses the compute cap; the default refusesnothing (65,540 B translates and
lds_bytescarries it); the CLI flag end to end.python -I scripts/run_semantic_tests.py tests/semantic: 494 files, 6,325 tests, 0 failed.pytest tests/test_translate.py: 712 passed; the 2 failures arecs_dpp_cmp.asmwith LLVM 21, which fail on maintoo (tests: the pytest helper takes a text-only sample's lines as its listing, as run_gpu_tests.py does (TEST-TRANSLATE-TEXT-ONLY) #1375 fixes the helper).
python -m compileall -q tools tests: clean.GPUs tested: n/a (translator-side check; no GPU path changes)
AI-assisted: yes (Claude Code, with a Devin draft reviewed and changed: the default went from 28,672 to 0 after
the existing
test_ms_lds_need.pyshowed real mesh LDS sizes over the spec minimum)Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed.🤖 Generated with Claude Code
https://claude.ai/code/session_01RAL8MMXUuNpQAVa1iiyAMP