Skip to content

GPU test cs_w32_pk_rel_ext: packed 16-bit ints, v_swaprel, s_movrels, ds_or/xor_b64 - #171

Closed
Andretuta wants to merge 7 commits into
mainfrom
old-pr/9906
Closed

Andretuta wants to merge 7 commits into
mainfrom
old-pr/9906

Conversation

@Andretuta

Copy link
Copy Markdown
Collaborator

Carried over from old PR 9906 by LouisRiverstone in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9906, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
LouisRiverstone: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

A GPU test in the cs_w32_*_ext format for four merged changes that only had CPU checks: the packed 16-bit integer ops (#1649), v_swaprel_b32 (#1673), s_movrels_b32 (#1598) and the bitwise ds_*_b64 atomics (#1539).

Re-submission of #1850. #1850 was closed unmerged during the 2026-11-23 22:45 UTC cleanup, along with the other open PRs. This is the same branch, now merged with current main.

Checked on #1850 by: tumbione (RTX 5090), tylerstraub (RTX 5090), umnitus (RTX 3060 12 GB), TreXito (RTX 3060 Ti), tedin7 (RTX 5080), tunczzz (RTX 5070 Ti), bunbeans2-arch (RX 9070 XT), searyecheesepeaceful (UHD Graphics 630), Mortify7612 (AMD Radeon RX 9060 XT), Itschotsch (RTX 4090), moffington (RTX 3060), lukasas74 (RTX 5080) and 4 more.

No game files.

AI-assisted (Claude Code): I reviewed the change and re-ran its tests on the merge with main.

… ds_or/xor_b64

v_pk_add_u16 clamp, v_pk_sub_i16, v_pk_mad_u16 with op_sel, v_pk_max_i16,
v_swaprel_b32, s_movrels_b32 and ds_or_rtn_b64 / ds_xor_b64 were merged
with semantic tests only. cs_w32_pk_rel_ext.asm has lane 0 of a wave32
group store one word of each; check.py and run_gpu_tests.py expect the
eight words (derived in the .asm header), so CI runs it on llvmpipe.

tests/semantic/test_pk_rel_ext_fixture.py runs the fixture on the CPU,
checks the words against values computed in the test, and that both
runners expect the same words.
All 32 lanes ran ds_or_rtn_b64 / ds_xor_b64 on one LDS address, so the
XORs cancelled in pairs and word 7 depended on the lane count and order:
0x0000FF00 on GPUs instead of 0x00F0FF00 (found by @borislisandro on an
RTX 2060 SUPER and @tumbione on an RTX 5090, who traced it to even lane
counts). EXEC is now cut to lane 0 before the LDS block. The CPU fixture
missed it because spirv_mini_interp gives each invocation its own LDS; the
test now checks the order in the source.
python -I on the file failed with ModuleNotFoundError: support, as the folder
was not on sys.path (found by @justr4mzi on #4323, the same template). It is
now inserted, as test_cs_shared_memory_limit does.
# Conflicts:
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
#	tests/semantic/regen_fixtures.py
# Conflicts:
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
#	tests/semantic/regen_fixtures.py
# Conflicts:
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
#	tests/semantic/regen_fixtures.py
# Conflicts:
#	runtime/test/shaders/check.py
#	scripts/run_gpu_tests.py
@aslan2142

Copy link
Copy Markdown
Collaborator

This carry-over of old upstream PR 9906 has been taken over in #853, so I'm closing this draft as #17 describes. The branch old-pr/9906 stays.

AI-assisted (Claude Code, Claude Opus 5.5).

@aslan2142 aslan2142 closed this Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants