rdna2spirv: decode gfx1013 VOP3 0x16b opcode #278

Merged
kotekompotek merged 1 commit from upstream-pr/278 into main 2026-12-01 22:50:41 +00:00
kotekompotek commented 2026-11-24 02:57:52 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T02:57:52Z.


Claimed in the coordination issue as: BUILD-1529 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149)

What and why

  • Rebased onto current main.
  • Added gfx1013 VOP3 opcode 0x16b (v_mul_lo_i32) to tools/rdna2_isa_tables.py and docs/isa_coverage.md (table + text), updated "seven" -> "eight" in tools/rdna2_isa_tables.py and tools/rdna2_decode.py, and noted decoder coverage in docs/design.md.
  • Added decode unit test test_vop3_0x16b_v_mul_lo_i32 in tests/test_rdna2_decode.py.

Tested

  • python -I tests/test_rdna2_decode.py: 20 tests OK, 1 skipped (llvm-mc is absent).
  • python -I tests/test_isa_coverage.py: 22 tests OK, 4 skipped.
  • tests/test_docs_*.py: OK.

GPUs tested: n/a

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465230613 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/278). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T02:57:52Z. --- Claimed in the coordination issue as: BUILD-1529 (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149) ### What and why - Rebased onto current `main`. - Added gfx1013 VOP3 opcode `0x16b` (`v_mul_lo_i32`) to `tools/rdna2_isa_tables.py` and `docs/isa_coverage.md` (table + text), updated `"seven"` -> `"eight"` in `tools/rdna2_isa_tables.py` and `tools/rdna2_decode.py`, and noted decoder coverage in `docs/design.md`. - Added decode unit test `test_vop3_0x16b_v_mul_lo_i32` in `tests/test_rdna2_decode.py`. ### Tested - `python -I tests/test_rdna2_decode.py`: `20 tests OK, 1 skipped` (`llvm-mc` is absent). - `python -I tests/test_isa_coverage.py`: `22 tests OK, 4 skipped`. - `tests/test_docs_*.py`: `OK`. GPUs tested: n/a AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
Oliwettoo commented 2026-11-24 10:25:35 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Oliwettoo on 2026-11-24T10:25:35Z.


