Repository navigation
Conversation
…_pk_add_u16/v_pk_mad_i16 docs/design.md marks the v_add_nc_i16/v_sub_nc_i16, 16-bit min3/max3/med3 and packed 16-bit integer rows not GPU-verified: the instructions were measured on hardware and the translations CPU-checked, but the translated SPIR-V never ran on a GPU. cs_valu16_ext.asm runs one lane with every destination preset to 0xA5A5A5A5, so the unwritten half shows: i16 clamp at both ends of the range (one written to the high half through op_sel), the wrap without clamp, v_med3_i16 reading S0's high half, v_max3_u16/v_min3_u16 and v_min3_f16/v_max3_f16 (with a quiet NaN) each writing one half, v_pk_add_u16 clamp saturating one half, and v_pk_mad_i16 with a negative half. The eight expected words are derived in its header from the rows. Registered in check.py and run_gpu_tests.py next to cs_lds_b64_cmpst; the three rows note the GPU check.
This was referenced Nov 24, 2026
Contributor
|
Author here: taken over in #366, rebased on |
Collaborator
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.
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.