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

Open
github-bot wants to merge 6 commits from github-bot/gh-309 into main AGit
Owner

@⁠Andretuta on GitHub · 2026-11-24 03:05 UTC · original
ubiquitarianism:old-pr/10044 → main · +461 −60 · 12 files · 6 commits · draft

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.
**@⁠Andretuta** on GitHub · 2026-11-24 03:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/309) `ubiquitarianism:old-pr/10044` → `main` · +461 −60 · 12 files · 6 commits · draft > 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:52:50 +00:00
This pull request has changes conflicting with the target branch.
  • tools/rdna2spirv.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/309/head:github-bot/gh-309'
git switch 'github-bot/gh-309'

Merge

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