OLD-7866: restore old upstream PR 7866 - tests/semantic: buffer_load_short_d16_hi keeps both halves in inactive lanes #711
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!711
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/711/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?
@aslan2142 on GitHub · 2026-11-24 12:35 UTC · original
aslan2142:semantic-d16-hi-inactive-lane→main· +95 −0 · 2 files · 1 commits · merged 2026-11-25 22:30 UTCClaimed in the coordination issue as: OLD-7866 #14
Restoration of my original pull request, old upstream PR 7866 in
ItsNotRexed/Leonida, which was closed unmerged when that repository went private on 2026-11-23 (old numbers link nowhere now). Rebased onto main at21625bca8c; the commit applied unchanged (two new files, no conflicts, no old numbers in it).What and why
mainalready gets this right. InGen.buffer_sub(tools/rdna2spirv.py, the end of the function) the loaded half goes in withOpBitFieldInsertandself.dstwrites it to active lanes only.test_buffer_sub_dword.pychecks an inactive lane only for a store.tests/semantic/fixtures/cs_buffer_load_d16_hi_exec.asmis hand-written, wave32.v5, then EXEC is cut to0x5AC3A50F.buffer_load_short_d16_hiintov5, then storesv5from all lanes.tests/semantic/test_buffer_load_d16_hi_exec.pychecks:docs/design.mdrow "8/16-bit MUBUF d16 loads and stores": "Inactive lanes neither load nor store". No translator rule changes.Tested
Linux, Python 3.14.10, CPU only (
spirv_mini_interp), hand-written fixtures; no game files.python -m unittest discover -s tests/semantic -p test_buffer_load_d16_hi_exec.py: 3 tests OK on this branch. With only these two files copied ontomainthe result is the same, sincemainalready behaves this way.store_regin place ofself.dst, ignoring EXEC), this test fails in all 16 inactive lanes.test_buffer_sub_dword.pystill passes with that change, so this is the only test that catches it.python -I scripts/run_semantic_tests.py tests/semantic:main: 465 files, 6 108 tests, 0 failed;python -m compileall -q tools tests,git diff --checkandpython -I scripts/check_no_game_data.pyon both new files: clean.GPUs tested: n/a
AI-assisted: yes
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no rule changes)AI-assisted (Claude Code, Claude Opus 5.5).
@abnalstlll-byte on GitHub · 2026-11-24 12:37 UTC · original · approved these changes
Reviewed and verified OLD-7866. Hand-written fixture \cs_buffer_load_d16_hi_exec.asm\ and semantic test \ est_buffer_load_d16_hi_exec.py\ accurately verify that \uffer_load_short_d16_hi\ updates only the high 16-bits of destination registers in active EXEC lanes while preserving both halves in inactive lanes. Fully clean-room compliant and executable via \spirv_mini_interp. Approved.
@GeorgiyDemo on GitHub · 2026-11-24 12:42 UTC · original
Ran
cd92de745on Apple M5 Pro, macOS 26.7.3 (25G342), Python 3.15.2, againstmaind42773d07:tests/semantic/test_buffer_load_d16_hi_exec.py: 3 tests OK at this head.tests/semantic/fixtures/cs_buffer_load_d16_hi_exec.asmonmainalso passes 3/3, so this restores coverage of behaviourmainalready has rather than fixing a bug there. Useful as a guard; no GPU run needed (interpreter fixture).Synthetic fixtures only, no game data. AI-assisted.
@aslan2142 on GitHub · 2026-11-25 22:30 UTC · original
Merged: tests/semantic:
buffer_load_short_d16_hikeeps both halves in inactive lanes.main. As the review noted,mainalready behaves this way, so this is a regression guard, not a fix.tests/semantic/test_buffer_load_d16_hi_exec.pypasses onmain+ this head (Linux, CPython 3.14).main04221201c+cd92de745: the semantic suite passes (493 files, 6,318 tests, 0 files failed); the 15 docs and writer tests pass;check_no_game_data.pyis clean on the 2 changed files.AI-assisted (Claude Code, Claude Opus 5.5).