shader_ir: the docstring gives "invalid" as a count, which is what parse_file returns #91

Closed
Andretuta wants to merge 1 commit from upstream-pr/91 into main
Andretuta commented 2026-11-24 02:16:05 +00:00 (Migrated from github.com)

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


Carried over from old PR 9820 by KoLolX3 in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9820, 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.
KoLolX3: 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):

The module docstring of tools/shader_ir.py says parse_file(path) returns "invalid": [pc...], a list of PCs. parse_file actually stores tail.count("invalid instruction encoding"), an integer, and every caller treats it as one (tests/test_rdna2_decode.py compares it with 0 nine times). Docstring only; no behaviour change.

Tested: tests/test_rdna2_decode.py gives the same result with and without the change (15 passed; the one failure, test_parity_with_llvm_mc_on_shader_fixtures, fails identically on main on this machine).

Found by a local qwen3.8 review pass over tools/, checked by hand. AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5464805620 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/91). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:16:05Z. --- > Carried over from **old PR 9820** by `KoLolX3` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9820`, 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. > `KoLolX3`: 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): The module docstring of `tools/shader_ir.py` says `parse_file(path)` returns `"invalid": [pc...]`, a list of PCs. `parse_file` actually stores `tail.count("invalid instruction encoding")`, an integer, and every caller treats it as one (`tests/test_rdna2_decode.py` compares it with `0` nine times). Docstring only; no behaviour change. Tested: `tests/test_rdna2_decode.py` gives the same result with and without the change (15 passed; the one failure, `test_parity_with_llvm_mc_on_shader_fixtures`, fails identically on `main` on this machine). Found by a local qwen3.8 review pass over `tools/`, checked by hand. AI-assisted (Claude Code).
KoLolX3 commented 2026-11-24 04:01:45 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by KoLolX3 on 2026-11-24T04:01:45Z.


Author here: taken over in #365, rebased on main ece4ba5b3 and re-tested (RX 7900 XT, RADV). This draft can be closed in its favour.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7121640072 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/91#issuecomment-7121640072). Originally posted by [KoLolX3](https://github.com/KoLolX3) on 2026-11-24T04:01:45Z. --- Author here: taken over in #365, rebased on `main` `ece4ba5b3` and re-tested (RX 7900 XT, RADV). This draft can be closed in its favour.
aslan2142 commented 2026-11-24 19:17:56 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-24T19:17:56Z.


This carry-over of old upstream PR 9820 has been taken over in #365, so I'm closing this draft as #17 describes. The branch old-pr/9820 stays.

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7141891944 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/91#issuecomment-7141891944). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-24T19:17:56Z. --- This carry-over of old upstream PR 9820 has been taken over in #365, so I'm closing this draft as #17 describes. The branch `old-pr/9820` stays. AI-assisted (Claude Code, Claude Opus 5.5).

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