test: verify overlapping private LDS byte and halfword writes #860
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/866"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by MrSkelee on 2026-11-23T14:52:23Z.
Lowers 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.
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-23T14:58:27Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T15:01:21Z.
#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.
Imported from R0Y00/Xbox2Windows. Originally posted by MrSkelee on 2026-11-23T15:02:10Z.
Awesome, thank you @R0Y00! Glad the overlapping write fixture and readback checks are useful as a dedicated regression test.