mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 22:40:52 +01:00
[PR #134] [CLOSED] Tests: GPU coverage for v_add/sub_nc_i16, 16-bit min3/max3/med3 and v_pk_add_u16/v_pk_mad_i16 #186
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#186
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/134
Author: @Andretuta
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:old-pr/9864📝 Commits (1)
6a592ebTests: GPU coverage for v_add/sub_nc_i16, 16-bit min3/max3/med3 and v_pk_add_u16/v_pk_mad_i16📊 Changes
4 files changed (+97 additions, -8 deletions)
View changed files
📝
docs/design.md(+3 -3)📝
runtime/test/shaders/check.py(+5 -2)➕
runtime/test/shaders/cs_valu16_ext.asm(+83 -0)📝
scripts/run_gpu_tests.py(+6 -3)📄 Description
Original description (mentions and
#Nreferences are disabled; the numbers refer to the old repository):docs/design.mdmarks three 16-bit VALU rows Not GPU-verified: the instructions were measured on hardware and the translations CPU-checked, but the SPIR-V the translator emits had never run on a GPU. No open PR adds a fixture for them.This adds
runtime/test/shaders/cs_valu16_ext.asm(one lane, laid out likecs_lds_b64_cmpst.asm). Every destination is preset to0xA5A5A5A5, so the half an op does not write shows up as0xA5A5:v_add_nc_i16 clamp0xA5A57FFFv_sub_nc_i16 op_sel:[0,0,1] clamp0x8000A5A5v_add_nc_i160xA5A58000v_med3_i16 op_sel:[1,0,0,0]0xA5A50003v_max3_u16/v_min3_u16 op_sel:[0,0,0,1]0x0003FFFBv_min3_f16/v_max3_f16 op_sel:[0,0,0,1]0x3C00C000v_pk_add_u16 clamp0xFFFF0008v_pk_mad_i160x0007000CThe words are derived in the
.asmheader from the rows. The fixture is registered incheck.pyandscripts/run_gpu_tests.pynext tocs_lds_b64_cmpst. The three rows keep their marker and add a "GPU-checked by" note, as theds_cmpst_b32row does. The Integer clamp row (u16 clamp) is not touched: this fixture doesn't coverv_add_nc_u16 clamp.Tested on an AMD Radeon RX 7900 XT (RADV NAVI31, Mesa 26.3.1, subgroup 32..64), Artix Linux, llvm-mc 23.1.5, programs built from this branch's base:
cs_valu16_extpasses with all eight words exact, native and withLEONIDA_W64_EMULATE=1.0xA5A58000, clamp ignored) makes it FAIL.scripts/run_gpu_tests.pysuite, native and emulated: no failure except the knownms_wave_info_s3flake (#6172, fixes in#5855/#5741), which fails intermittently onmainon this card.check.py,run_gpu_tests.py,design.mdor the shader fixtures: the same failure set as a clean worktree of the merge base on this machine (26, environment-only). The branch adds 2 passing tests and 12 subtests.Resubmitted from
#9579(closed with the other outside PRs on 2026-11-23), rebased ontomain2d53a8055. Related:#9494,#9761(merged),#9813. Synthetic fixture only, no game files. AI-assisted (Claude Code).On the rebased branch, the full suite on this card also shows
cs_imgload_tfe,cs_imgload_d16_tfe,cs_w32_exec_computedandcs_w64_exec_computedfailing; they fail the same way on a clean worktree ofmain, so they are not this change.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.