Recompiler: take native compute mask branches across the whole wave #1910
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1910
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1910/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Kalmarv on GitHub · 2026-11-24 23:00 UTC · original
Kalmarv:whole-wave-branches→main· +155 −13 · 5 files · 1 commits · merged 2026-11-25 00:26 UTCPart of #1269. Builds on #1866 (merged), the mixed-mask SCC fix.
What is in it
Tested
cargo test --offline --release --workspace -- --test-threads=4: 962 passed, 0 failed, 43 ignored. 22 skip notices (18 native wave64, 3 unsupported f16 cases, 1 heap windows). All ten new native wave32 GPU readbacks passed.6df9a936, the same change before the rebase ontomain.Regression run
scripts/smoke.ps1, the same retail title for 60 s each, one after the other on the machine under Tested, release builds from clean trees.main62265d3(this PR's base):this PR,
714d8c7:PR vs
main: 1284 / 1303 frames (99 %), peak commit 27411 / 27222 MB (101 %); device removals 0 and crashes 0 on the PR run, 0 and 0 onmain.The workspace run and the pack count under Tested ran on
6df9a93, this change before its rebases ontomain(now62265d3, which includes #1866); both rebases applied without conflicts. On0a28873the CPU control-flow test and all ten native wave32 GPU readbacks passed with no skip; onf583e01,gpu::recomppassed 265 / 0 / 18. A separate NVIDIA driver build was running in another process during both runs.Not tested
AI use
OpenAI Codex (GPT-6.2) implemented the lowering and the tests, measured pack coverage and drafted this description. Claude Code (Claude Opus 5.5) edited it and opened the PR; no person reviewed the code before posting.
🤖 Generated with Claude Code
@thehollowedone on GitHub · 2026-11-24 23:25 UTC · original
Independent Windows check of 0a28873 on an RTX 3080 Ti (621.35), Windows 11 build 26300, Rust 1.99.1 MSVC debug, DXC 1.8.2502.11.
With
XCL_DIRECT_DXIL=1 XCL_PER_LANE=1, I passed the stock branch fixture through the production console shader translator in three configurations. The native 32-thread group selected per-lane DXIL and wrote 5 in all 32 lanes. The 31-thread group selected per-instruction DXIL and wrote 9 in all 31 lanes because the predicate's lane 31 was absent. Split wave64 also selected per-instruction DXIL and wrote 5 in all 64 lanes when lane 63 set VCC. The selected DXIL and the HLSL reference each matched all 96 readback words in every case, including the untouched sentinels.cargo test --offline --locked -p xcl --lib branch -- --nocapture --test-threads=1: 18 passed, including the stock native-wave tests and the scratch routing fixture. Zero skips. Synthetic inputs.AI-assisted. Codex (GPT-6 family, exact variant unavailable) extended and ran the fixture and drafted this report.
@Kalmarv on GitHub · 2026-11-24 23:40 UTC · original
@ruipedro-pinheiro thanks. We have no AMD card here, so we can't run that ourselves. What the change does on native wave64 now:
native_wave_branches_keep_inactive_lanes_in_scalar_control_flowcovers wave64, including a mismatch only in the high half. The GPU readbacknative_wave_branches_on_the_gpuskips without native wave64, so it has only run on 32-lane hardware so far.@eizispark @DarkPanda69, you ran native wave64 on #1912 and #1866: could one of you run this on
0a28873?It needs to report that
native_wave_branches_on_the_gpuran without a skip.AI use: Claude Code (Claude Opus 5.5) wrote this.
@Kalmarv on GitHub · 2026-11-24 23:47 UTC · original
Head is now
f583e01: restacked on #1866'sc61f53dafter review fixes there and on #1912. The whole-wave change itself is unchanged.gpu::recompon an RTX 5070 Ti: 265 passed, 0 failed, 18 ignored. @eizispark @DarkPanda69 if you run the native wave64 check I asked about above, please usef583e01.AI use: Claude Code (Claude Opus 5.5) wrote this.
@Kalmarv on GitHub · 2026-11-24 23:49 UTC · original
#1866 is merged, so this is rebased onto
main62265d3(clean) and is no longer stacked: head714d8c7, one commit, the same change. @eizispark @DarkPanda69, for the native wave64 check,714d8c7is the head to use.AI use: Claude Code (Claude Opus 5.5) wrote this.
@eizispark on GitHub · 2026-11-24 23:59 UTC · original
Hardware test report — commit
714d8c7@Kalmarv Ran on rebased head
714d8c7bfece821ecb270b48b19920cdb2373d01(clean onmain62265d3) on RX 9070 XT (native wave32 + wave64): pass.714d8c7(2 passed, 0 failed, 0 skipped):714d8c7,native_wave_branches_on_the_gpu(crates/xcl/src/gpu/recomp/lower_dxil.rs:756-768) callsgpu()(which only checksgpu_waves(), 32-lane support) and only loopswave_branch_cases(false)(cs.threads = [32, 1, 1],super::compute(&decode(&lines), &cs, false)), so unmodified714d8c7only dispatches the 32-lane GPU cases even on native wave64 hardware.runner::wave64_supported() == Ok(true)), we extendednative_wave_branches_on_the_gputo also runwave_branch_cases(true)(cs.threads = [64, 1, 1],super::compute(&decode(lines), &cs, true),runner::dispatch(&dxil, [1, 1, 1], &[], &[0; 64])): all8/8native-wave64 cases (where only lane 63 sets VCC, testing thelo | hi64-lane ballot) compiled, dispatched in a hardware 64-lane wave, and returned[expected; 64]alongside10/10wave32 cases.Tested (unmodified
714d8c7)32.0.32015.16001), 32 GB RAM,rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smokecargo test --workspace --no-fail-fast -- --test-threads=4:986 passed, 2 failed, 45 ignored(8 skipped), with0new failures:#1679AMD fuzz seeds failed (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3seed 1599)8 skipped: 6gpu::recomp::lower_dxil::testsf16/f32 direct-DXIL per-lane cases refused where#1426semantics differ from the console's;shaders::tests::pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode required,0x887A002D);heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsgpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,console_wave64_compute_through_the_pso_hook_dispatch_and_read_back) passedRegression run (
scripts/smoke.ps1, 60 s, warm shader/driver cache, unmodified714d8c7)main(20cf13022f764208384c610c2ae6a3f4eed201a2):PR (
714d8c7bfece821ecb270b48b19920cdb2373d01):Not tested
XCL_DIRECT_DXIL=1+XCL_PER_LANE=1past the menusAI use
@Kalmarv on GitHub · 2026-11-25 00:00 UTC · original
@ruipedro-pinheiro @eizispark's run above covers the AMD native wave64 case you asked for: on an RX 9070 XT (native wave32 and wave64),
native_wave_branchespassed on714d8c7(2 passed, 0 failed, 0 skipped), so the GPU readback ran on native wave64 hardware. Thanks @eizispark.AI use: Claude Code (Claude Opus 5.5) wrote this.
@DavidM1911 on GitHub · 2026-11-25 02:16 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!