tests: GPU fixture cs_w32_lds_add_f32 for ds_add_f32 and ds_add_rtn_f32 (OLD-9911) #862

Open
github-bot wants to merge 2 commits from github-bot/gh-862 into main AGit
Owner

@⁠TanmaySatyam on GitHub · 2026-11-24 14:47 UTC · original
TanmaySatyam:test/old-9911-gpu-lds-add-f32 → main · +266 −3 · 5 files · 2 commits · open

Claimed in the coordination issue as: OLD-9911

Summary

Carries forward old-pr/9911 (carried-over draft #176) onto current main (f3e26be7c), preserving the original author's (Luiz Neves) two commits:

  • GPU test cs_w32_lds_add_f32: ds_add_f32 and ds_add_rtn_f32
  • test_lds_add_f32_fixture: runs under python -I; the double sum is exact for these inputs only

Rebase adjustments

  • Resolved append-list conflicts in runtime/test/shaders/check.py and scripts/run_gpu_tests.py against current main.
  • Kept main's dynamic tests/semantic/regen_fixtures.py and added the ; regen_fixtures: this source has a translator fixture in tests/semantic/fixtures/disasm marker line to runtime/test/shaders/cs_w32_lds_add_f32.asm.

Testing & Hardware Verification

  • AI-assisted: yes (rebase, conflict resolution, and test execution).
  • Synthetic fixtures only: no game data used (python -I scripts/check_no_game_data.py clean on all touched files).
  • GPU & Driver: NVIDIA GeForce RTX 5070, Driver 591.74, Windows 11 (LEONIDA_VK_VALIDATION=1, VKC_SUBGROUP_SIZE=32).
  • Live GPU run (runtime/test/shaders/build.py + vk_compute_test.exe cs_w32_lds_add_f32.spv 1 dump):
    1 shaders: 1 translated, 1 pass spirv-val
    device: NVIDIA GeForce RTX 5070 (subgroup 32..32) (validation on)
    compute subgroup size: 32
    1 groups x 64: 0 mismatches
    out[0..7] = 1069547520 1081081856 1266679808 1266679810 0 2139095040 1048576000 1075838976
    
    Matches expected [0x3FC00000, 0x40700000, 0x4B800000, 0x4B800002, 0, 0x7F800000, 0x3E800000, 0x40200000] with 0 mismatches and 0 Vulkan validation errors.
  • CPU / unit tests:
    • python -I tests/semantic/test_lds_add_f32_fixture.py -v: 4/4 OK
    • python -I tests/test_regen_fixtures.py: 7/7 OK
    • python -I tests/test_text_write_line_endings.py: 3/3 OK
**@⁠TanmaySatyam** on GitHub · 2026-11-24 14:47 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/862) `TanmaySatyam:test/old-9911-gpu-lds-add-f32` → `main` · +266 −3 · 5 files · 2 commits · open Claimed in the coordination issue as: OLD-9911 ### Summary Carries forward `old-pr/9911` (carried-over draft #176) onto current `main` (`f3e26be7c`), preserving the original author's (`Luiz Neves`) two commits: - `GPU test cs_w32_lds_add_f32: ds_add_f32 and ds_add_rtn_f32` - `test_lds_add_f32_fixture: runs under python -I; the double sum is exact for these inputs only` ### Rebase adjustments - Resolved append-list conflicts in `runtime/test/shaders/check.py` and `scripts/run_gpu_tests.py` against current `main`. - Kept `main`'s dynamic `tests/semantic/regen_fixtures.py` and added the `; regen_fixtures: this source has a translator fixture in tests/semantic/fixtures/disasm` marker line to `runtime/test/shaders/cs_w32_lds_add_f32.asm`. ### Testing & Hardware Verification - **AI-assisted:** yes (rebase, conflict resolution, and test execution). - **Synthetic fixtures only:** no game data used (`python -I scripts/check_no_game_data.py` clean on all touched files). - **GPU & Driver:** NVIDIA GeForce RTX 5070, Driver 591.74, Windows 11 (`LEONIDA_VK_VALIDATION=1`, `VKC_SUBGROUP_SIZE=32`). - **Live GPU run (`runtime/test/shaders/build.py` + `vk_compute_test.exe cs_w32_lds_add_f32.spv 1 dump`):** ```text 1 shaders: 1 translated, 1 pass spirv-val device: NVIDIA GeForce RTX 5070 (subgroup 32..32) (validation on) compute subgroup size: 32 1 groups x 64: 0 mismatches out[0..7] = 1069547520 1081081856 1266679808 1266679810 0 2139095040 1048576000 1075838976 ``` Matches expected `[0x3FC00000, 0x40700000, 0x4B800000, 0x4B800002, 0, 0x7F800000, 0x3E800000, 0x40200000]` with 0 mismatches and 0 Vulkan validation errors. - **CPU / unit tests:** - `python -I tests/semantic/test_lds_add_f32_fixture.py -v`: 4/4 OK - `python -I tests/test_regen_fixtures.py`: 7/7 OK - `python -I tests/test_text_write_line_endings.py`: 3/3 OK
the returned old value, a plain sum, ties to even both ways, -0 + +0,
overflow to +inf, the non-returning form and offset:. No denormal or NaN
input (not measured). Registered in check.py, run_gpu_tests.py and
regen_fixtures.py; tests/semantic/test_lds_add_f32_fixture.py runs it on the
CPU against a once-rounded double sum and checks both runners expect the
same words.
@justr4mzi: python -I on the file failed with ModuleNotFoundError: support, as
the folder was not on sys.path (now inserted, as test_cs_shared_memory_limit
does). @tupacfan04: a double sum of two binary32 values is not exact in
general; the docstring says it is for this file's inputs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:25:06 +00:00
Author
Owner

