[PR #1093] [CLOSED] rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash) (OLD-10058) #1128

Closed
opened 2026-11-26 20:20:11 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/1093
Author: @LewisCodesWebsites
Created: 11/24/2026
Status: ❌ Closed

Base: main ← Head: carry/old-10058


📝 Commits (1)

  • a17d0e7 rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash)

📊 Changes

3 files changed (+216 additions, -11 deletions)

View changed files

📝 docs/design.md (+1 -0)
➕ tests/semantic/test_sub_co_same_operand.py (+194 -0)
📝 tools/rdna2spirv.py (+21 -11)

📄 Description

Claimed in the coordination issue as: OLD-10058 (#14)

Supersedes: #324 (carries forward old PR 10058 by @wail-arch, rebased onto main 3aa975421; their commit and authorship are kept, the only change is resolving a docs/design.md conflict by adding the new contract row next to main's current pc-tail row)

What and why

v_sub_co_u32 / v_subrev_co_u32 (and the _ci_ forms) with the same register as both sources were translated to OpISubBorrow %x %x, and AMD's Windows driver crashes (0xC0000005 in amdvlk64.dll) creating a native wave64 pipeline in which that borrow predicates a subgroup shuffle. x - x is always 0 with no borrow, so this writes the result out directly. It is the same crash as my finding in #14.

Tested

  • python -I tools/crosslane_fuzz.py --ext --dpp --wave 64 --modes native --w64-native --no-maskdata --programs 1000 --seed 20261124: main gives 6 harness errors (exit 3221225477, all in amdvlk64.dll at the same offset); this branch gives 0 (999 match, 1 hyp_only).
  • The reduced 7-instruction reproducer from my finding in #14 crashes on main and runs with 0 mismatches on this branch.
  • tests/semantic/test_sub_co_same_operand.py: 6/6. scripts/run_semantic_tests.py tests/semantic: 6173 of 6174 pass; the one failure, test_image_cube_store_glc, fails the same way on main on this machine (FileNotFoundError launching a tool at line 282), so it is unrelated.
  • tests/test_docs_design_rows.py, tests/test_docs_table_rows.py, tests/test_docs_links.py, tests/test_text_write_line_endings.py: OK.

GPUs tested: AMD Radeon 660M (RDNA2 iGPU, gfx1035), Adrenalin 32.0.21045.1000 (Vulkan driver 2.0.353), Windows 11 26200

AI-assisted: yes (Claude and OpenCode ran the rebase and the tests; I reviewed them)

Checklist

  • Based on current main and merges cleanly.
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption, 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.

🤖 Generated with Claude Code

https://claude.ai/code/session_015pRhqKwVhndiVZH8fawThh


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/1093 **Author:** [@LewisCodesWebsites](https://github.com/LewisCodesWebsites) **Created:** 11/24/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `carry/old-10058` --- ### 📝 Commits (1) - [`a17d0e7`](https://github.com/ubiquitarianism/leonida/commit/a17d0e70acde838ec099d0240f9d8f454473665f) rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash) ### 📊 Changes **3 files changed** (+216 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `docs/design.md` (+1 -0) ➕ `tests/semantic/test_sub_co_same_operand.py` (+194 -0) 📝 `tools/rdna2spirv.py` (+21 -11) </details> ### 📄 Description Claimed in the coordination issue as: OLD-10058 (#14) Supersedes: #324 (carries forward old PR 10058 by @wail-arch, rebased onto `main` 3aa975421; their commit and authorship are kept, the only change is resolving a `docs/design.md` conflict by adding the new contract row next to main's current pc-tail row) ### What and why `v_sub_co_u32` / `v_subrev_co_u32` (and the `_ci_` forms) with the same register as both sources were translated to `OpISubBorrow %x %x`, and AMD's Windows driver crashes (`0xC0000005` in `amdvlk64.dll`) creating a native wave64 pipeline in which that borrow predicates a subgroup shuffle. x - x is always 0 with no borrow, so this writes the result out directly. It is the same crash as my finding in #14. ### Tested - `python -I tools/crosslane_fuzz.py --ext --dpp --wave 64 --modes native --w64-native --no-maskdata --programs 1000 --seed 20261124`: `main` gives 6 harness errors (exit 3221225477, all in `amdvlk64.dll` at the same offset); this branch gives 0 (999 match, 1 hyp_only). - The reduced 7-instruction reproducer from my finding in #14 crashes on `main` and runs with 0 mismatches on this branch. - `tests/semantic/test_sub_co_same_operand.py`: 6/6. `scripts/run_semantic_tests.py tests/semantic`: 6173 of 6174 pass; the one failure, `test_image_cube_store_glc`, fails the same way on `main` on this machine (`FileNotFoundError` launching a tool at line 282), so it is unrelated. - `tests/test_docs_design_rows.py`, `tests/test_docs_table_rows.py`, `tests/test_docs_links.py`, `tests/test_text_write_line_endings.py`: OK. GPUs tested: AMD Radeon 660M (RDNA2 iGPU, gfx1035), Adrenalin 32.0.21045.1000 (Vulkan driver 2.0.353), Windows 11 26200 AI-assisted: yes (Claude and OpenCode ran the rebase and the tests; I reviewed them) ### Checklist - [x] Based on current `main` and merges cleanly. - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption, including in logs or reports quoted here. - [x] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015pRhqKwVhndiVZH8fawThh --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
4ld0 2026-11-26 20:20:11 +01:00
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#1128
No description provided.