test: verify overlapping private LDS byte and halfword writes #866
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!866
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/866/head"
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?
@MrSkelee on GitHub · 2026-11-23 14:52 UTC · original
MrSkelee:feature/shader-ds-read-write→main· +45 −1 · 1 files · 2 commits · merged 2026-11-23 15:26 UTCLowers 5 sub-dword Local Data Share (LDS) read and write instructions in
tools/compute_store_aot.py(cs_6_0) for thread-private LDS memory:ds_read_i16: 16-bit signed load with sign-extension (offsets 0, 2)ds_read_u8: 8-bit unsigned load with zero-extension (offsets 0..3)ds_read_i8: 8-bit signed load with sign-extension (offsets 0..3)ds_write_b16: 16-bit partial write with halfword masking (offsets 0, 2)ds_write_b8: 8-bit partial write with byte masking (offsets 0..3)Highlights
--lds-bytes >= 128), a verifiedlocal_x << 2base address, and immediates_waitcnt lgkmcnt(0)after every DS operation.ds_read_i16/ds_write_b16reject odd offsets;ds_read_u8/ds_read_i8/ds_write_b8reject offsets > 3.ds_write_b32).lds_signedandlds_subwritefixtures totests/compute_store_check.pyalongsideprivate.gfx1013andgfx1030underDS.Verification
Local results: 3/3 LDS draw fixtures passed (0 mismatches across 320 words for 1 and 3 groups), all 3 negative mutations detected, 75/75 unit tests passed.
@stan495 on GitHub · 2026-11-23 14:58 UTC · original
Thanks for working on this! #865 has landed on
mainand covers the same private LDS byte and halfword operations in the compute translator, including partial writes, signed and unsigned reads, and tests for every supported offset. If there’s a case in #866 that #865 missed, it would be worth keeping as a focused follow-up. Otherwise, I think we can close this as covered by #865.@R0Y00 on GitHub · 2026-11-23 15:01 UTC · original
#865 landed the five instruction forms and the disjoint-write controls. I kept your read-before-write fixture and based it on that implementation. It now reads the same byte before the halfword write, after that write, and after an overlapping byte write as part of the full word. That checks that the earlier reads survive both overwrites and that the final write preserves the other bytes.
WARP and RTX 4060 Laptop matched the full 320-word readback for one and three groups. Dropping the halfword write mismatched the intermediate read at word 1. Dropping the byte write mismatched the final word at word 2. LLVM 15 also passed. The updated branch is test-only and is waiting for a fresh CI run.
@MrSkelee on GitHub · 2026-11-23 15:02 UTC · original
Awesome, thank you @R0Y00! Glad the overlapping write fixture and readback checks are useful as a dedicated regression test.