run_gpu_tests: sort cs_dump tables one entry per line (TEST-RUN-GPU-SORTED-TABLES) #1726

Merged
TanmaySatyam merged 1 commit from upstream-pr/1726 into main 2026-11-30 13:54:15 +00:00
TanmaySatyam commented 2026-11-25 09:48:49 +00:00 (Migrated from github.com)

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


Claimed in the coordination issue as: TEST-RUN-GPU-SORTED-TABLES (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158772853)

What and why

scripts/run_gpu_tests.py had three multi-entry horizontal tuples (elif name in ("cs_...", ...) duplicating every key of cs_dump_wants, wave64 = name not in (...), and hexwords=name in (...)) that caused recurring 3-way merge conflicts whenever two GPU-test PRs touched the runner.

This lifts those lists to module-level, alphabetically sorted, one-entry-per-line tables:

  • CS_DUMP_WANTS (dispatch now checks elif name in CS_DUMP_WANTS: directly, removing the duplicate 74-entry tuple)
  • CS_DUMP_NON_WAVE64 (frozenset[str], 42 entries)
  • CS_DUMP_HEXWORDS (frozenset[str], 9 entries)

Every fixture set has identical membership to main; tests/test_run_gpu_tests_tables.py enforces alphabetical sorting, one-entry-per-line formatting, and subset parity going forward.

Tested

  • python -m compileall -q scripts/run_gpu_tests.py tests/test_run_gpu_tests_tables.py -> pass
  • python -I tests/test_run_gpu_tests_tables.py -> 4/4 passed
  • python -I tests/test_run_gpu_tests.py -> 68/68 passed
  • python -I tests/test_run_gpu_tests_paths.py -> 21/21 passed
  • python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_store --require-pass (LEONIDA_VK_VALIDATION=1) -> 1/1 passed
  • python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_fcmpswap --require-pass (LEONIDA_VK_VALIDATION=1) -> 1/1 passed
  • LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_smem_vcc_base --require-pass (LEONIDA_VK_VALIDATION=1) -> 1/1 passed (and skips natively on 32-wide as before)
  • python -I scripts/check_no_game_data.py scripts/run_gpu_tests.py tests/test_run_gpu_tests_tables.py -> exit 0

GPUs tested: NVIDIA GeForce RTX 5070 (Windows 11, Vulkan validation enabled, 0 VUIDs)

