tests: GPU readback for 38 scalar ALU ops on run-time operands (GPU-SALU-EXT) #1114

Manually merged
github merged 2 commits from gh-pr/1114/head into gh-pr/1114/base 2026-11-26 09:38:55 +00:00
Owner

@⁠milk4sale on GitHub · 2026-11-24 18:43 UTC · original
milk4sale:gpu-test/salu-ext → main · +879 −5 · 8 files · 2 commits · merged 2026-11-25 01:49 UTC

Claimed in the coordination issue as: GPU-SALU-EXT (#14)

What and why

38 scalar ALU ops had no fixture in runtime/test/shaders, so no GPU test ran the SPIR-V their rules emit:
s_sub_i32, s_andn2_b32, s_orn2_b32, s_xor_b32, s_ashr_i32, s_mul_hi_u32, s_lshl3_add_u32,
s_lshl4_add_u32, s_pack_ll_b32_b16, s_pack_hh_b32_b16, s_abs_i32, s_bcnt0_i32_b32, s_bitset0_b32,
s_bitset1_b32, s_brev_b32, s_flbit_i32, s_flbit_i32_b32, s_sext_i32_i8, the six s_cmp_*_i32,
s_cmp_gt_u32, s_cmp_le_u32, s_bitcmp0_b32, s_bitcmp1_b32, s_addk_i32, s_mulk_i32, s_cmovk_i32,
s_ashr_i64, s_lshl_b64, s_lshr_b64, s_bcnt0_i32_b64, s_bitset0_b64, s_cmov_b64 and s_ff0_i32_b64.

cs_w32_salu_ext runs them in one thread and stores 73 words:

  • Its sixteen operand words arrive in s4..s19 through VKC_SGPRS. A scalar op on literals is folded by the
    translator (the "Chained scalar constant folding" row of docs/design.md) and only its result reaches the
    driver; with run-time operands each op reaches it as SPIR-V.
  • Every destination is stored, and four words of SCC bits: SCC after each of the 24 ops that write it, each run on
    operands that set it and on operands that clear it (each compare and bit test both ways, the signed and the
    unsigned ones on words that tell the two apart), and SCC after each of the 14 ops that must keep it, set to 1
    and to 0 in turn before them.
  • The expected words are literals in check.py, derived in the fixture's header. tests/test_gpu_salu_ext.py
    recomputes them from the fixture's own instruction lines with the reference of tools/salu_diff.py and checks
    that every op that writes SCC is seen with both values.

All 38 ops gave the expected words on both devices, so nothing changes in the translator.

One existing test had to change to let the fixture in. This is the first fixture with bit 15 set in the immediate
of a signed SOPK op (s_addk_i32 s52, 0x8000). tools/rdna2_decode.py gives that immediate sign-extended
(-32768) and llvm-mc 23.1.4 prints the same word as 0x8000, so test_parity_with_llvm_mc_on_shader_fixtures
failed on it. It now compares the immediates of the ten signed SOPK ops as the 16 bits they are, which is what it
already does for SOPP branch offsets. The encodings are still compared whole, and the translator reads the low
16 bits of either spelling. A new hand-encoded test pins which of the sixteen SOPK ops with an immediate the
decoder sign-extends. The decoder itself is not changed.

Docs: a paragraph in docs/testing.md; the rows of s_sext_i32_i8 / s_flbit_i32 (marked "not GPU-checked"
until now) and of s_lshl1..4_add_u32 in docs/design.md name the fixture.

It does not build on #1012, #1034, #1047 or #1063: its case is counted in a different term of TOTAL in
tests/test_shader_checks.py, and a merge of main, this branch and those four passes that file.

Tested

RTX 4070 Ti (NVIDIA 620.70.06, Linux) and llvmpipe (Mesa 26.2.6, LLVM 23.1.4); llvm-mc 23.1.4, SPIRV-Tools v2026.4.

  • python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_salu_ext --require-pass:
    80 words exact (73 results of 38 scalar ops and the untouched fill) on both devices, natively and with
    LEONIDA_W64_EMULATE=1.
  • The whole GPU suite on the 4070 Ti at this commit: 204/253 passed, 49 skipped natively and 236/253 passed,
    17 skipped with LEONIDA_W64_EMULATE=1; none failed.
  • Nine translator rules broken one at a time; each failed the fixture on both devices: s_ashr_i32 shifting in
    zeros (word 8), s_lshlN_add_u32 taking SCC from the add's carry alone (word 69), s_abs_i32 negating
    (word 17), s_mulk_i32 and s_addk_i32 zero-extending their immediate (words 37 and 21), s_cmovk_i32
    ignoring SCC (word 38), the 64-bit shifts taking their count modulo 32 and s_ashr_i64 shifting in zeros
    (word 51 each), and the 64-bit shifts taking SCC from the low dword alone (word 72).
  • python -I tests/test_gpu_salu_ext.py (13 tests), tests/test_shader_checks.py (87), tests/test_run_gpu_tests.py
    (64) and tests/test_rdna2_decode.py (20; before the change its parity test failed at
    cs_w32_salu_ext.asm: s_addk_i32).
  • Three decoder controls for the changed test, in a scratch copy: the decoder no longer sign-extending
    s_addk_i32, and sign-extending s_cmpk_gt_u32 as well, each fail the new test; one wrong low bit in the
    immediate of s_mulk_i32 still fails the parity test at cs_w32_salu_ext.asm: s_mulk_i32.
  • Every standalone test file under tests/ with python -I (490 files): all pass.
  • python -I scripts/run_semantic_tests.py tests/semantic: 470 files, 6168 tests, 0 files failed.
  • python -I scripts/check_no_game_data.py on the eight changed files, and python -m compileall.

Not run: llvm-mc 19 (the version CI uses), Windows, and an AMD or Intel GPU.

GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS, kernel 7.3.3); llvmpipe (Mesa 26.2.6, LLVM 23.1.4)

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No new rule; two rows now name the GPU fixture.)

