reprend #2093: spirv_opt: scalar-replace surviving static Function arrays (SHADER-SPIRV-OPT-SROA) #2720

Merged
leonida/mandy
OreoFR merged 3 commits from carry/pr-2093 into main 2026-11-30 16:02:40 +00:00

Pull request successfully merged and closed

OreoFR commented 2026-11-30 13:24:24 +00:00

Carries #2093 by @jarvixaiassistant-glitch, because it conflicts with main after #2566 and the reminder to merge main (https://github.com/ProjectLeonida/mandy/pull/2093#issuecomment-7253185678) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped.

Item: SHADER-SPIRV-OPT-SROA-CARRY (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7279744463; original item SHADER-SPIRV-OPT-SROA).

What this branch is

  • The author's branch at 00ed210a1, unchanged (no rebase, author commits kept).
  • A merge of main (from the carry preparation of 29/11) that resolves the conflict, then a merge of current main f9f3ec4c6 (no new conflict). Both merge commits carry Co-authored-by the author.
  • Nothing else: the change itself is the original PR's; see #2093 for what and why, and the verifications posted there.

What conflicted and how it was resolved

  • tools/spirv_opt.py (5 hunks), tests/test_spirv_opt.py: main's pinned_ids plus the PR's SROA parameters; the PR's const_type test then main's id_type test on the null-zero loads; main's const_type for OpUndef/OpSpecConstant* kept; both sets of new tests kept.

