rdna2spirv: intra-block %vgpr/%sgpr value forwarding (resubmission of #4518) #309

Closed
Andretuta wants to merge 6 commits from upstream-pr/309 into main
Andretuta commented 2026-11-24 03:05:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T03:05:54Z.


Carried over from old PR 10044 by SweatierKey in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/10044, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
SweatierKey: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Clean resubmission of #4518 (closed during the bulk PR sweep at 22:48Z). Zero overlapping open PRs.

Summary

  • Adds intra-block SSA value forwarding for %vgpr/%sgpr loads in tools/rdna2spirv.py to eliminate redundant OpLoads from local register arrays within basic blocks (cutting cold pipeline compilation overhead).
  • Adds tests/semantic/test_reg_load_forwarding.py and updates affected semantic/translator tests.

Prior independent verifications on #4518 (5254b20ee)

  • Proposed as merge: ready by @pyotrkk during #8919 triage (#4518#issuecomment-7113082763).
  • Independently GPU-checked by @thiefyzheng on RX 7900 XTX (RADV NAVI31, Mesa 25.2.8.2): 222/240 passed, 17 skipped (single FAIL cs_w32_salu64 reproduces identically on plain main, #4518#issuecomment-7116790353).
  • Earlier cold-pipeline measurements on Linux Mesa 26.1.6 RADV by @ligmaSec.

Verification on current origin/main (de4c37383)

  • Clean merge onto origin/main@de4c37383 (git merge-tree --write-tree clean, git diff --check clean, scripts/check_no_game_data.py exit 0).
  • Linux x86-64 (CPython 3.13, stdlib semantic suites): test_reg_load_forwarding.py 7/7 OK, test_buffer_oob_select.py 36/36 OK, test_buffer_swizzle.py 9/9 OK, test_image_sample_bias_nonps.py 5/5 (2 skipped), test_sample_c.py 7/7 (1 skipped), test_sample_cl.py 9/9 (1 skipped).
  • pytest-based suites (test_cube_sample.py, test_translate.py, etc.) and GPU suite: not re-run on this host.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465310946 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/309). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T03:05:54Z. --- > Carried over from **old PR 10044** by `SweatierKey` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/10044`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `SweatierKey`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Clean resubmission of `#4518` (closed during the bulk PR sweep at `22:48Z`). Zero overlapping open PRs. ### Summary - Adds intra-block SSA value forwarding for `%vgpr`/`%sgpr` loads in `tools/rdna2spirv.py` to eliminate redundant `OpLoad`s from local register arrays within basic blocks (cutting cold pipeline compilation overhead). - Adds `tests/semantic/test_reg_load_forwarding.py` and updates affected semantic/translator tests. ### Prior independent verifications on `#4518` (`5254b20ee`) - Proposed as `merge: ready` by `@pyotrkk` during `#8919` triage (`#4518`#issuecomment-7113082763). - Independently GPU-checked by `@thiefyzheng` on RX 7900 XTX (RADV NAVI31, Mesa 25.2.8.2): **222/240 passed, 17 skipped** (single FAIL `cs_w32_salu64` reproduces identically on plain `main`, `#4518`#issuecomment-7116790353). - Earlier cold-pipeline measurements on Linux Mesa 26.1.6 RADV by `@ligmaSec`. ### Verification on current `origin/main` (`de4c37383`) - Clean merge onto `origin/main@de4c37383` (`git merge-tree --write-tree` clean, `git diff --check` clean, `scripts/check_no_game_data.py` exit 0). - Linux x86-64 (CPython 3.13, stdlib semantic suites): `test_reg_load_forwarding.py` 7/7 OK, `test_buffer_oob_select.py` 36/36 OK, `test_buffer_swizzle.py` 9/9 OK, `test_image_sample_bias_nonps.py` 5/5 (2 skipped), `test_sample_c.py` 7/7 (1 skipped), `test_sample_cl.py` 9/9 (1 skipped). - pytest-based suites (`test_cube_sample.py`, `test_translate.py`, etc.) and GPU suite: not re-run on this host.
OreoFR commented 2026-11-29 17:01:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T17:01:38Z.


@SweatierKey this carried-over PR (your old PR 10044) now conflicts with main (tools/rdna2spirv.py, tests/test_rcp_iflag_mods.py). Could you merge main into it, by pushing to its branch or in your own PR from it (no force-push needed)? 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:7259361764 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/309#issuecomment-7259361764). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T17:01:38Z. --- @SweatierKey this carried-over PR (your old PR 10044) now conflicts with `main` (`tools/rdna2spirv.py`, `tests/test_rcp_iflag_mods.py`). Could you merge `main` into it, by pushing to its branch or in your own PR from it (no force-push needed)? 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)
MoonEyes commented 2026-11-30 13:58:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-30T13:58:49Z.


Closing this draft as superseded by #1652 (open, by Tortoche): compared line by line, 0 of the 365 lines this head (5254b20ee) adds are missing there, in the same files. Nothing here is judged wrong, and a conflict is not the reason. Please reopen it if #1652 does not land or leaves something out.

AI-assisted (Claude Code). Closed at the owner's request (MoonEyes), superseded pull requests being fine to close (aslan2142).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7280651402 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/309#issuecomment-7280651402). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-30T13:58:49Z. --- Closing this draft as superseded by #1652 (open, by Tortoche): compared line by line, 0 of the 365 lines this head (`5254b20ee`) adds are missing there, in the same files. Nothing here is judged wrong, and a conflict is not the reason. Please reopen it if #1652 does not land or leaves something out. AI-assisted (Claude Code). Closed at the owner's request (MoonEyes), superseded pull requests being fine to close (aslan2142).

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!309
No description provided.