🤖 Generated with Claude Code

**@⁠milk4sale** on GitHub · 2026-11-24 18:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1114) `milk4sale:gpu-test/salu-ext` → `main` · +879 −5 · 8 files · 2 commits · merged 2026-11-25 01:49 UTC Claimed in the coordination issue as: GPU-SALU-EXT (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### What and why 38 scalar ALU ops had no fixture in `runtime/test/shaders`, so no GPU test ran the SPIR-V their rules emit: `s_sub_i32`, `s_andn2_b32`, `s_orn2_b32`, `s_xor_b32`, `s_ashr_i32`, `s_mul_hi_u32`, `s_lshl3_add_u32`, `s_lshl4_add_u32`, `s_pack_ll_b32_b16`, `s_pack_hh_b32_b16`, `s_abs_i32`, `s_bcnt0_i32_b32`, `s_bitset0_b32`, `s_bitset1_b32`, `s_brev_b32`, `s_flbit_i32`, `s_flbit_i32_b32`, `s_sext_i32_i8`, the six `s_cmp_*_i32`, `s_cmp_gt_u32`, `s_cmp_le_u32`, `s_bitcmp0_b32`, `s_bitcmp1_b32`, `s_addk_i32`, `s_mulk_i32`, `s_cmovk_i32`, `s_ashr_i64`, `s_lshl_b64`, `s_lshr_b64`, `s_bcnt0_i32_b64`, `s_bitset0_b64`, `s_cmov_b64` and `s_ff0_i32_b64`. `cs_w32_salu_ext` runs them in one thread and stores 73 words: - Its sixteen operand words arrive in `s4..s19` through `VKC_SGPRS`. A scalar op on literals is folded by the translator (the "Chained scalar constant folding" row of `docs/design.md`) and only its result reaches the driver; with run-time operands each op reaches it as SPIR-V. - Every destination is stored, and four words of SCC bits: SCC after each of the 24 ops that write it, each run on operands that set it and on operands that clear it (each compare and bit test both ways, the signed and the unsigned ones on words that tell the two apart), and SCC after each of the 14 ops that must keep it, set to 1 and to 0 in turn before them. - The expected words are literals in `check.py`, derived in the fixture's header. `tests/test_gpu_salu_ext.py` recomputes them from the fixture's own instruction lines with the reference of `tools/salu_diff.py` and checks that every op that writes SCC is seen with both values. All 38 ops gave the expected words on both devices, so nothing changes in the translator. One existing test had to change to let the fixture in. This is the first fixture with bit 15 set in the immediate of a signed SOPK op (`s_addk_i32 s52, 0x8000`). `tools/rdna2_decode.py` gives that immediate sign-extended (-32768) and llvm-mc 23.1.4 prints the same word as `0x8000`, so `test_parity_with_llvm_mc_on_shader_fixtures` failed on it. It now compares the immediates of the ten signed SOPK ops as the 16 bits they are, which is what it already does for SOPP branch offsets. The encodings are still compared whole, and the translator reads the low 16 bits of either spelling. A new hand-encoded test pins which of the sixteen SOPK ops with an immediate the decoder sign-extends. The decoder itself is not changed. Docs: a paragraph in `docs/testing.md`; the rows of `s_sext_i32_i8` / `s_flbit_i32` (marked "not GPU-checked" until now) and of `s_lshl1..4_add_u32` in `docs/design.md` name the fixture. It does not build on #1012, #1034, #1047 or #1063: its case is counted in a different term of `TOTAL` in `tests/test_shader_checks.py`, and a merge of `main`, this branch and those four passes that file. ### Tested RTX 4070 Ti (NVIDIA 620.70.06, Linux) and llvmpipe (Mesa 26.2.6, LLVM 23.1.4); llvm-mc 23.1.4, SPIRV-Tools v2026.4. - `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_salu_ext --require-pass`: `80 words exact (73 results of 38 scalar ops and the untouched fill)` on both devices, natively and with `LEONIDA_W64_EMULATE=1`. - The whole GPU suite on the 4070 Ti at this commit: 204/253 passed, 49 skipped natively and 236/253 passed, 17 skipped with `LEONIDA_W64_EMULATE=1`; none failed. - Nine translator rules broken one at a time; each failed the fixture on both devices: `s_ashr_i32` shifting in zeros (word 8), `s_lshlN_add_u32` taking SCC from the add's carry alone (word 69), `s_abs_i32` negating (word 17), `s_mulk_i32` and `s_addk_i32` zero-extending their immediate (words 37 and 21), `s_cmovk_i32` ignoring SCC (word 38), the 64-bit shifts taking their count modulo 32 and `s_ashr_i64` shifting in zeros (word 51 each), and the 64-bit shifts taking SCC from the low dword alone (word 72). - `python -I tests/test_gpu_salu_ext.py` (13 tests), `tests/test_shader_checks.py` (87), `tests/test_run_gpu_tests.py` (64) and `tests/test_rdna2_decode.py` (20; before the change its parity test failed at `cs_w32_salu_ext.asm: s_addk_i32`). - Three decoder controls for the changed test, in a scratch copy: the decoder no longer sign-extending `s_addk_i32`, and sign-extending `s_cmpk_gt_u32` as well, each fail the new test; one wrong low bit in the immediate of `s_mulk_i32` still fails the parity test at `cs_w32_salu_ext.asm: s_mulk_i32`. - Every standalone test file under `tests/` with `python -I` (490 files): all pass. - `python -I scripts/run_semantic_tests.py tests/semantic`: 470 files, 6168 tests, 0 files failed. - `python -I scripts/check_no_game_data.py` on the eight changed files, and `python -m compileall`. Not run: llvm-mc 19 (the version CI uses), Windows, and an AMD or Intel GPU. GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS, kernel 7.3.3); llvmpipe (Mesa 26.2.6, LLVM 23.1.4) AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (No new rule; two rows now name the GPU fixture.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
No fixture in runtime/test/shaders ran s_sub_i32, s_andn2_b32, s_orn2_b32, s_xor_b32, s_ashr_i32, s_mul_hi_u32,
s_lshl3_add_u32, s_lshl4_add_u32, s_pack_ll_b32_b16, s_pack_hh_b32_b16, s_abs_i32, s_bcnt0_i32_b32, s_bitset0_b32,
s_bitset1_b32, s_brev_b32, s_flbit_i32, s_flbit_i32_b32, s_sext_i32_i8, the six s_cmp_*_i32, s_cmp_gt_u32,
s_cmp_le_u32, s_bitcmp0_b32, s_bitcmp1_b32, s_addk_i32, s_mulk_i32, s_cmovk_i32, s_ashr_i64, s_lshl_b64, s_lshr_b64,
s_bcnt0_i32_b64, s_bitset0_b64, s_cmov_b64 or s_ff0_i32_b64.

cs_w32_salu_ext gets sixteen operand words in s4..s19 from VKC_SGPRS, so each op reaches the driver as SPIR-V and
is not folded by the translator as an op on literals is. One thread stores every destination and four words of SCC
bits: SCC after each op that writes it, run on operands that set it and on operands that clear it, each compare
both ways, and SCC after each op that must keep it, set to 1 and to 0 in turn before them.

The 73 expected words are literals in check.py, derived in the fixture's header. tests/test_gpu_salu_ext.py
recomputes them from the fixture's own instruction lines with the reference of tools/salu_diff.py, checks that
every op that writes SCC is seen with both values, and checks the readback and both runners' verdicts.

The fixture is the first in the folder with bit 15 set in the immediate of a signed SOPK op (s_addk_i32 s52,
0x8000). tools/rdna2_decode.py gives that immediate sign-extended and llvm-mc 23.1.4 prints the same word as
0x8000, so test_parity_with_llvm_mc_on_shader_fixtures failed on it. That test now compares the immediates of the
ten signed SOPK ops as the 16 bits they are, as it already does for SOPP branch offsets, and a hand-encoded test
pins which of the sixteen ops the decoder sign-extends.

No translator, decoder or runtime change.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:38:53 +00:00
github manually merged commit 0c3acdc030 into gh-pr/1114/base 2026-11-26 09:38:55 +00:00
Author
Owner

@⁠abnalstlll-byte on GitHub · 2026-11-24 18:48 UTC · original · approved these changes

Reviewed and verified. Excellent fixture coverage in cs_w32_salu_ext.asm exercising 38 scalar ALU operations using dynamic runtime operands from s4..s19 via VKC_SGPRS, successfully bypassing static constant folding. Validates SCC write/preserve invariants across all 38 ops. Decoder parity adjustment for signed 16-bit SOPK immediates in est_rdna2_decode.py is sound. 100% clean room compliant.

**@⁠abnalstlll-byte** on GitHub · 2026-11-24 18:48 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1114#pullrequestreview-6045322742) · **approved these changes** Reviewed and verified. Excellent fixture coverage in cs_w32_salu_ext.asm exercising 38 scalar ALU operations using dynamic runtime operands from s4..s19 via VKC_SGPRS, successfully bypassing static constant folding. Validates SCC write/preserve invariants across all 38 ops. Decoder parity adjustment for signed 16-bit SOPK immediates in est_rdna2_decode.py is sound. 100% clean room compliant.
Author
Owner

@⁠madhyn on GitHub · 2026-11-24 19:23 UTC · original

Tested cec2c7074 on Arch Linux + NVIDIA RTX 3060 Ti (595.58.03 / Vulkan):

  • python3 -m unittest tests/test_gpu_salu_ext.py tests/test_shader_checks.py: 104 tests passed
  • python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_w32_salu_ext --require-pass (native): 1/1 passed (80 words exact (73 results of 38 scalar ops and the untouched fill))
  • LEONIDA_W64_EMULATE=1 python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_w32_salu_ext --require-pass: 1/1 passed (80 words exact)

AI-assisted: yes

**@⁠madhyn** on GitHub · 2026-11-24 19:23 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1114#issuecomment-7142019776) Tested `cec2c7074` on Arch Linux + NVIDIA RTX 3060 Ti (595.58.03 / Vulkan): - `python3 -m unittest tests/test_gpu_salu_ext.py tests/test_shader_checks.py`: **104 tests passed** - `python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_w32_salu_ext --require-pass` (native): **1/1 passed** (`80 words exact (73 results of 38 scalar ops and the untouched fill)`) - `LEONIDA_W64_EMULATE=1 python3 scripts/run_gpu_tests.py --build runtime/build/linux --filter cs_w32_salu_ext --require-pass`: **1/1 passed** (`80 words exact`) AI-assisted: yes
Author
Owner

@⁠Deedlyy on GitHub · 2026-11-24 20:16 UTC · original

Recommendation: [MERGE]

Reasoning: Adds a GPU readback fixture covering 38 scalar ALU ops that had no GPU coverage, plus checker/decoder test updates and docs. Test-only expansion (+879); no translator behaviour change. Verified by madhyn on RTX 3060 Ti (104 unit tests plus the GPU run). CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with main. Merge once the queued checks are green.

Impact level: 3/10

**@⁠Deedlyy** on GitHub · 2026-11-24 20:16 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1114#issuecomment-7143289461) **Recommendation:** [MERGE] **Reasoning:** Adds a GPU readback fixture covering 38 scalar ALU ops that had no GPU coverage, plus checker/decoder test updates and docs. Test-only expansion (+879); no translator behaviour change. Verified by madhyn on RTX 3060 Ti (104 unit tests plus the GPU run). CI (label, change-scope, no-game-data and the Runtime jobs) is still queued awaiting maintainer workflow approval, so nothing has run in CI yet; GitHub reports no merge conflict with `main`. Merge once the queued checks are green. **Impact level:** 3/10
Author
Owner

@⁠milk4sale on GitHub · 2026-11-25 02:55 UTC · original

Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting).