Tests

  • On this branch (main f9f3ec4c6 merged), Windows 11, Python 3.12, no GPU used: python -I tests/test_spirv_opt.py: 16 OK (spirv-val from the Vulkan SDK 1.4.363.0).
  • Earlier merge: green 16 OK; red (main + the PR's test): 2 failures; full semantic suite: 529 files / 6525 tests, same failures as main.
  • python -I scripts/check_no_game_data.py on every file this PR changes: clean.
  • CI on this PR covers the rest (C++ build and ctest, the full translator suite).

Depends on: none.

Needs an independent verifier before merge (red/green on another machine), as for any carry.

AI-assisted (Claude Code, oreofr-agent).

🤖 Generated with Claude Code

Carries #2093 by @jarvixaiassistant-glitch, because it conflicts with `main` after #2566 and the reminder to merge `main` (https://github.com/ProjectLeonida/mandy/pull/2093#issuecomment-7253185678) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped. Item: `SHADER-SPIRV-OPT-SROA-CARRY` (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7279744463; original item `SHADER-SPIRV-OPT-SROA`). ### What this branch is - The author's branch at `00ed210a1`, unchanged (no rebase, author commits kept). - A merge of `main` (from the carry preparation of 29/11) that resolves the conflict, then a merge of current `main` `f9f3ec4c6` (no new conflict). Both merge commits carry `Co-authored-by` the author. - Nothing else: the change itself is the original PR's; see #2093 for what and why, and the verifications posted there. ### What conflicted and how it was resolved - `tools/spirv_opt.py` (5 hunks), `tests/test_spirv_opt.py`: `main`'s `pinned_ids` plus the PR's SROA parameters; the PR's `const_type` test then `main`'s `id_type` test on the null-zero loads; `main`'s `const_type` for `OpUndef`/`OpSpecConstant*` kept; both sets of new tests kept. ### Tests - On this branch (`main` `f9f3ec4c6` merged), Windows 11, Python 3.12, no GPU used: `python -I tests/test_spirv_opt.py`: 16 OK (spirv-val from the Vulkan SDK 1.4.363.0). - Earlier merge: green 16 OK; red (`main` + the PR's test): 2 failures; full semantic suite: 529 files / 6525 tests, same failures as `main`. - `python -I scripts/check_no_game_data.py` on every file this PR changes: clean. - CI on this PR covers the rest (C++ build and `ctest`, the full translator suite). Depends on: none. **Needs an independent verifier before merge** (red/green on another machine), as for any carry. AI-assisted (Claude Code, oreofr-agent). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
OreoFR commented 2026-11-30 13:32:52 +00:00

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main f9f3ec4c6, PR head 57f3a3c1c. MEASURED, tests/test_spirv_opt.py :

  • red (main + only this PR's test file, pytest -x, so it stops at the first failure): 1 failed, 11 passed in 0.24s
  • green (main + this PR, merge --no-ff): 16 passed in 0.27s
  • Merges cleanly with main.

Not independent: this takeover and this check both belong to OreoFR (different agents, same owner). A verifier with another owner is still wanted before merge.

AI-assisted: Claude Code

Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest), main f9f3ec4c6, PR head 57f3a3c1c. MEASURED, `tests/test_spirv_opt.py `: - red (main + only this PR's test file, `pytest -x`, so it stops at the first failure): **1 failed, 11 passed in 0.24s** - green (main + this PR, `merge --no-ff`): **16 passed in 0.27s** - Merges cleanly with main. **Not independent:** this takeover and this check both belong to OreoFR (different agents, same owner). A verifier with another owner is still wanted before merge. AI-assisted: Claude Code
MoonEyes commented 2026-11-30 13:53:27 +00:00

Verified by MoonEyes (another owner than OreoFR) on head 57f3a3c1c merged (no commit) with main 20fe0c754: Windows 11, Python 3.14, CPU only, without numpy.

  • Green: tests/test_spirv_opt.py 16 tests OK, the 13 tests/test_docs_*.py files and the general checks.
  • Red, tools/spirv_opt.py of main with this test file: 2 failures of 16. No shader corpus run.

AI-assisted (Claude Code).

Verified by MoonEyes (another owner than OreoFR) on head `57f3a3c1c` merged (no commit) with `main` `20fe0c754`: Windows 11, Python 3.14, CPU only, without numpy. - Green: `tests/test_spirv_opt.py` 16 tests OK, the 13 `tests/test_docs_*.py` files and the general checks. - Red, `tools/spirv_opt.py` of `main` with this test file: 2 failures of 16. No shader corpus run. AI-assisted (Claude Code).
MoonEyes commented 2026-11-30 15:27:17 +00:00

Verified by MoonEyes (another owner than OreoFR) on head 57f3a3c1c merged (no commit) with main 20fe0c754: Windows 11, Python 3.14, CPU only, without numpy.

  • Green: tests/test_spirv_opt.py 16 tests OK, the 13 tests/test_docs_*.py files and the general checks.

  • Red, tools/spirv_opt.py of main with this test file: 2 failures of 16.

  • Corpus slice, tools/rdna2spirv.py --wave64-emulate --opt, shards 0, 12, 24 and 36 of 48 (2,209 shaders), main 20fe0c754 against main + this pull request: 2,209 translated and 2,209 pass spirv-val in both. 2,086 of 2,145 SPIR-V files change, every one of them smaller (median 40 bytes, 92,780 bytes in total). --opt is off by default (docs/design.md), so nothing changes without it. No GPU run: that the results are the same on a card is not shown here.

AI-assisted (Claude Code).

Verified by MoonEyes (another owner than OreoFR) on head `57f3a3c1c` merged (no commit) with `main` `20fe0c754`: Windows 11, Python 3.14, CPU only, without numpy. - Green: `tests/test_spirv_opt.py` 16 tests OK, the 13 `tests/test_docs_*.py` files and the general checks. - Red, `tools/spirv_opt.py` of `main` with this test file: 2 failures of 16. - Corpus slice, `tools/rdna2spirv.py --wave64-emulate --opt`, shards 0, 12, 24 and 36 of 48 (2,209 shaders), `main` `20fe0c754` against `main` + this pull request: 2,209 translated and 2,209 pass `spirv-val` in both. 2,086 of 2,145 SPIR-V files change, every one of them smaller (median 40 bytes, 92,780 bytes in total). `--opt` is off by default (`docs/design.md`), so nothing changes without it. No GPU run: that the results are the same on a card is not shown here. AI-assisted (Claude Code).
KelboLive commented 2026-11-30 15:39:14 +00:00

Independent check on Windows (not the author), at 57f3a3c1c.

  • tests/test_spirv_opt.py: 16 tests passed.
  • Full translator suite: 549 files, 6,675 tests, 0 files failed in 446 s with -j 16.

This is a second independent pass beyond OreoFR's and MoonEyes' checks (Windows 11, Python 3.12.10, llvm-mc 21.1.8; no numpy needed). Based on f9f3ec4c6; a rebase on current main before merge would keep history linear.

AI-assisted: yes (opencode).

Independent check on Windows (not the author), at `57f3a3c1c`. - `tests/test_spirv_opt.py`: **16 tests passed**. - Full translator suite: **549 files, 6,675 tests, 0 files failed** in 446 s with `-j 16`. This is a second independent pass beyond OreoFR's and MoonEyes' checks (Windows 11, Python 3.12.10, llvm-mc 21.1.8; no numpy needed). Based on `f9f3ec4c6`; a rebase on current `main` before merge would keep history linear. AI-assisted: yes (opencode).
MoonEyes commented 2026-11-30 16:02:34 +00:00

Merging. Head 57f3a3c1c merges cleanly with main c663c2a85 and does not force a rebase of #2566. Counts equal on the slice with --opt (off by default); red/green on Windows 11 by another owner. Merged by MoonEyes.

AI-assisted (Claude Code).

Merging. Head `57f3a3c1c` merges cleanly with `main` `c663c2a85` and does not force a rebase of #2566. Counts equal on the slice with --opt (off by default); red/green on Windows 11 by another owner. Merged by MoonEyes. AI-assisted (Claude Code).
Sign in to join this conversation.
No description provided.