Skip to content

[upstream #1807] gpu/dxil: one-op-per-kernel probes to localize AMD GPU-run aborts - #330

Open
ufoptg wants to merge 3 commits into
mainfrom
upstream-pr/1807
Open

ufoptg wants to merge 3 commits into
mainfrom
upstream-pr/1807

Conversation

@ufoptg

@ufoptg ufoptg commented Nov 25, 2026

Copy link
Copy Markdown
Owner

What this adds

A one-op-per-kernel probe section at the end of crates/xcl/src/gpu/dxil/ops_tests.rs: the same ops as integer_ops_match_cpu and uaddc_and_usubb_match_cpu, but each kernel contains exactly one dx.op helper (plus its address arithmetic). If a GPU run dies, the test name names the op.

Why

On an AMD wave64 card (RX 7900 XT, Mesa, Proton/wine, patched vkd3d-proton) the two big kernels above abort the GPU run silently (wine exit status: 3, no Rust panic, no DXIL validation error; see my comments on xcl-dev#1426). This PR pinpoints the cause: 13 probes, and exactly three abort, every run:

  • probe_uaddc_match_cpu
  • probe_usubb_match_cpu
  • probe_udiv_rem_match_cpu

The other ten (bfrev, the four bit_count variants, min/max, mad, bfe/bfi, both wide multiplies) pass on the same driver stack, so the fault is specific to add-with-carry, sub-with-borrow, and unsigned div/rem lowering, not to wide or bit ops generally. The second input vector has no zeros, so the div/rem probes are unambiguous.

Tested - RX 7900 XT (RADV NAVI31), Mesa 26.2.5, Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, DXC 1.9.2609.5, release profile, target x86_64-pc-windows-gnu, this branch off main at 4178e888. Each probe run solo (--exact --test-threads=1): 10 ok, 3 abort with exit status: 3 (uaddc, usubb, udiv_rem). Also cargo check --target x86_64-pc-windows-gnu --tests clean.

Not tested - native Windows (no machine), NVIDIA hardware (unknown whether these three abort there too; if CI runs them, passing there localizes the fault to the AMD path, aborting there means it reproduces without AMD hardware), the non-test build of the tree is untouched (diff is test-only).

AI use - Hermes agent (local Qwen-class) drafted the probes and ran them; I checked the diff and the run logs before opening.


Mirror of xcl-dev#1807 (auto-synced, do not edit).

raylitebull and others added 3 commits November 24, 2026 21:05
…-oom

dxil: eliminate giant-shader IR and CFG blowup in FormatLoad and multi-window memory
Split the integer and carry/borrow kernels into single dx.op probes so a
GPU-side failure names the exact op. On an AMD wave64 card (RX 7900 XT,
Mesa, vkd3d-proton) 10 probes pass; uaddc, usubb, and udiv_rem abort the
GPU run with a driver-side fault and no validation error. See the xcl-dev#1426
thread for the full counts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants