TEST-LDS-U8-D16-GPUAV: restrict LDS fixture accesses to lane zero #507
No reviewers
No assignees
Labels
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
No project
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
No due date set.
Reference
leonida/mandy!507
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/lds-u8-d16-fixture"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Pull request successfully merged and closed
Claimed as TEST-LDS-U8-D16-GPUAV.
What and why
cs_w32_lds_u8_d16lets all 32 lanes store the same LDS word before restricting output to lane zero. Matching values do not make those concurrent stores safe: GPU-assisted validation reports six shared-memory data-race errors on an RTX 3080.Move the existing EXEC mask ahead of the LDS accesses. Lane zero now performs every LDS access and output store, preserving the eight expected byte-read/sign-extension results. Run the CPU fixture with all 32 invocations and observe LDS writes, so serialized execution cannot hide the original race: the regression sees 32 writes before the fix and exactly one afterward. No translator or native harness changes.
Tested
spirv-val(1/1). Repeated the corrected GPU run after rebasing ontoa960c06fd.git diff --checkpass.8f481cf16toa960c06fdis clean. Upstream changes do not touch these files; its translator edit concerns SDWA conversion encodings, which this fixture does not use.GPU validation used SPIRV-Tools 2026.4, Khronos validation layers 1.4.357.0,
LEONIDA_VK_VALIDATION=1andVK_KHRONOS_VALIDATION_GPUAV_ENABLE=1. This is a wave32 fixture (subgroup 32); the runner's globalLEONIDA_W64_EMULATE=1does not change its mode. Only hand-written synthetic shaders were used.GPUs tested: NVIDIA GeForce RTX 3080 10 GB, driver 610.88, Windows 11 build 26300.
AI-assisted: yes (Codex).
Checklist
mainand merges cleanly.Tested d4eacf7d on NVIDIA GeForce RTX 4070, driver 617.42, Windows 11 10.0.26300, MSVC (VS 2022), Vulkan SDK 1.4.363.0, Ninja RelWithDebInfo: pass.
tests/semantic/test_lds_read_u8_d16.py(run fromtests/semantic): 3/3, including the one-LDS-store check over the full 32-lane workgroup.run_gpu_tests.py --filter lds_u8_d16:cs_w32_lds_u8_d161/1, words0xbeef00ff 0xff1234 0xbeefff80 0xff801234 0xbeef007f 0x7f1234 0xbeef0080 0xffff1234, unchanged.ctest: 302/303 passed; the one failure isd3d12_execute_indirect_validation, which is the red-on-main case in #504 and fails the same way on all three PRs. I did not rerun it onmainitself.run_gpu_tests.py: 197/248 passed, 49 skipped; withLEONIDA_W64_EMULATE=1: 229/248 passed, 17 skipped, the same totals as my unmodified-mainrecord in #534.Code read: no issues; details in my review: https://github.com/ubiquitarianism/leonida/pull/507#pullrequestreview-6035356322
AI-assisted: review by Codex (gpt-6.1-terra).
Merging. Why merged: the LDS u8_d16 GPU fixture now has only lane 0 touch shared memory, removing a race between the 32 lanes.
Why it's good: security-reviewed; on main d42773d the new test fails and passes with this PR (3/3); the GPU fixture passes on an RTX 4070 SUPER (driver 621.24).
AI-assisted (Claude Code, Claude Opus 5.5).