reprend #65: rdna2spirv: translate FLAT loads and stores as global accesses #2728

Merged
OreoFR merged 4 commits from upstream-pr/2728 into main 2026-11-30 16:24:23 +00:00
OreoFR commented 2026-11-30 13:38:23 +00:00 (Migrated from github.com)

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


Carries #65 by @Andretuta (opened for @tiagonogueiraa-bit: the carried-over old PR 9790, branch ProjectLeonida:old-pr/9790), because it conflicts with main after #2566 and the reminder to merge main (https://github.com/ProjectLeonida/mandy/pull/65#issuecomment-7259362882) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped.

Item: OLD-9790-CARRY (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7280119323; original item OLD-9790).

What this branch is

  • The author's branch at fbe718a46, 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 #65 for what and why, and the verifications posted there.

What conflicted and how it was resolved

  • tools/rdna2spirv.py: main's DST_ALSO_READ kept, with the PR's flat_load_ prefix added.
  • docs/design.md: main's 8/16-bit row, then the PR's "Flat memory" row.

Tests

  • On this branch (main f9f3ec4c6 merged), Windows 11, Python 3.12, no GPU used: tests/semantic/test_flat_mem.py: 12 OK; tests/test_design_contract_rows.py and tests/test_docs_design_rows.py: OK.
  • Earlier merge: green 12 OK; red (main + the PR's test): 2 failures, 36 errors; full semantic suite 530 files / 6538 tests, same failure 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

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5566373482 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2728). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T13:38:23Z. --- Carries #65 by @Andretuta (opened for @tiagonogueiraa-bit: the carried-over old PR 9790, branch `ProjectLeonida:old-pr/9790`), because it conflicts with `main` after #2566 and the reminder to merge `main` (https://github.com/ProjectLeonida/mandy/pull/65#issuecomment-7259362882) got no answer within the delay of the carry rule. If the author comes back, this carry is dropped. Item: `OLD-9790-CARRY` (claimed in https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7280119323; original item `OLD-9790`). ### What this branch is - The author's branch at `fbe718a46`, 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 #65 for what and why, and the verifications posted there. ### What conflicted and how it was resolved - `tools/rdna2spirv.py`: `main`'s `DST_ALSO_READ` kept, with the PR's `flat_load_` prefix added. - `docs/design.md`: `main`'s 8/16-bit row, then the PR's "Flat memory" row. ### Tests - On this branch (`main` `f9f3ec4c6` merged), Windows 11, Python 3.12, no GPU used: `tests/semantic/test_flat_mem.py`: 12 OK; `tests/test_design_contract_rows.py` and `tests/test_docs_design_rows.py`: OK. - Earlier merge: green 12 OK; red (`main` + the PR's test): 2 failures, 36 errors; full semantic suite 530 files / 6538 tests, same failure 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:46:10 +00:00 (Migrated from github.com)

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


Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest, no GPU), main f9f3ec4c6.

  • MEASURED, red (main + only this PR's tests): tests/semantic/test_flat_mem.py: 6 failed, 2 passed.
  • MEASURED, green (main + merge --no-ff of 5b34dc36f): 12 passed, 37 subtests passed.
  • Not covered: the C++ build, ctest and the rest of the suite (CI).

Not independent: this PR and this check share the same owner (OreoFR). Treat it as a second-machine run, not an independent review.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7280328277 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2728#issuecomment-7280328277). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-30T13:46:10Z. --- Verified by OreoFR on macOS 27.2.1, Apple M5, Python 3.12.16 (pytest, no GPU), `main` `f9f3ec4c6`. - MEASURED, red (`main` + only this PR's tests): `tests/semantic/test_flat_mem.py`: 6 failed, 2 passed. - MEASURED, green (`main` + `merge --no-ff` of `5b34dc36f`): 12 passed, 37 subtests passed. - Not covered: the C++ build, `ctest` and the rest of the suite (CI). **Not independent:** this PR and this check share the same owner (OreoFR). Treat it as a second-machine run, not an independent review. AI-assisted: Claude Code
KelboLive commented 2026-11-30 14:25:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KelboLive on 2026-11-30T14:25:38Z.


Independent check on Windows/NVIDIA (not the author), at 5b34dc36f.

  • tests/semantic/test_flat_mem.py: 12 passed.
  • Related: test_interp_mov_flat.py 21 passed, test_buffer_offset_wrap.py 4 passed.
  • Full translator suite on this branch: 550 files, 6,687 tests, 0 files failed (391 s, 32 jobs).

Machine: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711, Python 3.12.10, llvm-mc 21.1.8.

No FLAT fixture exists in runtime/test/shaders, so this is CPU/interpreter coverage only, as the PR's docs row says (Not GPU-verified). No regressions seen. The branch is based on f9f3ec4c6 and still merges cleanly; a rebase on current main before merge would keep the history linear.

AI-assisted: yes (opencode).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7281354945 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2728#issuecomment-7281354945). Originally posted by [KelboLive](https://github.com/KelboLive) on 2026-11-30T14:25:38Z. --- Independent check on Windows/NVIDIA (not the author), at `5b34dc36f`. - `tests/semantic/test_flat_mem.py`: **12 passed**. - Related: `test_interp_mov_flat.py` 21 passed, `test_buffer_offset_wrap.py` 4 passed. - Full translator suite on this branch: **550 files, 6,687 tests, 0 files failed** (391 s, 32 jobs). Machine: NVIDIA RTX 4070 Ti SUPER, driver 621.01 (Windows 32.0.16.2101), Windows 11 Pro 10.0.26200.9711, Python 3.12.10, llvm-mc 21.1.8. No FLAT fixture exists in `runtime/test/shaders`, so this is CPU/interpreter coverage only, as the PR's docs row says (`Not GPU-verified`). No regressions seen. The branch is based on `f9f3ec4c6` and still merges cleanly; a rebase on current `main` before merge would keep the history linear. AI-assisted: yes (opencode).
MoonEyes commented 2026-11-30 16:22:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:22:15Z.


Verified by MoonEyes (another owner than OreoFR) on head 5b34dc36f: Windows 11, Python 3.14, no LLVM, no GPU run.

  • Red/green on main b17b22d33: tests/semantic/test_flat_mem.py 12 OK; without the change 2 failures and 36 errors.
  • Corpus slice, tools/rdna2spirv.py --wave64-emulate, 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; the SPIR-V is byte-identical (this slice holds no shader that shows the change).

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284555334 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2728#issuecomment-7284555334). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T16:22:15Z. --- Verified by MoonEyes (another owner than OreoFR) on head `5b34dc36f`: Windows 11, Python 3.14, no LLVM, no GPU run. - Red/green on `main` `b17b22d33`: `tests/semantic/test_flat_mem.py` 12 OK; without the change 2 failures and 36 errors. - Corpus slice, `tools/rdna2spirv.py --wave64-emulate`, 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; the SPIR-V is byte-identical (this slice holds no shader that shows the change). AI-assisted (Claude Code).
MoonEyes commented 2026-11-30 16:24:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T16:24:19Z.


Merging. Head 5b34dc36f merges cleanly with main 35e75b7a9 and does not force a rebase of #2566. Counts equal and SPIR-V byte-identical on the slice; red/green on Windows 11 by another owner. Merged by MoonEyes.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7284610468 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/2728#issuecomment-7284610468). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T16:24:19Z. --- Merging. Head `5b34dc36f` merges cleanly with `main` `35e75b7a9` and does not force a rebase of #2566. Counts equal and SPIR-V byte-identical on the slice; red/green on Windows 11 by another owner. Merged by MoonEyes. AI-assisted (Claude Code).
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!2728
No description provided.