Repository navigation
test(shader): order shared memory in the subdword LDS fixture (SHADER-LDS-SUBDWORD-FIXTURE) - #412
Merged
ubiquitarianism merged 1 commit intoNov 24, 2026
Conversation
klikso
added a commit
to klikso/leonida
that referenced
this pull request
Nov 24, 2026
…-FIXTURE-ORDER) Seven compute fixtures printed a shared-memory data race under GPU-assisted validation while returning the expected words. cs_w32_lds_wide: every lane stored to the same LDS words. The lane-0 mask moves in front of the first LDS access, as ProjectLeonida#412 did for cs_w32_lds_subdword. cs_lds_atomics_ext, cs_lds_b64_cmpst, cs_lds_xchg64_ext, cs_w32_fcmpswap, cs_w32_misc_ext, cs_w32_new_ops: lane 0 alone read or wrote a word plainly next to an atomic access of it. An s_barrier now separates each run of plain LDS accesses (ds_read*, ds_write*) from each run of atomic ones, after the s_waitcnt lgkmcnt(0) that ends the earlier run; one place had no wait and gets one. The expected words do not change. The four checked-in listings are regenerated. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Claimed in the coordination issue as:
SHADER-LDS-SUBDWORD-FIXTURE(claim).What and why
Every lane in
cs_w32_lds_subdwordwrote the same two LDS words. The output matched, but GPU-assisted validation reported six shared-memory errors. Moving the existing EXEC mask before the first LDS access gives lane zero exclusive access. A workgroup barrier after each write phase orders the initial 32-bit stores, narrow writes, and reads. The checked-in disassembly mirrors the fixture and all eight expected words remain the same.Tested
On
mainatd2cd6c0d, the original fixture failed with six GPU-assisted validation errors while returning the expected words. The patched fixture passed with the same eight words and no validation errors. It also passed on rdna2spirv: wave64 emulation resets shared words with OpAtomicStore (SHADER-W64-SINK-RACE) #382 at5cb32c2b.All four
test_lds_subdword_wide.pytests passed, including the negative controls. The fixture source and checked-in disassembly match instruction for instruction.The GPU runner used the checked-in disassembly and SPIRV-Tools v2026.4 build
4a21a48awithLEONIDA_VK_VALIDATION=1,VK_KHRONOS_VALIDATION_GPUAV_ENABLE=1, andLEONIDA_W64_EMULATE=1. Both revisions assembled withspirv-asand passedspirv-val.The 6,103-test semantic suite completed over 465 files. Two files initially failed because
spirv-asandspirv-valwere missing. Both passed when rerun with those tools available (test_sopc_validation: 11 tests,test_unary_f16_validation: 5 tests).Rechecked after applying the patch cleanly to
mainat21625bca. Both versions passspirv-val. GPU-assisted validation goes from six errors to zero, with the same eight words. All 377 LDS-related semantic tests passed.GPUs tested: NVIDIA RTX 3060 Ti, driver 610.88, Windows 11, Khronos validation layer 1.4.369.
AI-assisted: yes.
Checklist
mainand merges cleanly.