diff options
| author | DiazE117 <230450176+DiazE117@users.noreply.github.com> | 2026-11-21 22:09:05 -0600 |
|---|---|---|
| committer | DiazE117 <230450176+DiazE117@users.noreply.github.com> | 2026-11-22 13:17:14 -0600 |
| commit | a922e9edd4958fa063f1cee327bda7bba2192fd4 (patch) | |
| tree | 8b274fa7f40cd92d0bec713dc083f8ea45af954f /scripts | |
| parent | 162821017ea3c286c8bec860f3ff94f037912061 (diff) | |
tests: CPU value tests for 8/16-bit and 64/96/128-bit LDS accesses
Two wave32 GPU tests, cs_w32_lds_subdword (ds_write_b8/_b16 and their
_d16_hi forms, ds_read_u8/_i8/_u16/_i16) and cs_w32_lds_wide
(ds_write/ds_read _b64/_b96/_b128, ds_read2st64_b32), and a semantic
test that runs them in the SPIR-V interpreter against a byte-level LDS
model of the ISA rules, with three SPIR-V sabotages as negative
controls. These ops were checked only by lds_fuzz.py, which needs a GPU.
No translator change. RTX 4070 SUPER, driver 610.88: both dumps match.
AI-assisted (Claude Code).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/run_gpu_tests.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py index 3a23250fc..1ef4fd740 100644 --- a/scripts/run_gpu_tests.py +++ b/scripts/run_gpu_tests.py | |||
| @@ -884,7 +884,7 @@ def run_suite(a, work: str) -> int: | |||
| 884 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. | 884 | # Whole-wave mask test, as in check.py: needs a 64-wide subgroup, skipped where the device has none. |
| 885 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. | 885 | # With LEONIDA_W64_EMULATE=1 it was translated with --wave64-emulate and runs on any subgroup size. |
| 886 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) | 886 | results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) |
| 887 | elif name in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half", | 887 | elif name in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_lds_subdword", "cs_w32_lds_wide", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half", |
| 888 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", | 888 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", |
| 889 | "cs_dpp_bound", "cs_dpp_w64", | 889 | "cs_dpp_bound", "cs_dpp_w64", |
| 890 | "cs_w64_mask_detect", | 890 | "cs_w64_mask_detect", |
| @@ -916,6 +916,9 @@ def run_suite(a, work: str) -> int: | |||
| 916 | "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE], | 916 | "cs_w32_salu64": [0x1E6A2C48, 0x1234, 0xFFFFFFFF, 0x100, 47, 48, 0xFFFF8000, 0xFFFFFFFE], |
| 917 | # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header) | 917 | # SHADER-85: ds_read_u8/i8_d16[_hi] (cs_w32_lds_u8_d16.asm header) |
| 918 | "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234], | 918 | "cs_w32_lds_u8_d16": [0xBEEF00FF, 0x00FF1234, 0xBEEFFF80, 0xFF801234, 0xBEEF007F, 0x007F1234, 0xBEEF0080, 0xFFFF1234], |
| 919 | # 8/16-bit and 64/96/128-bit LDS accesses (cs_w32_lds_subdword.asm / cs_w32_lds_wide.asm headers) | ||
| 920 | "cs_w32_lds_subdword": [0x11B2D444, 0xA1B2C3D4, 0xFFFFFFB2, 0x000000B2, 0x00000011, 0xFFFFA1B2, 0x0000A1B2, 0xFFFFC3D4], | ||
| 921 | "cs_w32_lds_wide": [0xCAFEF00D, 0xFEEDFACE, 0x600DD00D, 0x00000000, 0x8BADF00D, 0xDEADC0DE, 0x12345678, 0x9ABCDEF0], | ||
| 919 | # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header) | 922 | # ds_cmpst_b32 and the b64 2-address forms (cs_lds_b64_cmpst.asm header) |
| 920 | "cs_lds_b64_cmpst": [0x11110001, 0x22220002, 0x33330003, 0x44440004, | 923 | "cs_lds_b64_cmpst": [0x11110001, 0x22220002, 0x33330003, 0x44440004, |
| 921 | 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC], | 924 | 0xCCCC000C, 0x44440004, 0xBBBB000B, 0x3579BADC], |
| @@ -993,6 +996,7 @@ def run_suite(a, work: str) -> int: | |||
| 993 | wave64 = name not in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", | 996 | wave64 = name not in ("cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_wqm_w32", "cs_w32_lane_wrap", "cs_movrelsd_2", |
| 994 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", | 997 | "cs_w32_permute", "cs_barrier_divergent", "cs_barrier_early_end", "cs_barrier_loop", |
| 995 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", | 998 | "cs_w32_lds_u8_d16", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", |
| 999 | "cs_w32_lds_subdword", "cs_w32_lds_wide", | ||
| 996 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", | 1000 | "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_sincos", |
| 997 | "cs_lds_b64_cmpst", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec", | 1001 | "cs_lds_b64_cmpst", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec", |
| 998 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", | 1002 | "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", |
| @@ -1009,6 +1013,7 @@ def run_suite(a, work: str) -> int: | |||
| 1009 | want = judged_words(name, msg, want) # cs_signed_zero_nan on Apple and llvmpipe (check.py) | 1013 | want = judged_words(name, msg, want) # cs_signed_zero_nan on Apple and llvmpipe (check.py) |
| 1010 | ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, | 1014 | ok, detail = judge_cs_dump(rc, msg, want, wave64=wave64, partial=partial, emulated=emulated, |
| 1011 | hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16", | 1015 | hexwords=name in ("cs_store", "cs_smem_soffset_imm", "cs_w32_lds_u8_d16", |
| 1016 | "cs_w32_lds_subdword", "cs_w32_lds_wide", | ||
| 1012 | "cs_lds_b64_cmpst", "cs_signed_zero_nan")) | 1017 | "cs_lds_b64_cmpst", "cs_signed_zero_nan")) |
| 1013 | if ok and None in want: | 1018 | if ok and None in want: |
| 1014 | unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) | 1019 | unjudged = ", ".join(str(i) for i, w in enumerate(want) if w is None) |