Repository navigation
Translator: ds_read2_b64, ds_write2_b64 and their st64 forms - #810
Merged
ItsNotRexed merged 3 commits intoNov 22, 2026
Merged
Conversation
All four raised Unsupported. They access two 64-bit elements at vaddr + offset0 * unit and vaddr + offset1 * unit, with unit = 8 bytes (x64 for st64), each element two consecutive dwords; read2 fills v[d:d+3] after all loads, write2 takes two VGPR pairs. The b32 forms share the code with unit 4, unchanged. tests/semantic/test_lds_read2_write2_b64.py runs compute listings on the CPU (one invocation, LDS as a Workgroup variable from ItsNotRexed#592) and checks every dword against a plain-Python LDS model.
ItsNotRexed
added a commit
that referenced
this pull request
Nov 22, 2026
quackottu
reviewed
Nov 22, 2026
quackottu
left a comment
Contributor
There was a problem hiding this comment.
Tested aae7b07 on NVIDIA GeForce RTX 5070 (subgroup 32), driver 621.24, Windows 11 Pro (26300), Vulkan SDK 1.4.363.0, llvm-mc 21.1.8 (built with scripts/build_llvm_mc.ps1), scripts/run_gpu_tests.py:
- native: 71/98 passed, 27 skipped (
main8df277f here: 64/91 passed, 27 skipped, all wave64 tests needing a 64-wide subgroup) LEONIDA_W64_EMULATE=1: 98/98 passed (mainhere: 91/91)python -m unittest discover -s tests/semantic: Ran 980 tests in 192.604s OK
|
Tested aae7b07 on two GPUs, Linux 7.3.5 (CachyOS): pass.
|
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.
Depended on #592, which is now merged; the branch is up to date with
main, so the diff is this PR's change only.tools/rdna2spirv.pytranslatesds_read2_b32/ds_write2_b32and theirst64forms, but raisesUnsupportedon the 64-bit versions:ds_read2_b64,ds_write2_b64,ds_read2st64_b64andds_write2st64_b64. They aren't in the translated corpus, so this is future-proofing. Claimed in #634.Change
tools/rdna2spirv.py: the b64 forms share the b32 code.vaddr + offset0 * unitandvaddr + offset1 * unit.unitis the element size, 8 bytes for b64, and ×64 forst64(RDNA2 ISA, DS 2-address forms).read2_b64fillsv[d:d+3], and all four loads happen before the first write, so a vdst that overlaps vaddr is safe.write2_b64takes two VGPR pairs.tests/semantic/test_lds_read2_write2_b64.py(new, stdlibunittest):write2forms are checked by reading each dword back withds_read_b32.read2forms are checked after seeding LDS withds_write_b32.write2_b64→read2_b64round trip uses swapped offsets.st64, all compared with a plain-Python LDS model.Tested
python -I -m unittest discover -s tests/semantic: all pass, including the existing LDS tests. Without the translator change, the new file has 15 errors (Unsupported).python -I tests/test_lds_fuzz.pypasses.python -m compileall -q tools testspasses. Not run on a GPU, and no game files used.tools/lds_fuzz.pydoesn't generate the b64 2-address forms yet. That could be a follow-up for FUZZ-6.AI-assisted (Claude Code): it wrote the change and the tests, and ran the checks listed above.