@⁠Sangonapou on GitHub · 2026-11-24 15:44 UTC · original

Tested 4107e54d on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300), native Windows: pass

Built at this head with scripts\build_runtime.ps1 (MSVC 19.51, VS Build Tools 2026, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0); llvm-mc 23.1.6, SPIRV-Tools 2026.4. No game files.

run_gpu_tests.py --filter cs_w32_lds_add_f32 --require-pass: PASS native (subgroup 32) and with LEONIDA_W64_EMULATE=1, 1069547520 1081081856 1266679808 1266679810 0 2139095040 1048576000 1075838976 both times.

**@⁠Sangonapou** on GitHub · 2026-11-24 15:44 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/862#issuecomment-7136545449) Tested 4107e54d on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300), native Windows: pass Built at this head with `scripts\build_runtime.ps1` (MSVC 19.51, VS Build Tools 2026, Windows SDK 10.0.26100, Vulkan SDK 1.4.363.0); `llvm-mc` 23.1.6, SPIRV-Tools 2026.4. No game files. `run_gpu_tests.py --filter cs_w32_lds_add_f32 --require-pass`: PASS native (subgroup 32) and with `LEONIDA_W64_EMULATE=1`, `1069547520 1081081856 1266679808 1266679810 0 2139095040 1048576000 1075838976` both times.
Author
Owner

@⁠CodingRule on GitHub · 2026-11-25 12:20 UTC · original

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

  • Tested: this branch's head 8dc89da0 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_lds_add_f32, 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).

**@⁠CodingRule** on GitHub · 2026-11-25 12:20 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/862#issuecomment-7162236658) GPU test on an NVIDIA Ada card, for the record: this passes on an **RTX 4090**. - **Tested:** this branch's head `8dc89da0` 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_lds_add_f32`, 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).
This pull request has changes conflicting with the target branch.
  • scripts/run_gpu_tests.py
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/862/head:github-bot/gh-862'
git switch 'github-bot/gh-862'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-862'
git switch 'github-bot/gh-862'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-862'
git switch 'github-bot/gh-862'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-862'
git switch 'main'
git merge --squash 'github-bot/gh-862'
git switch 'main'
git merge --ff-only 'github-bot/gh-862'
git switch 'main'
git merge 'github-bot/gh-862'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.