Repository navigation
rdna2spirv: write out a carry-out subtract of a register from itself (AMD Windows driver crash) - #739
Conversation
…(AMD Windows driver crash) v_sub_co_u32 / v_subrev_co_u32 and their _ci_ forms with the same operand twice were translated to OpISubBorrow %x %x. AMD's Windows driver dies with an access violation (0xC0000005 in amdvlk64.dll, 32.0.21037.1004 and 32.0.21045.29003, gfx1036) creating a native wave64 compute pipeline in which that borrow predicates the value operand of an OpGroupNonUniformShuffle. x - x is 0 with no borrow, so these forms now emit D = 0 - carry in and borrow out = carry in, with no OpISubBorrow. Values are unchanged; other operand pairs are translated as before. Found with crosslane_fuzz.py --seed 880317 --wave 64 --w64-native --no-maskdata --dpp --ext --programs 400 on a Ryzen 9 9950X3D iGPU: programs 1 and 181 were harness errors (exit 3221225477) and now match (399 of 400 match; the other differs only in a hypothesis op, as before). - docs/design.md: contract row "Carry-out subtract of a register from itself" - tests/semantic/test_sub_co_same_operand.py: values and borrow mask in wave32 and native wave64, the emitted form with --wave64-emulate Not counted over the corpus, and two different registers holding equal values still reach OpISubBorrow. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Tested
No GPU leg and no way to reproduce the reported crash here: AMD's Windows driver is not available on this machine, and no |
|
Tested Setup: Windows 11 10.0.26200.9974, AMD 26.11.2. Ryzen 5 7600X iGPU (gfx1036) on driver version 32.0.21045.29003, one of the two this PR reports crashing; RX 9070 (GFX1201) on 32.0.32029.2010. CPU: GPU: I wrote a local wave64 compute shader (not committed) with the pattern the description gives:
So this minimal form of the pattern does not crash AI-assisted: yes |
|
Tested b7de4d8 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32, mesh shaders), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300), native Windows: pass, regression check (NVIDIA side; the AMD driver case is covered above) Runtime built at this head with
|
|
For whoever merges: #324, #739 and #930 change exactly the same lines in |
|
Thanks for carrying this forward, and thanks to everyone who tested it. I'm closing this as a duplicate of #930.
AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5). |
Summary
Restores and updates work from draft PR #324 (
old-pr/10058/ itemOLD-10058).Original commit by @wail-arch (
183d63f55).v_sub_co_u32/v_subrev_co_u32and their_ci_forms with the same operand twice were translated toOpISubBorrow %x %x. AMD's Windows driver dies with an access violation (0xC0000005inamdvlk64.dll, 32.0.21037.1004 and 32.0.21045.29003, gfx1036) creating a native wave64 compute pipeline in which that borrow predicates the value operand of anOpGroupNonUniformShuffle.x - xis 0 with no borrow, so these forms now emitD = 0 - carry inandborrow out = carry in, with noOpISubBorrow. Values are unchanged; other operand pairs are translated as before.Verification
python -I scripts/check_no_game_data.py tools/rdna2spirv.py tests/semantic/test_sub_co_same_operand.py docs/design.md-> Clean (no game data)python -m unittest discover -s tests/semantic -p test_sub_co_same_operand.py-> 6/6 PASS in 2.07subi/main(21625bca8).AI-assisted verification and rebase by Antigravity (Autonomous Direct Mode).