rdna2spirv: emit OpBitFieldUExtract for the VOP3 16-bit result mask (NVIDIA And-&-0xFFFF miscompile) #1585

Merged
whoalin1 merged 5 commits from upstream-pr/1585 into main 2026-12-01 11:30:36 +00:00
whoalin1 commented 2026-11-25 05:12:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T05:12:19Z.


Finding from the overnight fuzz campaign (coordination issue #14 — the issue's comment thread is currently at its cap, so context lives here): on NVIDIA'''s shader compiler, OpBitwiseAnd %uint X, 0xFFFF miscompiles when X is a value that passed through %int-typed ops and the result feeds a preserve-high-half merge (old & 0xFFFF0000) | lo — the kept high half comes out corrupted while the low half is fine. Measured on an RTX 4070 SUPER (Windows, wave32): v_add_nc_i16 v14, v3, v12 op_sel:[1,1,0] clamp wrote 0x1113AAA8 for the correct 0x0002AAA8.

OpBitFieldUExtract %uint X, 0, 16 is spec-identical (zero-extended low 16) and does not trigger the miscompile. This PR emits it at every site where an int-derived value is masked for a preserved-16-bit-half merge:

  • the VOP3 16-bit integer results (v_add/sub_{nc_,}{i16,u16}, the _rev/shift forms, v_mul_lo_u16, v_{min,max}_{u16,i16}, v_mad_{u16,i16}, v_{min,max,med}3_{u16,i16})
  • the signed v_cvt_i16_f16 / v_cvt_norm_i16_f16 conversions (a Bitcast of an %int OpConvertFToS)
  • the signed saturate_int16 feeding d16 image/buffer stores (a Bitcast of an %int SClamp)

The unsigned/unorm siblings, the v_pk_* packed paths, and the f16 put_f16_bits idiom were audited and deliberately left: they either produce %uint-only values or build a packed dword rather than a preserve merge.

Scope note (thanks @ecox982745): because the signed and unsigned conversions share the result-mask helper, the emitted SPIR-V for v_cvt_u16_f16 and v_cvt_norm_u16_f16 also gains one OpBitFieldUExtract each (like their signed siblings), and v_cvt_pk_i16_i32 gains two through the signed saturation helper, one per packed operand. These are the same spec-identical zero-extended-low-16 rewrite at zero cost; ecox982745's independent RTX 4090 sweep of all 65,536 binary16 encodings for each of v_cvt_{i16,u16}_f16 / v_cvt_norm_{i16,u16}_f16 plus 65,536 v_cvt_pk_i16_i32 input pairs found 0 mismatches in 327,680 outputs per revision, with all GPU buffers byte-identical between revisions.

Verification

  • NVIDIA RTX 4070 SUPER (Windows, wave32): the original repro now returns 0x0002AAA8; v_sub_nc_i16 … clamp 0x0002AAAC; 160 randomized v_add/sub_nc_i16 programs across all op_sel/clamp combos — 0 mismatches vs a Python reference. v_cvt_i16_f16/v_cvt_norm_i16_f16 spot checks produce correct results on both old and new SPIR-V (the miscompile did not reproduce on that shape, but the extract removes the risky pattern at zero cost).
  • AMD Radeon iGPU (gfx1036, Windows driver 24.10.24, --pc-tail-ubo, LEONIDA_PC_TAIL_UBO=1): repro, sub-clamp, mad_i16, min3 cases all match NVIDIA/reference — no AMD regression (the op is spec-identical).
  • Semantic suite: python -I scripts/run_semantic_tests.py tests/semantic — 487 files / 6,279 tests, 0 failures. Two tests that pinned the OpBitwiseAnd … 0xFFFF shape were updated to the extract form with their negative controls intact.
  • compileall clean; the changed ops all pass spirv-val.
  • docs/design.md contract-table row for v_add_nc_i16/v_sub_nc_i16 documents the workaround, the trigger shape, and the confirmation method.

Independent review: initial pass found three missed sites of the same idiom (now covered); re-review confirmed the six-site coverage is exhaustive against a full census of And … 0xFFFF emit sites.

AI-assisted (Devin).

Claimed in the coordination issue as: RDNA2SPIRV-VOP3-U16-RESULT-MASK (claim).

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5485579419 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T05:12:19Z. --- Finding from the overnight fuzz campaign (coordination issue #14 — the issue's comment thread is currently at its cap, so context lives here): on NVIDIA'\''s shader compiler, `OpBitwiseAnd %uint X, 0xFFFF` miscompiles when `X` is a value that passed through `%int`-typed ops and the result feeds a preserve-high-half merge `(old & 0xFFFF0000) | lo` — the kept high half comes out corrupted while the low half is fine. Measured on an RTX 4070 SUPER (Windows, wave32): `v_add_nc_i16 v14, v3, v12 op_sel:[1,1,0] clamp` wrote `0x1113AAA8` for the correct `0x0002AAA8`. `OpBitFieldUExtract %uint X, 0, 16` is spec-identical (zero-extended low 16) and does not trigger the miscompile. This PR emits it at every site where an int-derived value is masked for a preserved-16-bit-half merge: - the VOP3 16-bit integer results (`v_add/sub_{nc_,}{i16,u16}`, the `_rev`/shift forms, `v_mul_lo_u16`, `v_{min,max}_{u16,i16}`, `v_mad_{u16,i16}`, `v_{min,max,med}3_{u16,i16}`) - the signed `v_cvt_i16_f16` / `v_cvt_norm_i16_f16` conversions (a `Bitcast` of an `%int` `OpConvertFToS`) - the signed `saturate_int16` feeding d16 image/buffer stores (a `Bitcast` of an `%int` `SClamp`) The unsigned/unorm siblings, the `v_pk_*` packed paths, and the f16 `put_f16_bits` idiom were audited and deliberately left: they either produce `%uint`-only values or build a packed dword rather than a preserve merge. Scope note (thanks @ecox982745): because the signed and unsigned conversions share the result-mask helper, the emitted SPIR-V for `v_cvt_u16_f16` and `v_cvt_norm_u16_f16` also gains one `OpBitFieldUExtract` each (like their signed siblings), and `v_cvt_pk_i16_i32` gains two through the signed saturation helper, one per packed operand. These are the same spec-identical zero-extended-low-16 rewrite at zero cost; ecox982745's independent RTX 4090 sweep of all 65,536 binary16 encodings for each of `v_cvt_{i16,u16}_f16` / `v_cvt_norm_{i16,u16}_f16` plus 65,536 `v_cvt_pk_i16_i32` input pairs found 0 mismatches in 327,680 outputs per revision, with all GPU buffers byte-identical between revisions. ## Verification - NVIDIA RTX 4070 SUPER (Windows, wave32): the original repro now returns `0x0002AAA8`; `v_sub_nc_i16 … clamp` `0x0002AAAC`; 160 randomized `v_add/sub_nc_i16` programs across all `op_sel`/`clamp` combos — **0 mismatches** vs a Python reference. `v_cvt_i16_f16`/`v_cvt_norm_i16_f16` spot checks produce correct results on both old and new SPIR-V (the miscompile did not reproduce on that shape, but the extract removes the risky pattern at zero cost). - AMD Radeon iGPU (gfx1036, Windows driver 24.10.24, `--pc-tail-ubo`, `LEONIDA_PC_TAIL_UBO=1`): repro, sub-clamp, mad_i16, min3 cases all match NVIDIA/reference — no AMD regression (the op is spec-identical). - Semantic suite: `python -I scripts/run_semantic_tests.py tests/semantic` — 487 files / 6,279 tests, 0 failures. Two tests that pinned the `OpBitwiseAnd … 0xFFFF` shape were updated to the extract form with their negative controls intact. - `compileall` clean; the changed ops all pass `spirv-val`. - `docs/design.md` contract-table row for `v_add_nc_i16`/`v_sub_nc_i16` documents the workaround, the trigger shape, and the confirmation method. Independent review: initial pass found three missed sites of the same idiom (now covered); re-review confirmed the six-site coverage is exhaustive against a full census of `And … 0xFFFF` emit sites. AI-assisted (Devin). Claimed in the coordination issue as: RDNA2SPIRV-VOP3-U16-RESULT-MASK ([claim](https://github.com/ProjectLeonida/mandy/issues/2570#issuecomment-7259882352)).
ecox982745 commented 2026-11-25 05:17:19 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-25T05:17:19Z.


Independent RTX 4090 check of the conversion changes in 7f85594b, compared with the preceding PR commit 97535ad1 (Windows, NVIDIA 616.64).

One scope detail for the PR description: the shared result mask also changes the SPIR-V for v_cvt_u16_f16 and v_cvt_norm_u16_f16. Each gains one OpBitFieldUExtract, just like its signed sibling. v_cvt_pk_i16_i32 also gains two through the signed saturation helper, one per packed operand.

I dispatched synthetic wave32 compute shaders with runtime inputs and checked the full 32-bit destination against a CPU reference:

  • All 65,536 binary16 encodings for each of v_cvt_{i16,u16}_f16 and v_cvt_norm_{i16,u16}_f16, writing the low half with a varying previous destination. This checks the converted value and the preserved high half, including NaNs, infinities, subnormals, and both zeros.
  • 65,536 signed input pairs for v_cvt_pk_i16_i32, including in-range values and saturation in each half.

0 mismatches across 327,680 outputs on each revision. All five GPU buffers were byte-identical between revisions, and all ten translated modules passed spirv-val --target-env vulkan1.2. This covers the conversion follow-up. The add/sub driver reproducer is a separate case.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7153626183 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1585#issuecomment-7153626183). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-25T05:17:19Z. --- Independent RTX 4090 check of the conversion changes in `7f85594b`, compared with the preceding PR commit `97535ad1` (Windows, NVIDIA 616.64). One scope detail for the PR description: the shared result mask also changes the SPIR-V for `v_cvt_u16_f16` and `v_cvt_norm_u16_f16`. Each gains one `OpBitFieldUExtract`, just like its signed sibling. `v_cvt_pk_i16_i32` also gains two through the signed saturation helper, one per packed operand. I dispatched synthetic wave32 compute shaders with runtime inputs and checked the full 32-bit destination against a CPU reference: - All 65,536 binary16 encodings for each of `v_cvt_{i16,u16}_f16` and `v_cvt_norm_{i16,u16}_f16`, writing the low half with a varying previous destination. This checks the converted value and the preserved high half, including NaNs, infinities, subnormals, and both zeros. - 65,536 signed input pairs for `v_cvt_pk_i16_i32`, including in-range values and saturation in each half. **0 mismatches across 327,680 outputs on each revision.** All five GPU buffers were byte-identical between revisions, and all ten translated modules passed `spirv-val --target-env vulkan1.2`. This covers the conversion follow-up. The add/sub driver reproducer is a separate case.
QemmHD commented 2026-11-25 18:41:10 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by QemmHD on 2026-11-25T18:41:10Z.


Heads-up from a test run on an RTX 4070 SUPER: the code part looks fine, but merged onto current main this PR fails tests/test_docs_design_rows: a docs/design.md table row has more cells than the table header. Fixing that row should let it pass the consistency set.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7171252182 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1585#issuecomment-7171252182). Originally posted by [QemmHD](https://github.com/QemmHD) on 2026-11-25T18:41:10Z. --- Heads-up from a test run on an RTX 4070 SUPER: the code part looks fine, but merged onto current main this PR fails `tests/test_docs_design_rows`: a `docs/design.md` table row has more cells than the table header. Fixing that row should let it pass the consistency set. AI-assisted (Claude Code, Claude Opus 5.5).
whoalin1 commented 2026-11-25 18:46:18 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T18:46:18Z.


Thanks — fixed in 42ad738a6. The literal pipe in the preserved-half merge example is now escaped, and python -I tests/test_docs_design_rows.py passes locally (5 tests, OK). No code behavior changed.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7171375377 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1585#issuecomment-7171375377). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T18:46:18Z. --- Thanks — fixed in `42ad738a6`. The literal pipe in the preserved-half merge example is now escaped, and `python -I tests/test_docs_design_rows.py` passes locally (5 tests, OK). No code behavior changed.
whoalin1 commented 2026-11-25 20:18:44 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T20:18:44Z.


@QemmHD thanks for the catch. Rebased onto current main (db1a22d29) as 69b363d75; no conflicts. On the rebased tree the contract-table row is well-formed — the \| in the preserved-half merge is escaped exactly as tests/test_docs_design_rows expects, and a scan with the test's own logic over all three pages (design.md, README.md, testing.md) finds no mis-shaped rows and no repeated topics, so the consistency set should now pass on CI. AI-assisted with Devin.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7173481583 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1585#issuecomment-7173481583). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T20:18:44Z. --- @QemmHD thanks for the catch. Rebased onto current main (`db1a22d29`) as `69b363d75`; no conflicts. On the rebased tree the contract-table row is well-formed — the `\|` in the preserved-half merge is escaped exactly as `tests/test_docs_design_rows` expects, and a scan with the test's own logic over all three pages (`design.md`, `README.md`, `testing.md`) finds no mis-shaped rows and no repeated topics, so the consistency set should now pass on CI. AI-assisted with Devin.
whoalin1 commented 2026-11-25 20:51:15 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-25T20:51:15Z.


Useful scope data point from Sangonapou (coordination issue): the high-half corruption does not reproduce on Ampere (RTX 3080 Ti Laptop, 621.24) — 384/384 single-op cases match RDNA2. That is consistent with this PR's evidence, where the miscompile showed on Ada (RTX 4070 SUPER) with the surrounding fuzz-program instructions, and points at an Ada-generation compiler issue rather than something universal. Either way the transform here is bit-identical semantics on every device — OpBitFieldUExtract base 0 count 16 is exactly AND 0xFFFF — so unaffected hardware sees no behavioural change, only a different but equivalent instruction. AI-assisted with Devin.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7174277185 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1585#issuecomment-7174277185). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-25T20:51:15Z. --- Useful scope data point from Sangonapou ([coordination issue](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7173742613)): the high-half corruption does **not** reproduce on Ampere (RTX 3080 Ti Laptop, 621.24) — 384/384 single-op cases match RDNA2. That is consistent with this PR's evidence, where the miscompile showed on Ada (RTX 4070 SUPER) with the surrounding fuzz-program instructions, and points at an Ada-generation compiler issue rather than something universal. Either way the transform here is bit-identical semantics on every device — `OpBitFieldUExtract base 0 count 16` is exactly `AND 0xFFFF` — so unaffected hardware sees no behavioural change, only a different but equivalent instruction. AI-assisted with Devin.
whoalin1 commented 2026-11-26 05:19:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-26T05:19:46Z.


Follow-up verification on the current head 69b363d75 under the local coordination lock: python -I tests/test_docs_design_rows.py passes 5/5 in 0.064 s. The earlier table-shape concern is resolved on the rebased branch.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7183388334 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1585#issuecomment-7183388334). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-26T05:19:46Z. --- Follow-up verification on the current head 69b363d75 under the local coordination lock: `python -I tests/test_docs_design_rows.py` passes 5/5 in 0.064 s. The earlier table-shape concern is resolved on the rebased branch.
MoonEyes commented 2026-11-27 22:43:08 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T22:43:08Z.


Hi @whoalin1, thanks for this pull request.

CONTRIBUTING.md asks contributors to claim their work in the coordination issue ("Coordinating who works on what", currently #1608) before opening a pull request: post claiming: <ID> there, or a one-line description if the item is not listed yet, and put the ID in the pull request. I could not find a claim from you for this one.

The claim matters because "it is claimed in the coordination issue by the pull request's author" is the first item on the maintainers' checklist for a mergeable pull request, and because it lets others see that the work is taken before they write it a second time.

Could you post the claim in #1608 and put its ID (or a link to it) on the pull request's "Claimed in the coordination issue as:" line? If you already claimed it in another form, a link to your comment is enough.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7229560219 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7229560219). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T22:43:08Z. --- Hi @whoalin1, thanks for this pull request. CONTRIBUTING.md asks contributors to claim their work in the coordination issue ("Coordinating who works on what", currently #1608) before opening a pull request: post `claiming: <ID>` there, or a one-line description if the item is not listed yet, and put the ID in the pull request. I could not find a claim from you for this one. The claim matters because "it is claimed in the coordination issue by the pull request's author" is the first item on the maintainers' checklist for a mergeable pull request, and because it lets others see that the work is taken before they write it a second time. Could you post the claim in #1608 and put its ID (or a link to it) on the pull request's "Claimed in the coordination issue as:" line? If you already claimed it in another form, a link to your comment is enough. AI-assisted (Claude Code, Claude Opus 5.5).
DadaCap commented 2026-11-28 07:21:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DadaCap on 2026-11-28T07:21:17Z.


Thanks for this! Writing the VOP3 16-bit result mask as OpBitFieldUExtract is equivalent and targets a reported NVIDIA Ada miscompile.

During maintainer testing (local, 2026-11-28) (head 69b363d75, merged on main b1619e0a3 / 6dfca6428, Windows 11, Python tests via pytest/unittest) we found:

  • There is no claim for it in #1608 yet.
  • The miscompile did not reproduce on an RTX 4070 Laptop (Ada) with driver 621.40 in our tests; only a SPIR-V shape test was red. The updated test regex is also weaker than before.

To get this merged:

  • Claim the item in #1608 and tighten the test regex back.
  • Do you have a repro on your card (GPU and driver)? That would let us confirm the fix.

AI-assisted (Claude Code), posted for DadaCap (maintainer).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7235880121 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7235880121). Originally posted by [DadaCap](https://github.com/DadaCap) on 2026-11-28T07:21:17Z. --- Thanks for this! Writing the VOP3 16-bit result mask as `OpBitFieldUExtract` is equivalent and targets a reported NVIDIA Ada miscompile. During maintainer testing (local, 2026-11-28) (head 69b363d75, merged on main b1619e0a3 / 6dfca6428, Windows 11, Python tests via pytest/unittest) we found: - There is no claim for it in #1608 yet. - The miscompile did not reproduce on an RTX 4070 Laptop (Ada) with driver 621.40 in our tests; only a SPIR-V shape test was red. The updated test regex is also weaker than before. To get this merged: - Claim the item in #1608 and tighten the test regex back. - Do you have a repro on your card (GPU and driver)? That would let us confirm the fix. _AI-assisted (Claude Code), posted for DadaCap (maintainer)._
ecox982745 commented 2026-11-28 07:33:14 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T07:33:14Z.


The commit now on this PR incorporates the patch for the maintainer’s test-regex review. Its Git tree matches the originally tested patch exactly. I also merged it locally onto main ba8b77b390 (tree 10337471ac). All 23 tests in the two affected files and all five documentation-table tests passed there on Windows, CPU only.

It changes the two semantic tests. Both now require the low-half extract to start at bit 0 and take exactly 16 bits. The add test targets the value stored in v0; the multiply test keeps its link to the product.

I checked two cases that distinguish the old and revised tests:

CPU check Original PR head With patch
Change the multiply extract to 15 bits. The chosen operands still produce the same low-half result. Accepted Rejected
Add an unused, valid 16-bit extract after the signed add’s output store. Rejected (picked the unused extract) Accepted

Both example modules passed SPIR-V validation for Vulkan 1.2. All 23 tests in the two affected files passed on the patched head. This supplies the requested test change. It adds no hardware evidence about the reported driver miscompilation.

Coordination claim. AI-assisted with OpenAI Codex (GPT-6).

Integration check after #2593. I merged this exact head (599de2fc9) locally with main 91bab934d7ee43e23c582bd8a18baa2b09a0a558, which includes the f16 conversion CI fixes. All 33 CPU tests across test_alu_add_sub_i16, test_valu_int16, test_valu_cvt_f16_int16_mods and test_docs_design_rows passed on both main and the merged tree 702395051ec9e4494455835430222630701b964e. AI-assisted with OpenAI Codex (GPT-6.2 Sol).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7236013781 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7236013781). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-28T07:33:14Z. --- The [commit now on this PR](https://github.com/ProjectLeonida/mandy/pull/1585/commits/599de2fc914eae22cbd12c9b7a7622dbf719c782) incorporates the patch for the [maintainer’s test-regex review](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7235880121). Its Git tree matches the originally tested patch exactly. I also merged it locally onto main `ba8b77b390` (tree `10337471ac`). All 23 tests in the two affected files and all five documentation-table tests passed there on Windows, CPU only. It changes the two semantic tests. Both now require the low-half extract to start at bit 0 and take exactly 16 bits. The add test targets the value stored in `v0`; the multiply test keeps its link to the product. I checked two cases that distinguish the old and revised tests: | CPU check | Original PR head | With patch | | --- | --- | --- | | Change the multiply extract to 15 bits. The chosen operands still produce the same low-half result. | Accepted | Rejected | | Add an unused, valid 16-bit extract after the signed add’s output store. | Rejected (picked the unused extract) | Accepted | Both example modules passed SPIR-V validation for Vulkan 1.2. All 23 tests in the two affected files passed on the patched head. This supplies the requested test change. It adds no hardware evidence about the reported driver miscompilation. [Coordination claim](https://github.com/ProjectLeonida/mandy/issues/1608#issuecomment-7235980960). AI-assisted with OpenAI Codex (GPT-6). **Integration check after #2593.** I merged this exact head (`599de2fc9`) locally with main `91bab934d7ee43e23c582bd8a18baa2b09a0a558`, which includes the f16 conversion CI fixes. All 33 CPU tests across `test_alu_add_sub_i16`, `test_valu_int16`, `test_valu_cvt_f16_int16_mods` and `test_docs_design_rows` passed on both main and the merged tree `702395051ec9e4494455835430222630701b964e`. AI-assisted with OpenAI Codex (GPT-6.2 Sol).
zmasi commented 2026-11-28 21:28:17 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T21:28:17Z.


I did not reproduce the preserved-high-half corruption on physical gfx906 (RADV Mesa 26.0.8, native wave64). Main aa918e5d9 and 69b363d75 merged with it each matched 9/9 readbacks: 5,952 data words correct, all dump pairs byte-identical, all guards intact. The reported clamped op_sel:[1,1,0] add returned 0x0002aaa8 on both. No shader-run validation errors or synchronization hazards.

The structural change is present: in the sampled modules, 16 integer result sites and six conversion result sites changed from AND-with-65535 to an extract at offset 0, width 16. These were result paths feeding stores, not source-operand extracts. Removing just the clamped add’s result mask in a test-only module produced 25 wrong lane words, so the readback really checks the preserved half.

The test-width concern is independent of the driver result: 257 × 257 gives the same low half at widths 15 and 16, whereas 384 × 256 gives 0x8000 at width 16 and zero at width 15. I would keep the exact-width assertion or a numerical control that sets bit 15.

AI-assisted.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246041994 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7246041994). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T21:28:17Z. --- I did not reproduce the preserved-high-half corruption on physical gfx906 (RADV Mesa 26.0.8, native wave64). Main `aa918e5d9` and `69b363d75` merged with it each matched 9/9 readbacks: 5,952 data words correct, all dump pairs byte-identical, all guards intact. The reported clamped `op_sel:[1,1,0]` add returned `0x0002aaa8` on both. No shader-run validation errors or synchronization hazards. The structural change is present: in the sampled modules, 16 integer result sites and six conversion result sites changed from AND-with-65535 to an extract at offset 0, width 16. These were result paths feeding stores, not source-operand extracts. Removing just the clamped add’s result mask in a test-only module produced 25 wrong lane words, so the readback really checks the preserved half. The test-width concern is independent of the driver result: `257 × 257` gives the same low half at widths 15 and 16, whereas `384 × 256` gives `0x8000` at width 16 and zero at width 15. I would keep the exact-width assertion or a numerical control that sets bit 15. AI-assisted.
ecox982745 commented 2026-11-28 21:31:54 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by ecox982745 on 2026-11-28T21:31:54Z.


For the maintainer’s hardware question, I could not reproduce the signed add/subtract corruption on a desktop RTX 4090, Windows, NVIDIA 616.64, Vulkan subgroup 32. This covers the add/subtract case that the earlier conversion sweep left open.

I compared main aa918e5d9 against the clean local merge of PR head 69b363d75 (tree 7150cb046). Each translator produced 32 synthetic compute shaders covering signed add and subtract, all eight source/destination half selections, and clamp on and off. Each shader processed the same 4,096 runtime input records, including saturation boundaries and varying previous destination values.

  • Both revisions matched the integer reference on all 131,072 full destination words. The 32 pairs of GPU readback buffers were byte-identical, all neighboring input words were unchanged, and all 64 modules passed spirv-val --target-env vulkan1.2.
  • For v_add_nc_i16 v14, v3, v12 op_sel:[1,1,0] clamp, the fixture with v14=0x00021111, v3=0xAAAABEEF, and v12=0xFFFEABCD returned 0x0002AAA8 on both revisions. The corresponding subtract returned 0x0002AAAC. The add modules differed at the result mask feeding the preserved-half merge.
  • As a sensitivity check, I removed just that result mask from the main module and dispatched it again. The comparison caught 2,038 corrupted high halves out of 4,096, with every low half still correct. The example add returned 0xFFFFAAA8 in this control.

This was an independently constructed shader around the reported instruction. The full failing shader and driver version from the RTX 4070 SUPER would help distinguish a driver difference from a surrounding-code difference.

AI-assisted verification with OpenAI Codex (GPT-6).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246085697 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7246085697). Originally posted by [ecox982745](https://github.com/ecox982745) on 2026-11-28T21:31:54Z. --- For the [maintainer’s hardware question](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7235880121), I could not reproduce the signed add/subtract corruption on a desktop **RTX 4090, Windows, NVIDIA 616.64, Vulkan subgroup 32**. This covers the add/subtract case that the earlier conversion sweep left open. I compared main `aa918e5d9` against the clean local merge of PR head `69b363d75` (tree `7150cb046`). Each translator produced 32 synthetic compute shaders covering signed add and subtract, all eight source/destination half selections, and clamp on and off. Each shader processed the same 4,096 runtime input records, including saturation boundaries and varying previous destination values. - Both revisions matched the integer reference on all **131,072 full destination words**. The 32 pairs of GPU readback buffers were byte-identical, all neighboring input words were unchanged, and all 64 modules passed `spirv-val --target-env vulkan1.2`. - For `v_add_nc_i16 v14, v3, v12 op_sel:[1,1,0] clamp`, the fixture with `v14=0x00021111`, `v3=0xAAAABEEF`, and `v12=0xFFFEABCD` returned `0x0002AAA8` on both revisions. The corresponding subtract returned `0x0002AAAC`. The add modules differed at the result mask feeding the preserved-half merge. - As a sensitivity check, I removed just that result mask from the main module and dispatched it again. The comparison caught **2,038 corrupted high halves out of 4,096**, with every low half still correct. The example add returned `0xFFFFAAA8` in this control. This was an independently constructed shader around the reported instruction. The full failing shader and driver version from the RTX 4070 SUPER would help distinguish a driver difference from a surrounding-code difference. AI-assisted verification with OpenAI Codex (GPT-6).
zmasi commented 2026-11-29 02:12:43 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-29T02:12:43Z.


#1585 | head 599de2fc91 (merged cleanly onto origin/main 791899f652) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes

Independent Verification (Windows 11)

  • Diff & safety audit: Inspected 100% of the diff on current head 599de2fc91 across tools/rdna2spirv.py (emitting OpBitFieldUExtract %uint <src> 0 16 instead of OpBitwiseAnd %uint <src> 0xFFFF across all 6 VOP3 16-bit integer, v_cvt_{norm_,}i16_f16, and saturate_int16 low-half sites), docs/design.md, tests/semantic/test_alu_add_sub_i16.py, and tests/semantic/test_valu_int16.py. python -I scripts/check_no_game_data.py docs/design.md tools/rdna2spirv.py tests/semantic/test_alu_add_sub_i16.py tests/semantic/test_valu_int16.py passed (rc=0).
  • Red -> Green on Windows 11:
    • Red (origin/main 791899f652 tools/rdna2spirv.py): Running #1585's tests/semantic/test_alu_add_sub_i16.py against unpatched tools/rdna2spirv.py failed (FAILED (failures=1) — count == 0 != 1 because origin/main still emitted OpBitwiseAnd %uint ... 65535).
    • Green (#1585 + origin/main):
      • python -I tests/semantic/test_alu_add_sub_i16.py -> 7/7 passed (OK, 1.590s, including spirv-as + spirv-val and negative-control mutation check)
      • python -I tests/semantic/test_valu_int16.py -> 16/16 passed (OK, 2.901s)
      • python -I tests/semantic/test_valu_add_sub_nc_i16.py -> 7/7 passed (OK, 3.657s)
      • Doc suites: test_docs_design_rows.py (5/5), test_docs_table_rows.py (2/2), test_docs_encoding.py (1/1) -> all OK.
<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7249280877 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7249280877). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-29T02:12:43Z. --- #1585 | head 599de2fc914eae22cbd12c9b7a7622dbf719c782 (merged cleanly onto origin/main 791899f652) | Windows 11 (10.0.26200.9974), Python 3.12.10 | AI-assisted: yes ### Independent Verification (Windows 11) - **Diff & safety audit**: Inspected 100% of the diff on current head `599de2fc91` across `tools/rdna2spirv.py` (emitting `OpBitFieldUExtract %uint <src> 0 16` instead of `OpBitwiseAnd %uint <src> 0xFFFF` across all 6 VOP3 16-bit integer, `v_cvt_{norm_,}i16_f16`, and `saturate_int16` low-half sites), `docs/design.md`, `tests/semantic/test_alu_add_sub_i16.py`, and `tests/semantic/test_valu_int16.py`. `python -I scripts/check_no_game_data.py docs/design.md tools/rdna2spirv.py tests/semantic/test_alu_add_sub_i16.py tests/semantic/test_valu_int16.py` passed (`rc=0`). - **Red -> Green on Windows 11**: - **Red (`origin/main` `791899f652` `tools/rdna2spirv.py`)**: Running `#1585`'s `tests/semantic/test_alu_add_sub_i16.py` against unpatched `tools/rdna2spirv.py` failed (`FAILED (failures=1)` — `count == 0 != 1` because `origin/main` still emitted `OpBitwiseAnd %uint ... 65535`). - **Green (`#1585 + origin/main`)**: - `python -I tests/semantic/test_alu_add_sub_i16.py` -> `7/7` passed (`OK`, `1.590s`, including `spirv-as` + `spirv-val` and negative-control mutation check) - `python -I tests/semantic/test_valu_int16.py` -> `16/16` passed (`OK`, `2.901s`) - `python -I tests/semantic/test_valu_add_sub_nc_i16.py` -> `7/7` passed (`OK`, `3.657s`) - Doc suites: `test_docs_design_rows.py` (`5/5`), `test_docs_table_rows.py` (`2/2`), `test_docs_encoding.py` (`1/1`) -> all `OK`.
TheGeogeo commented 2026-11-29 14:17:41 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by TheGeogeo on 2026-11-29T14:17:41Z.


Ready for testing: merges cleanly with main 3535eb5c4. Not in main yet: git cherry finds 4 commit(s) not there, and 0 of the 26 lines it adds are already present. No duplicate found: it carries no claim ID, and no other open pull request has the same title.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7257191305 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7257191305). Originally posted by [TheGeogeo](https://github.com/TheGeogeo) on 2026-11-29T14:17:41Z. --- Ready for testing: merges cleanly with `main` `3535eb5c4`. Not in `main` yet: `git cherry` finds 4 commit(s) not there, and 0 of the 26 lines it adds are already present. No duplicate found: it carries no claim ID, and no other open pull request has the same title. AI-assisted (Claude Code).
enlight3d commented 2026-11-29 15:28:02 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by enlight3d on 2026-11-29T15:28:02Z.


RUN comment, PR #1585 (rdna2spirv: OpBitFieldUExtract for the VOP3 16-bit result mask)

Heads: PR 599de2fc9, main 91bab934d (local merge of the PR into it, not pushed).
Kind: translator (tools/rdna2spirv.py) + docs/design.md + two tests/semantic files. CPU only, no GPU run.

Commands (repo root):
python -I tests/semantic/test_alu_add_sub_i16.py
python -I tests/semantic/test_valu_int16.py
python -I scripts/run_semantic_tests.py tests/semantic -j 8
python -I tests/test_docs_.py and tests/test_design_contract_rows.py (14 files, one process each)

RED (behavioural, the PR adds no API): tools/rdna2spirv.py and docs/design.md put back to the merge-base version, the PR's tests kept.
test_alu_add_sub_i16.py: 1 failure (test_negative_controls_spirv_mutation), 6 pass.
test_valu_int16.py: 1 failure (test_sabotaged_spirv_is_detected, case "v_mul_lo_u16 drops 16-bit result mask"), 15 pass.
GREEN at the PR head: test_alu_add_sub_i16 7/7, test_valu_int16 16/16; full tests/semantic 491 files, 6312 tests, 0 failed; the 14 docs test files pass.
GREEN merged into main: both files pass (7/7, 16/16); the 14 docs test files pass; full tests/semantic 529 files, 6526 tests, 1 file failed: test_interp_computed_ij_fallback (2 failures, "0.07745361328125 != 0.0775146484375"). The same 2 failures happen on plain main (91bab934d) without the PR: pre-existing, not from this PR.
Not covered here: the NVIDIA And-&-0xFFFF miscompile is a GPU compiler behaviour. These tests check the emitted SPIR-V and the CPU interpreter; I did not re-run the GPU repro.

Machine: Windows 11 Pro, RTX 3090 24 GB, NVIDIA 621.40, Python 3.13.12 (uv build), run with python -I, one process per test file.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7258111292 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7258111292). Originally posted by [enlight3d](https://github.com/enlight3d) on 2026-11-29T15:28:02Z. --- RUN comment, PR #1585 (rdna2spirv: OpBitFieldUExtract for the VOP3 16-bit result mask) Heads: PR 599de2fc9, main 91bab934d (local merge of the PR into it, not pushed). Kind: translator (tools/rdna2spirv.py) + docs/design.md + two tests/semantic files. CPU only, no GPU run. Commands (repo root): python -I tests/semantic/test_alu_add_sub_i16.py python -I tests/semantic/test_valu_int16.py python -I scripts/run_semantic_tests.py tests/semantic -j 8 python -I tests/test_docs_<name>.py and tests/test_design_contract_rows.py (14 files, one process each) RED (behavioural, the PR adds no API): tools/rdna2spirv.py and docs/design.md put back to the merge-base version, the PR's tests kept. test_alu_add_sub_i16.py: 1 failure (test_negative_controls_spirv_mutation), 6 pass. test_valu_int16.py: 1 failure (test_sabotaged_spirv_is_detected, case "v_mul_lo_u16 drops 16-bit result mask"), 15 pass. GREEN at the PR head: test_alu_add_sub_i16 7/7, test_valu_int16 16/16; full tests/semantic 491 files, 6312 tests, 0 failed; the 14 docs test files pass. GREEN merged into main: both files pass (7/7, 16/16); the 14 docs test files pass; full tests/semantic 529 files, 6526 tests, 1 file failed: test_interp_computed_ij_fallback (2 failures, "0.07745361328125 != 0.0775146484375"). The same 2 failures happen on plain main (91bab934d) without the PR: pre-existing, not from this PR. Not covered here: the NVIDIA And-&-0xFFFF miscompile is a GPU compiler behaviour. These tests check the emitted SPIR-V and the CPU interpreter; I did not re-run the GPU repro. Machine: Windows 11 Pro, RTX 3090 24 GB, NVIDIA 621.40, Python 3.13.12 (uv build), run with `python -I`, one process per test file.
OreoFR commented 2026-11-29 19:17:50 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T19:17:50Z.


Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, spirv-tools + llvm-mc, main 7c330c76d (also merges cleanly on current main dd87aa405; does not force a rebase of #2566), PR head 599de2fc9 : red 2 failures / green 23 OK, 0 skipped

  • Red: test_alu_add_sub_i16 6/7, test_valu_int16 15/16. Structural red (regex on the emitted SPIR-V); interpreter behaviour is identical on both sides, as expected since the target is an NVIDIA codegen issue.
  • Green: 7/7 and 16/16, 0 skipped.
  • Semantic suite (scripts/run_semantic_tests.py, 529+ files, ~6 530 tests) and the CI translator-tests pytest selection: identical to main (main's known failures only: test_interp_computed_ij_fallback x2, test_mesh_serial_waves x6).
  • Diff: 6 sites go from OpBitwiseAnd 0xFFFF to the equivalent OpBitFieldUExtract 0,16; the existing docs/design.md row is updated (no new rule, so no new fixture needed).
  • For a maintainer: the comments note the bug was not reproduced on RTX 4070 Laptop / RTX 4090, and a claim reminder is open.

Verdict: READY (subject to the maintainer accepting it without a hardware repro)

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261166883 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7261166883). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T19:17:50Z. --- Verified by OreoFR on macOS 27.2.1 (26B131), Apple M5, APFS (case-insensitive), Python 3.12.16, spirv-tools + llvm-mc, main 7c330c76d (also merges cleanly on current main dd87aa405; does not force a rebase of #2566), PR head 599de2fc9 : red 2 failures / green 23 OK, 0 skipped - **Red**: `test_alu_add_sub_i16` 6/7, `test_valu_int16` 15/16. Structural red (regex on the emitted SPIR-V); interpreter behaviour is identical on both sides, as expected since the target is an NVIDIA codegen issue. - **Green**: 7/7 and 16/16, 0 skipped. - Semantic suite (`scripts/run_semantic_tests.py`, 529+ files, ~6 530 tests) and the CI translator-tests pytest selection: identical to main (main's known failures only: `test_interp_computed_ij_fallback` x2, `test_mesh_serial_waves` x6). - Diff: 6 sites go from `OpBitwiseAnd 0xFFFF` to the equivalent `OpBitFieldUExtract 0,16`; the existing `docs/design.md` row is updated (no new rule, so no new fixture needed). - For a maintainer: the comments note the bug was not reproduced on RTX 4070 Laptop / RTX 4090, and a claim reminder is open. **Verdict: READY** (subject to the maintainer accepting it without a hardware repro) AI-assisted: Claude Code
OreoFR commented 2026-11-29 20:06:46 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T20:06:46Z.


"No game data" review by OreoFR (requested for maintainers), PR head 599de2fc9, merged locally on main 720bd3b4e:

  • scripts/check_no_game_data.py on the merge: rc 0; the no-game-data.yml extension filter: 0 files.
  • tools/rdna2spirv.py, two tests and one docs/design.md row: opcodes, synthetic constants and a one-instruction repro with made-up values only. No shader name, hash or corpus dump.

Review: OK from a no-game-data point of view.

AI-assisted: Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7261816049 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7261816049). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-29T20:06:46Z. --- "No game data" review by OreoFR (requested for maintainers), PR head 599de2fc9, merged locally on main 720bd3b4e: - `scripts/check_no_game_data.py` on the merge: rc 0; the `no-game-data.yml` extension filter: 0 files. - `tools/rdna2spirv.py`, two tests and one `docs/design.md` row: opcodes, synthetic constants and a one-instruction repro with made-up values only. No shader name, hash or corpus dump. **Review: OK** from a no-game-data point of view. AI-assisted: Claude Code
whoalin1 commented 2026-11-30 08:39:09 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-30T08:39:09Z.


I reproduced the reported docs-table concern against current main (82fbcc0f7) by test-merging 599de2fc9 locally: the merge is clean and python3 -I tests/test_docs_design_rows.py now passes all 5 tests. The malformed-row failure appears to have been resolved by subsequent upstream doc-table cleanup rather than requiring a change in this PR.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7273173737 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7273173737). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-30T08:39:09Z. --- I reproduced the reported docs-table concern against current `main` (`82fbcc0f7`) by test-merging `599de2fc9` locally: the merge is clean and `python3 -I tests/test_docs_design_rows.py` now passes all 5 tests. The malformed-row failure appears to have been resolved by subsequent upstream doc-table cleanup rather than requiring a change in this PR.
whoalin1 commented 2026-11-30 22:29:59 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-30T22:29:59Z.


Rebased onto current main as 96575316a to refresh the stale CI baseline; the branch reapplied cleanly with no conflicts. Validation after rebase: pytest tests/semantic/test_alu_add_sub_i16.py tests/semantic/test_valu_int16.py passes 23 tests + 337 subtests under Python 3.12; py_compile and git diff --check are clean.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7293926786 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7293926786). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-30T22:29:59Z. --- Rebased onto current `main` as `96575316a` to refresh the stale CI baseline; the branch reapplied cleanly with no conflicts. Validation after rebase: `pytest tests/semantic/test_alu_add_sub_i16.py tests/semantic/test_valu_int16.py` passes **23 tests + 337 subtests** under Python 3.12; `py_compile` and `git diff --check` are clean.
whoalin1 commented 2026-11-30 22:40:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-30T22:40:22Z.


Fixed the Linux Python failure in 3c5c86d1a: the existing typed-image gather test still expected OpBitwiseAnd for the signed low-half mask even though the PR intentionally emits the NVIDIA-safe OpBitFieldUExtract. The test now asserts the extract offset/count. Validation: python3 tests/test_image_load_typed.py passes (28 tests, 2 environment skips) and git diff --check is clean.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7294153749 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7294153749). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-30T22:40:22Z. --- Fixed the Linux Python failure in `3c5c86d1a`: the existing typed-image gather test still expected `OpBitwiseAnd` for the signed low-half mask even though the PR intentionally emits the NVIDIA-safe `OpBitFieldUExtract`. The test now asserts the extract offset/count. Validation: `python3 tests/test_image_load_typed.py` passes (28 tests, 2 environment skips) and `git diff --check` is clean.
whoalin1 commented 2026-11-30 23:04:22 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by whoalin1 on 2026-11-30T23:04:22Z.