Tested: 0c3acdc03 merged with main b4b7756e8 (2026-11-25 01:13 UTC), in one tree together with #1087, #1089, #1090, #413, next to main alone. The trees came from git merge-tree, and nothing was pushed. Each job used the workflow's own selection from ci.yml and runtime.yml.

Job main + the five pull requests main alone
check steps: compileall, make_game.py --help pass pass
stdlib-tests-linux (every standalone file, run to the end) 492 of 492 pass 491 of 491 pass
translator-tests (pytest files) 1,890 pass, 2 fail 1,886 pass, the same 2 fail
viewer-tests pass pass
semantic-tests 477 files, 6,231 tests, 0 failed
linux-gpu-tools: ctest 76 of 76 pass
linux-gpu-tools: run_gpu_tests.py, plain, LEONIDA_W64_EMULATE=1 --filter cs_, LEONIDA_BARY_FALLBACK=1 0 failures on lavapipe, 0 on the RTX 4070 Ti
no-game-data: scripts/check_no_game_data.py on this pull request's files clean

This pull request's fixture, cs_w32_salu_ext, passes in all three passes on both devices (80 words exact), and tests/test_gpu_salu_ext.py, tests/test_rdna2_decode.py and tests/test_shader_checks.py pass.

The two pytest failures are main's: tests/test_translate.py on the text-only fixture cs_dpp_cmp.asm (test_gpu_samples_translate_and_validate, test_wave64_emulate_uses_no_subgroup_ops). With #1375 applied, both pass.

