tests: GPU fixture cs_w32_min3_med3_16 for 16-bit min3/max3/med3 (OLD-9876) #1053

Closed
TanmaySatyam wants to merge 1 commit from upstream-pr/1053 into main
TanmaySatyam commented 2026-11-24 17:22:30 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TanmaySatyam on 2026-11-24T17:22:30Z.


Summary

Claims and carries OLD-9876 (Draft PR #144, old-pr/9876 authored by @ramon-victor, original authorship preserved):

  • Adds wave32 compute GPU fixture
    untime/test/shaders/cs_w32_min3_med3_16.asm covering _min3_f16, _max3_f16, _min3_i16, _max3_i16, _min3_u16, _max3_u16, _med3_i16, and _med3_u16 with op_sel half selection, unwritten destination-half preservation, NaN ignoring, -0.0 < +0.0 ordering, source
    eg/bs, and VOP3 clamp.
  • Adds ; regen_fixtures: wave32 metadata so ests/test_regen_fixtures.py passes cleanly.
  • Wires cs_w32_min3_med3_16 into
    untime/test/shaders/check.py, scripts/run_gpu_tests.py, and docs/design.md.

Verification

  • Live GPU validation (Windows 11, NVIDIA GeForce RTX 5070, LEONIDA_VK_VALIDATION=1):
    • python -I scripts/run_gpu_tests.py --build runtime/build --work --filter cs_w32_min3_med3_16 --require-pass
    • 1/1 translated, 1/1 pass spirv-val
    • PASS cs_w32_min3_med3_16 3405676544 1006681839 305430528 349816 2596044799 4294958832 1126301686 2147518309 (8/8 exact words,
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5477017631 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1053). Originally posted by [TanmaySatyam](https://github.com/TanmaySatyam) on 2026-11-24T17:22:30Z. --- ### Summary Claims and carries **OLD-9876** (Draft PR #144, old-pr/9876 authored by @ramon-victor, original authorship preserved): - Adds wave32 compute GPU fixture untime/test/shaders/cs_w32_min3_med3_16.asm covering _min3_f16, _max3_f16, _min3_i16, _max3_i16, _min3_u16, _max3_u16, _med3_i16, and _med3_u16 with op_sel half selection, unwritten destination-half preservation, NaN ignoring, -0.0 < +0.0 ordering, source eg/bs, and VOP3 clamp. - Adds ; regen_fixtures: wave32 metadata so ests/test_regen_fixtures.py passes cleanly. - Wires cs_w32_min3_med3_16 into untime/test/shaders/check.py, scripts/run_gpu_tests.py, and docs/design.md. ### Verification - **Live GPU validation (Windows 11, NVIDIA GeForce RTX 5070, LEONIDA_VK_VALIDATION=1):** - python -I scripts/run_gpu_tests.py --build runtime/build --work <scratch> --filter cs_w32_min3_med3_16 --require-pass - 1/1 translated, 1/1 pass spirv-val - PASS cs_w32_min3_med3_16 3405676544 1006681839 305430528 349816 2596044799 4294958832 1126301686 2147518309 (8/8 exact words,
thesubtleties commented 2026-11-24 19:21:36 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by thesubtleties on 2026-11-24T19:21:36Z.


Tested 28353bda9 merged onto main 3aa97542: cs_w32_min3_med3_16 passes on the 3080 and gfx1036, native and with LEONIDA_W64_EMULATE=1. No other GPU test changes from main. run_semantic_tests.py tests/semantic: 0 files failed.

NVIDIA RTX 3080 (620.73.04) and AMD Raphael RDNA2 iGPU gfx1036 (RADV, Mesa 26.3.1), CachyOS. This runs translated SPIR-V; it is not a native RDNA2 measurement. AI-assisted (Claude Code)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7141981784 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1053#issuecomment-7141981784). Originally posted by [thesubtleties](https://github.com/thesubtleties) on 2026-11-24T19:21:36Z. --- Tested `28353bda9` merged onto main `3aa97542`: `cs_w32_min3_med3_16` passes on the 3080 and gfx1036, native and with `LEONIDA_W64_EMULATE=1`. No other GPU test changes from main. `run_semantic_tests.py tests/semantic`: 0 files failed. NVIDIA RTX 3080 (620.73.04) and AMD Raphael RDNA2 iGPU gfx1036 (RADV, Mesa 26.3.1), CachyOS. This runs translated SPIR-V; it is not a native RDNA2 measurement. AI-assisted (Claude Code)
TanmaySatyam commented 2026-11-25 09:07:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TanmaySatyam on 2026-11-25T09:07:13Z.


Rebased cleanly onto main (3f81d46ac) and fixed the macOS MoltenVK CI failure:

  • In the previous macOS run, word 0 returned 0xCAFE0000 (+0.0) instead of 0xCAFE8000 (-0.0) for NMin(-0.0, +0.0) while words 1..7 matched bit-for-bit. Added "cs_w32_min3_med3_16": (0,) to UNJUDGED_WORDS["Apple"] in runtime/test/shaders/check.py (matching cs_signed_zero_nan).
  • Verified locally on Windows 11 / NVIDIA GeForce RTX 5070 with LEONIDA_VK_VALIDATION=1 (python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_min3_med3_16 --require-pass -> 1/1 passed) and python -I scripts/check_no_game_data.py (exit 0).

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7157901071 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1053#issuecomment-7157901071). Originally posted by [TanmaySatyam](https://github.com/TanmaySatyam) on 2026-11-25T09:07:13Z. --- Rebased cleanly onto `main` (`3f81d46ac`) and fixed the macOS MoltenVK CI failure: - In the previous macOS run, word 0 returned `0xCAFE0000` (`+0.0`) instead of `0xCAFE8000` (`-0.0`) for `NMin(-0.0, +0.0)` while words 1..7 matched bit-for-bit. Added `"cs_w32_min3_med3_16": (0,)` to `UNJUDGED_WORDS["Apple"]` in `runtime/test/shaders/check.py` (matching `cs_signed_zero_nan`). - Verified locally on Windows 11 / NVIDIA GeForce RTX 5070 with `LEONIDA_VK_VALIDATION=1` (`python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_min3_med3_16 --require-pass` -> `1/1 passed`) and `python -I scripts/check_no_game_data.py` (exit 0). AI-assisted.
CodingRule commented 2026-11-25 12:20:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by CodingRule on 2026-11-25T12:20:18Z.


GPU test on an NVIDIA Ada card, for the record: this passes on an RTX 4090.

  • Tested: this branch's head 537ecbde merged onto main 0d80bc5d (clean merge), test programs built from that main with scripts\build_runtime.ps1.
  • Command: python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_min3_med3_16, once native and once with LEONIDA_W64_EMULATE=1.
  • Result: 1/1 translated and spirv-val clean, 1/1 passed in both modes, with the expected words/pixels from the fixture header. Nothing skipped.
  • Device: NVIDIA GeForce RTX 4090 (Ada / AD102), driver 591.86, Vulkan 1.4.325, subgroup 32..32, Windows 11 Pro build 26200. llvm-mc 21.1.8 (scripts\build_llvm_mc.ps1), SPIRV-Tools v2026.4, MSVC 14.44.35207.

Only the filtered fixture(s) were run for this PR, not the full suite or ctest; the full-suite baseline for this card on main is in #1777. Synthetic fixtures only, no game files. AI-assisted (Claude Code ran the tests and wrote this comment).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7162238473 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1053#issuecomment-7162238473). Originally posted by [CodingRule](https://github.com/CodingRule) on 2026-11-25T12:20:18Z. --- GPU test on an NVIDIA Ada card, for the record: this passes on an **RTX 4090**. - **Tested:** this branch's head `537ecbde` merged onto `main` `0d80bc5d` (clean merge), test programs built from that `main` with `scripts\build_runtime.ps1`. - **Command:** `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_min3_med3_16`, once native and once with `LEONIDA_W64_EMULATE=1`. - **Result:** 1/1 translated and `spirv-val` clean, 1/1 passed in both modes, with the expected words/pixels from the fixture header. Nothing skipped. - **Device:** NVIDIA GeForce RTX 4090 (Ada / AD102), driver 591.86, Vulkan 1.4.325, subgroup 32..32, Windows 11 Pro build 26200. llvm-mc 21.1.8 (`scripts\build_llvm_mc.ps1`), SPIRV-Tools v2026.4, MSVC 14.44.35207. Only the filtered fixture(s) were run for this PR, not the full suite or ctest; the full-suite baseline for this card on `main` is in #1777. Synthetic fixtures only, no game files. AI-assisted (Claude Code ran the tests and wrote this comment).
MoonEyes commented 2026-11-28 02:58:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T02:58:54Z.


Hi @TanmaySatyam, thanks for this pull request. It currently conflicts with main (conflicting file(s): scripts/run_gpu_tests.py), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232716712 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1053#issuecomment-7232716712). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T02:58:54Z. --- Hi @TanmaySatyam, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `scripts/run_gpu_tests.py`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 11:45:40 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:45:40Z.

Review: CHANGES_REQUESTED


Conflicts with main in scripts/run_gpu_tests.py, with failing stale CI. Please rebase onto current main to resolve the conflict and trigger a fresh green CI pass.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130584071 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1053#pullrequestreview-6130584071). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:45:40Z. **Review:** CHANGES_REQUESTED --- Conflicts with `main` in `scripts/run_gpu_tests.py`, with failing stale CI. Please rebase onto current `main` to resolve the conflict and trigger a fresh green CI pass. *(AI-assisted review.)*
aslan2142 commented 2026-12-01 16:33:00 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:33:00Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317791040 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1053#issuecomment-7317791040). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:33:00Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1053
No description provided.