Checked on current main (the PR applies cleanly; the test_rdna2_decode failure on the PR's own base is from the old base, not this change). The opcode is right: LLVM 18 llvm-mc decodes 00006bd5 01050200 as v_mul_lo_i32 v0, v1, v2 for -mcpu=gfx1013 and rejects it for gfx1030, matching docs/design.md's gfx1013-only list.

Before merge: (1) docs/isa_coverage.md says a name added to rdna2_isa_tables.py "belongs in the table above as well", so add v_mul_lo_i32 there; (2) the docstrings of rdna2_isa_tables.py and rdna2_decode.py still say "seven" gfx1013 instructions; (3) one decode assertion for VOP3 0x16b in tests/test_rdna2_decode.py. Also there is no claim for this in #14. AI-assisted review.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7128764543 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/278#issuecomment-7128764543). Originally posted by [Oliwettoo](https://github.com/Oliwettoo) on 2026-11-24T10:25:35Z. --- Checked on current `main` (the PR applies cleanly; the `test_rdna2_decode` failure on the PR's own base is from the old base, not this change). The opcode is right: LLVM 18 `llvm-mc` decodes `00006bd5 01050200` as `v_mul_lo_i32 v0, v1, v2` for `-mcpu=gfx1013` and rejects it for `gfx1030`, matching `docs/design.md`'s gfx1013-only list. Before merge: (1) `docs/isa_coverage.md` says a name added to `rdna2_isa_tables.py` "belongs in the table above as well", so add `v_mul_lo_i32` there; (2) the docstrings of `rdna2_isa_tables.py` and `rdna2_decode.py` still say "seven" gfx1013 instructions; (3) one decode assertion for VOP3 0x16b in `tests/test_rdna2_decode.py`. Also there is no claim for this in #14. AI-assisted review.
kotekompotek commented 2026-11-24 18:03:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-24T18:03:12Z.


@Oliwettoo Thanks for the review — addressed all points in 41d0d162e:

Re-ran locally:

  • python -I tests/test_rdna2_decode.py: 20 tests OK, 1 skipped (llvm-mc absent)
  • python -I tests/test_isa_coverage.py: 22 tests OK, 4 skipped
  • tests/test_docs_*.py: OK
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7140087954 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/278#issuecomment-7140087954). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-24T18:03:12Z. --- @Oliwettoo Thanks for the review — addressed all points in `41d0d162e`: - Added `v_mul_lo_i32` (`VOP3 0x16b`) to `docs/isa_coverage.md` (both the table and text). - Updated `"seven"` -> `"eight"` in `tools/rdna2_isa_tables.py` and `tools/rdna2_decode.py`. - Kept the `test_vop3_0x16b_v_mul_lo_i32` decode assertion in `tests/test_rdna2_decode.py`. - Claimed `BUILD-1529` in coordination issue `#14`: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7140050149 Re-ran locally: - `python -I tests/test_rdna2_decode.py`: `20 tests OK, 1 skipped` (`llvm-mc` absent) - `python -I tests/test_isa_coverage.py`: `22 tests OK, 4 skipped` - `tests/test_docs_*.py`: `OK`
kotekompotek commented 2026-11-25 07:45:12 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by kotekompotek on 2026-11-25T07:45:12Z.


Rebased on current ubi/main (3f81d46ac) and pushed. Conflicts resolved against the newer main changes; test suite for the touched area passes locally (xs_proxy_mock_test PASS on Windows; the int64-atomics semantic tests 6/6 and test_rdna2_decode 21/21 where applicable).

AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7156212755 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/278#issuecomment-7156212755). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T07:45:12Z. --- Rebased on current ubi/main (3f81d46ac) and pushed. Conflicts resolved against the newer main changes; test suite for the touched area passes locally (xs_proxy_mock_test PASS on Windows; the int64-atomics semantic tests 6/6 and test_rdna2_decode 21/21 where applicable). AI-assisted: yes
MoonEyes commented 2026-11-28 02:53:25 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-28T02:53:25Z.


Hi @kotekompotek, thanks for this pull request. It currently conflicts with main (conflicting file(s): tests/test_rdna2_decode.py), so it carries the needs rebase label. CONTRIBUTING.md asks authors to rebase their branch on main; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7232658929 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/278#issuecomment-7232658929). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-28T02:53:25Z. --- Hi @kotekompotek, thanks for this pull request. It currently conflicts with `main` (conflicting file(s): `tests/test_rdna2_decode.py`), so it carries the `needs rebase` label. CONTRIBUTING.md asks authors to rebase their branch on `main`; once it merges cleanly the label goes within the hour, and reviews start with the pull requests that do. Could you update the branch when you have a moment? If you no longer plan to continue with it, please say so here. AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 11:44:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:44:22Z.

Review: CHANGES_REQUESTED


The gfx1013 VOP3 0x16b (v_mul_lo_i32) decoder addition in tools/rdna2_isa_tables.py and docs/isa_coverage.md looks solid, but this PR cannot land yet:

  • Merge conflict with main in tests/test_rdna2_decode.py.
  • Failing CI (translator-tests, stdlib-tests-linux, linux-gpu-tools, windows, macos, macos-python).

Please rebase onto current main and ensure CI is green.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130562024 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/278#pullrequestreview-6130562024). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:44:22Z. **Review:** CHANGES_REQUESTED --- The gfx1013 `VOP3 0x16b` (`v_mul_lo_i32`) decoder addition in `tools/rdna2_isa_tables.py` and `docs/isa_coverage.md` looks solid, but this PR cannot land yet: - **Merge conflict** with `main` in `tests/test_rdna2_decode.py`. - **Failing CI** (`translator-tests`, `stdlib-tests-linux`, `linux-gpu-tools`, `windows`, `macos`, `macos-python`). Please rebase onto current `main` and ensure CI is green. *(AI-assisted review.)*
MoonEyes commented 2026-12-01 22:13:34 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-12-01T22:13:34Z.


This PR has not moved since 25 November and conflicts with main (both sides appended a test in tests/test_rdna2_decode.py). I opened #2973, which is main merged with this head: your commits are kept, both tests are kept. This PR stays open until a maintainer decides. If you rebase it yourself, say so and I will close #2973.

AI-assisted (Claude Code)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7327451027 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/278#issuecomment-7327451027). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-12-01T22:13:34Z. --- This PR has not moved since 25 November and conflicts with `main` (both sides appended a test in `tests/test_rdna2_decode.py`). I opened #2973, which is `main` merged with this head: your commits are kept, both tests are kept. This PR stays open until a maintainer decides. If you rebase it yourself, say so and I will close #2973. 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!278
No description provided.