Not covered: the Windows and macOS jobs.

Setup: Linux (CachyOS), Python 3.14.10 (CI uses 3.12), llvm-mc 23.1.4 (CI uses 19), Node 26.13.1. GPU suite on lavapipe from Mesa 26.2.6 with GALLIUM_OVERRIDE_CPU_CAPS=avx, the code path of CI's runners, which lack AVX-512; and on an RTX 4070 Ti, NVIDIA 620.70.06.

AI-assisted (Claude Code).

**@⁠milk4sale** on GitHub · 2026-11-25 02:55 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1114#issuecomment-7151356808) Local stand-in for this pull request's CI, which has been queued here since 22:31 UTC (about 580 runs waiting). Tested: `0c3acdc03` merged with `main` `b4b7756e8` (2026-11-25 01:13 UTC), in one tree together with #1087, #1089, #1090, #413, next to `main` alone. The trees came from `git merge-tree`, and nothing was pushed. Each job used the workflow's own selection from `ci.yml` and `runtime.yml`. | Job | `main` + the five pull requests | `main` alone | |---|---|---| | `check` steps: compileall, `make_game.py --help` | pass | pass | | `stdlib-tests-linux` (every standalone file, run to the end) | 492 of 492 pass | 491 of 491 pass | | `translator-tests` (pytest files) | 1,890 pass, 2 fail | 1,886 pass, the same 2 fail | | `viewer-tests` | pass | pass | | `semantic-tests` | 477 files, 6,231 tests, 0 failed | | | `linux-gpu-tools`: ctest | 76 of 76 pass | | | `linux-gpu-tools`: `run_gpu_tests.py`, plain, `LEONIDA_W64_EMULATE=1 --filter cs_`, `LEONIDA_BARY_FALLBACK=1` | 0 failures on lavapipe, 0 on the RTX 4070 Ti | | | `no-game-data`: `scripts/check_no_game_data.py` on this pull request's files | clean | | This pull request's fixture, `cs_w32_salu_ext`, passes in all three passes on both devices (80 words exact), and `tests/test_gpu_salu_ext.py`, `tests/test_rdna2_decode.py` and `tests/test_shader_checks.py` pass. The two pytest failures are `main`'s: `tests/test_translate.py` on the text-only fixture `cs_dpp_cmp.asm` (`test_gpu_samples_translate_and_validate`, `test_wave64_emulate_uses_no_subgroup_ops`). With #1375 applied, both pass. Not covered: the Windows and macOS jobs. Setup: Linux (CachyOS), Python 3.14.10 (CI uses 3.12), llvm-mc 23.1.4 (CI uses 19), Node 26.13.1. GPU suite on lavapipe from Mesa 26.2.6 with `GALLIUM_OVERRIDE_CPU_CAPS=avx`, the code path of CI's runners, which lack AVX-512; and on an RTX 4070 Ti, NVIDIA 620.70.06. AI-assisted (Claude Code).
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-25 06:32 UTC · original

