Recompiler: keep DispatchX rendezvous branch wave-uniform #3157

Merged
bmjask merged 4 commits from upstream-pr/3157 into main 2026-11-28 14:06:59 +00:00
bmjask commented 2026-11-28 13:50:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by bmjask on 2026-11-28T13:50:18Z.


Stacked on #3150; only ad19a1c1 belongs to this PR.

A partial DispatchX limit put the split-wave64 entry ballot behind control flow that the shader compiler treated as lane-divergent. On NVIDIA wave32 hardware the two halves could miss their bounded rendezvous, mark the group dead, and write nothing for the partially live X group.

What is in it

  • crates/xcl/src/gpu/recomp/emit.rs: make the uniform DispatchX-limit branch explicitly wave-uniform with WaveActiveAllTrue.
  • crates/xcl/src/gpu/recomp/tests.rs: require that wave-uniform form in the generated HLSL fixture.

Tested

  • Windows 11, NVIDIA GeForce RTX 4090, DXC 1.9.2602.17, Rust stable MSVC, debug build, commit ad19a1c1.
  • cargo test -p xcl --lib gpu::recomp::tests::dispatch_thread_limits_seed_compute_exec_for_native_and_remapped_groups -- --exact --test-threads=1: 1 passed, 0 failed, 0 ignored; no skips.
  • cargo test -p xcl --lib gpu::recomp::tests::gpu_compute_mode_dispatch_abi -- --exact --test-threads=1: 1 passed, 0 failed, 0 ignored; no skips. Without the top commit, the HLSL fallback times out its first split-wave rendezvous and leaves the partially live X group unwritten.
  • cargo test -p xcl --lib -- --test-threads=4: 2,001 passed, 0 failed, 28 ignored; 25 reported GPU skips (no wave64, no dxil.dll, and four explicitly refused unsupported instruction forms).

Regression run

Not run. This remains a draft until the required clean main/head smoke blocks are available after #3150 is updated and this stack is rebased.

Not tested

  • Whole workspace suite and paired real-title smoke runs.
  • AMD and Intel GPUs; native-wave64 hardware.
  • Performance impact beyond retaining the existing unlimited-dispatch branch.

AI use

Codex with GPT-5 diagnosed the failed rendezvous, implemented the two-line generated-HLSL change and assertion update, and ran the tests above.

<!-- greyfinch-sync:ivall/xcl:issue:5540790954 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3157). Originally posted by [bmjask](https://github.com/bmjask) on 2026-11-28T13:50:18Z. --- Stacked on #3150; only `ad19a1c1` belongs to this PR. A partial DispatchX limit put the split-wave64 entry ballot behind control flow that the shader compiler treated as lane-divergent. On NVIDIA wave32 hardware the two halves could miss their bounded rendezvous, mark the group dead, and write nothing for the partially live X group. **What is in it** - `crates/xcl/src/gpu/recomp/emit.rs`: make the uniform DispatchX-limit branch explicitly wave-uniform with `WaveActiveAllTrue`. - `crates/xcl/src/gpu/recomp/tests.rs`: require that wave-uniform form in the generated HLSL fixture. **Tested** - Windows 11, NVIDIA GeForce RTX 4090, DXC 1.9.2602.17, Rust stable MSVC, debug build, commit `ad19a1c1`. - `cargo test -p xcl --lib gpu::recomp::tests::dispatch_thread_limits_seed_compute_exec_for_native_and_remapped_groups -- --exact --test-threads=1`: 1 passed, 0 failed, 0 ignored; no skips. - `cargo test -p xcl --lib gpu::recomp::tests::gpu_compute_mode_dispatch_abi -- --exact --test-threads=1`: 1 passed, 0 failed, 0 ignored; no skips. Without the top commit, the HLSL fallback times out its first split-wave rendezvous and leaves the partially live X group unwritten. - `cargo test -p xcl --lib -- --test-threads=4`: 2,001 passed, 0 failed, 28 ignored; 25 reported GPU skips (no wave64, no `dxil.dll`, and four explicitly refused unsupported instruction forms). **Regression run** Not run. This remains a draft until the required clean main/head smoke blocks are available after #3150 is updated and this stack is rebased. **Not tested** - Whole workspace suite and paired real-title smoke runs. - AMD and Intel GPUs; native-wave64 hardware. - Performance impact beyond retaining the existing unlimited-dispatch branch. **AI use** Codex with GPT-5 diagnosed the failed rendezvous, implemented the two-line generated-HLSL change and assertion update, and ran the tests above.
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
xcl-dev/xcl!3157
No description provided.