AI-assisted: yes

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. (n/a)
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5488941545 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1726). Originally posted by [TanmaySatyam](https://github.com/TanmaySatyam) on 2026-11-25T09:48:49Z. --- Claimed in the coordination issue as: TEST-RUN-GPU-SORTED-TABLES (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7158772853) ### What and why `scripts/run_gpu_tests.py` had three multi-entry horizontal tuples (`elif name in ("cs_...", ...)` duplicating every key of `cs_dump_wants`, `wave64 = name not in (...)`, and `hexwords=name in (...)`) that caused recurring 3-way merge conflicts whenever two GPU-test PRs touched the runner. This lifts those lists to module-level, alphabetically sorted, one-entry-per-line tables: - `CS_DUMP_WANTS` (dispatch now checks `elif name in CS_DUMP_WANTS:` directly, removing the duplicate 74-entry tuple) - `CS_DUMP_NON_WAVE64` (`frozenset[str]`, 42 entries) - `CS_DUMP_HEXWORDS` (`frozenset[str]`, 9 entries) Every fixture set has identical membership to `main`; `tests/test_run_gpu_tests_tables.py` enforces alphabetical sorting, one-entry-per-line formatting, and subset parity going forward. ### Tested - `python -m compileall -q scripts/run_gpu_tests.py tests/test_run_gpu_tests_tables.py` -> pass - `python -I tests/test_run_gpu_tests_tables.py` -> 4/4 passed - `python -I tests/test_run_gpu_tests.py` -> 68/68 passed - `python -I tests/test_run_gpu_tests_paths.py` -> 21/21 passed - `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_store --require-pass` (`LEONIDA_VK_VALIDATION=1`) -> 1/1 passed - `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_fcmpswap --require-pass` (`LEONIDA_VK_VALIDATION=1`) -> 1/1 passed - `LEONIDA_W64_EMULATE=1 python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_smem_vcc_base --require-pass` (`LEONIDA_VK_VALIDATION=1`) -> 1/1 passed (and skips natively on 32-wide as before) - `python -I scripts/check_no_game_data.py scripts/run_gpu_tests.py tests/test_run_gpu_tests_tables.py` -> exit 0 GPUs tested: NVIDIA GeForce RTX 5070 (Windows 11, Vulkan validation enabled, 0 VUIDs) AI-assisted: yes ### 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. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a)
lixonik commented 2026-11-25 10:23:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-25T10:23:51Z.

Review: COMMENTED


Independent native Windows verification at df7cf56d against 3de22a19. I extracted the old table and dispatch membership from the base AST and compared them with the PR's loaded constants: all 74 fixture names and expected word sequences are identical, as are the 42 non-wave64 and 9 hex-output memberships. The three runner test files passed (4 table, 68 runner, 21 path tests).

AI-assisted review. CPU-only comparison and synthetic tests.

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6055779468 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1726#pullrequestreview-6055779468). Originally posted by [lixonik](https://github.com/lixonik) on 2026-11-25T10:23:51Z. **Review:** COMMENTED --- Independent native Windows verification at `df7cf56d` against `3de22a19`. I extracted the old table and dispatch membership from the base AST and compared them with the PR's loaded constants: all 74 fixture names and expected word sequences are identical, as are the 42 non-wave64 and 9 hex-output memberships. The three runner test files passed (4 table, 68 runner, 21 path tests). AI-assisted review. CPU-only comparison and synthetic tests.
MoonEyes commented 2026-11-28 02:59:05 +00:00 (Migrated from github.com)

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


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:7232718594 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1726#issuecomment-7232718594). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T02:59:05Z. --- 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).
enlight3d commented 2026-11-29 04:38:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T04:38:12Z.


RUN: #1726 (tests only, python -I, no build, no game, GPU not used)

Tested heads: PR head df7cf56d1 (merge base 3de22a190), main b6bf3aa0b (fetched 2026-11-29).

Commands (from each worktree root, CPython 3.13.12):

  • python -I tests/test_run_gpu_tests_tables.py (new file, 4 tests)
  • python -I tests/test_run_gpu_tests.py
  • python -I tests/test_run_gpu_tests_paths.py
  • python -I tests/test_build_runtime_fallback.py (imports run_gpu_tests)
  • python -I scripts/run_semantic_tests.py tests/semantic -j 4 (24 semantic files mention run_gpu_tests.py; test_rule_gpu_fixtures.py reads its source)

Red: PR head with scripts/run_gpu_tests.py reverted to the merge-base version (tests kept): test_run_gpu_tests_tables.py fails 4 of 4 (tables missing, dispatch still uses the inline tuple). This is a refactor, so the red is structural: the new test pins the sorted one-entry-per-line tables. The existing runner tests (68) still pass with the old runner, as expected for a no-behaviour-change refactor.
Green at head: tables 4 OK, runner 68 OK, paths 21 OK, build_runtime_fallback 10 OK; semantic suite 487 files, 6279 tests, 0 files failed (1043 s, 4 jobs).
Green merged into main: NOT RUNNABLE. git merge pr-1726 into main b6bf3aa0b conflicts in scripts/run_gpu_tests.py (2 hunks, the inline cs_dump tuples that the PR replaces were edited on main by later PRs); GitHub also reports CONFLICTING (needs rebase). Plain main for reference: test_run_gpu_tests.py 75 OK, paths 23 OK, tables test fails on main as expected (no tables there).
Pre-existing on plain main, unrelated to this PR: tests/test_build_runtime_fallback.py fails 1 test (test_the_loader_gets_the_stack_reserve_cmake_gives_it, a CMake regex about /STACK). It passes at the PR head only because the PR's base predates the CMake change.

So: green at head, red verified (structural), needs a rebase on main before a merged run is possible.

Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12, GPU not used.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7250771073 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1726#issuecomment-7250771073). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T04:38:12Z. --- RUN: #1726 (tests only, python -I, no build, no game, GPU not used) Tested heads: PR head df7cf56d1 (merge base 3de22a190), main b6bf3aa0b (fetched 2026-11-29). Commands (from each worktree root, CPython 3.13.12): - python -I tests/test_run_gpu_tests_tables.py (new file, 4 tests) - python -I tests/test_run_gpu_tests.py - python -I tests/test_run_gpu_tests_paths.py - python -I tests/test_build_runtime_fallback.py (imports run_gpu_tests) - python -I scripts/run_semantic_tests.py tests/semantic -j 4 (24 semantic files mention run_gpu_tests.py; test_rule_gpu_fixtures.py reads its source) Red: PR head with scripts/run_gpu_tests.py reverted to the merge-base version (tests kept): test_run_gpu_tests_tables.py fails 4 of 4 (tables missing, dispatch still uses the inline tuple). This is a refactor, so the red is structural: the new test pins the sorted one-entry-per-line tables. The existing runner tests (68) still pass with the old runner, as expected for a no-behaviour-change refactor. Green at head: tables 4 OK, runner 68 OK, paths 21 OK, build_runtime_fallback 10 OK; semantic suite 487 files, 6279 tests, 0 files failed (1043 s, 4 jobs). Green merged into main: NOT RUNNABLE. `git merge pr-1726` into main b6bf3aa0b conflicts in scripts/run_gpu_tests.py (2 hunks, the inline cs_dump tuples that the PR replaces were edited on main by later PRs); GitHub also reports CONFLICTING (needs rebase). Plain main for reference: test_run_gpu_tests.py 75 OK, paths 23 OK, tables test fails on main as expected (no tables there). Pre-existing on plain main, unrelated to this PR: tests/test_build_runtime_fallback.py fails 1 test (test_the_loader_gets_the_stack_reserve_cmake_gives_it, a CMake regex about /STACK). It passes at the PR head only because the PR's base predates the CMake change. So: green at head, red verified (structural), needs a rebase on main before a merged run is possible. Machine: Windows 11 Pro 10.0.26300, CPython 3.13.12, GPU not used.
OreoFR commented 2026-11-29 08:33:48 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T08:33:48Z.


@TanmaySatyam this PR now conflicts with main (scripts/run_gpu_tests.py). Could you merge main into your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/1726#issuecomment-7250771073. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7253185200 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1726#issuecomment-7253185200). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T08:33:48Z. --- @TanmaySatyam this PR now conflicts with `main` (`scripts/run_gpu_tests.py`). Could you merge `main` into your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/1726#issuecomment-7250771073. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)
OreoFR commented 2026-11-30 13:24:51 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-30T13:24:51Z.


Carried as #2718 because of the conflict with main after #2566; @TanmaySatyam, if you come back, say so and the carry is dropped.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7279809472 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1726#issuecomment-7279809472). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T13:24:51Z. --- Carried as #2718 because of the conflict with main after #2566; @TanmaySatyam, if you come back, say so and the carry is dropped.
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!1726
No description provided.