You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expected words check out on the CPU. I translated cs_w32_pk_int16.asm at this head with support.translate_lines and ran it through tests/semantic/spirv_mini_interp.py (wave32, the same FSSM/V# setup as test_new_ops_fixture.py). The output is ffff0000 ffffffff ffff0002 00000000 7fff0002 0001fffe 00010001 8000ffff, the same as the header, check.py and run_gpu_tests.py. The words also match the design.md row worked by hand: the wrap on add/sub/sub_i16, the clamp on the u16 and i16 adds and the u16 sub floor, and the low 16 bits of 0x7fff * 0x7fff.
Two things:
GitHub reports the PR as conflicting with main: git merge-tree against aa2988c conflicts in runtime/test/shaders/check.py, scripts/run_gpu_tests.py and docs/design.md, the lists other GPU tests were added to. It needs a rebase.
The other cs_w32_* GPU tests from today have a CPU twin under tests/semantic (test_new_ops_fixture.py for cs_w32_new_ops): it runs the fixture through the interpreter and checks that check.py and run_gpu_tests.py hold the same words. Adding one here would keep the three copies of the words from drifting. The check above is that test in about 15 lines.
Tested 89205eb on NVIDIA GeForce RTX 3070 (Ampere), driver 617.42, Windows 11 24H2: run_gpu_tests.py --filter cs_w32_pk_int161/1 pass, tests/test_shader_checks.py OK. That's a second NVIDIA GPU next to the RTX 3060.
One caveat for the docs/design.md row, on top of the hand derivation above (which I get too): of the clamp forms used here, only v_pk_add_u16 clamp saturating has a native gfx1036 measurement so far (it is #4082's positive control). v_pk_sub_u16 clamp flooring at 0 and v_pk_add_i16 clamp saturating signed are the ISA reading, confirmed translator-vs-model on two NVIDIA GPUs, not against RDNA2 silicon. A hw_oracle run of those two would make the row's "GPU-verified" fully hardware-backed.
Apple M2 data point. Tested head 0672489 on Apple M2 (Mac14,3), macOS 26.4, MoltenVK 1.4.2 (direct), subgroup 4..32, llvm-mc 23.1.6, Python 3.13.18; clean full build on AppleClang 17 (exit 0).
python -I scripts/run_gpu_tests.py --filter cs_w32_pk_int16 --build runtime/build/linux: 1 shader translated, 1 pass spirv-val; 1/1 passed — words 4294901760 4294967295 4294901762 0 2147418114 131070 65537 2147549183, 0 mismatches. Adds an Apple/MoltenVK result to the NVIDIA run in the PR body, and this wave32 fixture ran here (no 32-lane skip). Head fetched read-only, no rebase/edit/push. Synthetic shader and counts only; no game files.
AI-assisted.
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
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.
Claimed in the coordination issue as:
What and why
Adds GPU fixture cs_w32_pk_int16.asm for row 247 (packed 16-bit integer ops: v_pk_add/sub_u16/i16, v_pk_mul_lo_u16, v_pk_max_u16). GPU-verified on NVIDIA GeForce RTX 3060 (0 mismatches). Registered in check.py and run_gpu_tests.py, updated docs/design.md.
Tested
build.py cs_w32_pk_int16: 1 translated, 1 pass spirv-val.vk_compute_test.exe cs_w32_pk_int16.spv 1 dump: 0 mismatches on NVIDIA GeForce RTX 3060.python -m unittest tests.test_shader_checks: 74/74 passed.Checklist
docs/design.md, with how it was confirmed.