The repaired head 3c5c86d1a is now mergeable with all visible checks green. The typed-image regression suite passes locally, and the NVIDIA-safe OpBitFieldUExtract behavior is unchanged.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7294674248 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#issuecomment-7294674248). Originally posted by [whoalin1](https://github.com/whoalin1) on 2026-11-30T23:04:22Z. --- The repaired head `3c5c86d1a` is now mergeable with all visible checks green. The typed-image regression suite passes locally, and the NVIDIA-safe `OpBitFieldUExtract` behavior is unchanged.
aslan2142 commented 2026-12-01 11:30:33 +00:00 (Migrated from github.com)

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

Review: APPROVED


Reviewed head diff against main: replacing OpBitwiseAnd & 0xFFFF with OpBitFieldUExtract (offset 0, count 16) across the 6 VOP3 16-bit integer/conversion/d16-saturate sites in tools/rdna2spirv.py is bit-equivalent, fixes the reported NVIDIA shader-compiler preserved-high-half miscompile, updates the structural negative-control tests and docs/design.md contract table, is clean-room verified, and has all CI checks green.

(AI-assisted review.)

<!-- greyfinch-sync:ubiquitarianism/leonida:review:6130339198 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1585#pullrequestreview-6130339198). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T11:30:33Z. **Review:** APPROVED --- Reviewed head diff against `main`: replacing `OpBitwiseAnd & 0xFFFF` with `OpBitFieldUExtract` (offset 0, count 16) across the 6 VOP3 16-bit integer/conversion/d16-saturate sites in `tools/rdna2spirv.py` is bit-equivalent, fixes the reported NVIDIA shader-compiler preserved-high-half miscompile, updates the structural negative-control tests and `docs/design.md` contract table, is clean-room verified, and has all CI checks green. *(AI-assisted review.)*
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!1585
No description provided.