Post-merge note. I tested cec2c7074 applied onto main 66d4f5aa3; the fixture and tests/test_gpu_salu_ext.py did not change between that head and the merged 0c3acdc03. Setup: AMD Radeon RX 7900 XT (RDNA3, gfx1100), AMD proprietary driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, Vulkan SDK 1.4.363.0, llvm-mc 23.1.5. No game files.

  • cs_w32_salu_ext: PASS, 80 words exact, natively and with LEONIDA_W64_EMULATE=1. The whole GPU suite gives 237/253 passed, 16 skipped, 0 failed, against 236/252 on main; the only difference is the new pass.
  • I recomputed all 73 expected words from the ISA semantics, not from the repository's code, and they match.

Two small follow-ups, both still true on main 42537e7b6:

  • SCC coverage: out[71] alternates SCC 1, 0, 1, 0 across the 24 ops, so s_mul_hi_u32, s_pack_hh_b32_b16, s_bitset0_b32 and s_mulk_i32 each run once, with SCC = 1 and a non-zero result. A translator that wrongly wrote SCC = (D != 0) on one of them would leave word 71 unchanged. Running each once more with SCC = 0 would catch it.
  • Stale docs: the docs/design.md row for scalar select and pack still says s_cmovk_i32, s_cmov_b64 and the other s_pack_* forms have no GPU test on main. This fixture now covers s_cmovk_i32, s_cmov_b64, s_pack_ll_b32_b16 and s_pack_hh_b32_b16. That row also repeats several sentences, apparently from merges.
**@⁠adrianmjim** on GitHub · 2026-11-25 06:32 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1114#issuecomment-7154898319) Post-merge note. I tested cec2c7074 applied onto main 66d4f5aa3; the fixture and `tests/test_gpu_salu_ext.py` did not change between that head and the merged `0c3acdc03`. Setup: AMD Radeon RX 7900 XT (RDNA3, gfx1100), AMD proprietary driver 32.0.32029.2010 (26.11.2), Windows 11 build 26300, Vulkan SDK 1.4.363.0, llvm-mc 23.1.5. No game files. - `cs_w32_salu_ext`: **PASS**, `80 words exact`, natively and with `LEONIDA_W64_EMULATE=1`. The whole GPU suite gives 237/253 passed, 16 skipped, 0 failed, against 236/252 on `main`; the only difference is the new pass. - I recomputed all 73 expected words from the ISA semantics, not from the repository's code, and they match. Two small follow-ups, both still true on `main` `42537e7b6`: - **SCC coverage:** out[71] alternates SCC 1, 0, 1, 0 across the 24 ops, so `s_mul_hi_u32`, `s_pack_hh_b32_b16`, `s_bitset0_b32` and `s_mulk_i32` each run once, with SCC = 1 and a non-zero result. A translator that wrongly wrote SCC = (D != 0) on one of them would leave word 71 unchanged. Running each once more with SCC = 0 would catch it. - **Stale docs:** the `docs/design.md` row for scalar select and pack still says `s_cmovk_i32`, `s_cmov_b64` and the other `s_pack_*` forms have no GPU test on main. This fixture now covers `s_cmovk_i32`, `s_cmov_b64`, `s_pack_ll_b32_b16` and `s_pack_hh_b32_b16`. That row also repeats several sentences, apparently from merges.
This discussion has been locked. Commenting is limited to contributors.
No description provided.