Recompiler: split direct compute programs that use global atomic adds #2123

Open
github-bot wants to merge 1 commit from github-bot/gh-2123 into main AGit
Owner

@⁠Kalmarv on GitHub · 2026-11-25 05:23 UTC · original
Kalmarv:direct-split-atomic-add → main · +101 −1 · 2 files · 1 commits · open

Part of #1269. #2080, the split this builds on, is merged; this PR is one commit on main afc5ee8, 655885e. It was 7f4b22d and before that bad5f04, stacked on #2080.

#2080 splits a program with atomics only when they are 32-bit AND or OR whose old value is unused (the sub-dword stores). It declines every other atomic. For a global (UAV) 32-bit add that is safe to cut around. The add still runs exactly once per lane, in the piece where it stands. The UAV barrier between dispatches orders it before every later piece. Its old value is a live value like any other. The title's meshlet-cull program 1ada490879c33c0e (48,191 DXIL instructions; two guest add sites, which become eight DXIL atomic adds across its heap windows) was declined for this alone. With this change it splits into 4 pieces and builds cold in 0.86 s instead of 1.93 s.

What is in it

  • crates/xcl/src/gpu/dxil/module/split.rs: dx.op.atomicBinOp.i32 with ADD is now admitted. Each add stays at its original site and runs once whenever control reaches it, as before. Its old value goes to later pieces in an existing continuation slot when it is live there. The rule against polling is conservative. If a program has an add and any loop (including a self-loop) contains an atomic or a raw-buffer, typed-buffer or texture load, it keeps the whole pipeline, because such a loop could poll memory the add changes. It doesn't try to prove that the load aliases the add or decides the loop's exit.
  • Tests: a GPU test where each lane does an add, uses its old value, and then reads the counter back 24 times in later pieces. All 64 words match the whole shader and a CPU reference: 32 counters incremented exactly once and 32 outputs that consume the old value. A CPU test checks the refusal for a program that could poll.

Tested

  • Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74), Windows 11 build 26200, release, DXC 1.9.2609.

  • Cold pipeline build of 1ada490879c33c0e as the title emits it (the whole binary is byte-identical to the title's cache, and so are its samplers), fresh process, implicit caches off, split pieces on 16 threads:

    Form Wall Pieces Slowest piece Sum of pieces
    Whole 1.93 s 1
    Split 0.86 s 4 0.86 s 3.09 s

    2.2× faster. All 4 pieces pass the DXC 1.9 validator, and the chain uses 7,488 scratch dwords per group.

  • cargo test --release --offline --workspace -- --test-threads=4 on e3c50c1, the same change before #2080's README-only rebase onto main f5c5bdf: 1160 passed, 0 failed, 46 ignored, with 25 skip notices across 15 tests (no native wave64, unsupported per-lane forms, no heap windows). All five dispatch_chain GPU tests ran. Four passed with their output read back: the new dispatch_chain_carries_uav_add_result_to_later_load, plus wave32_live_loops, divergent_forward_edges_3d and wave64_live_loops_and_exchange. native_wave64_builds_whole skipped its GPU part as expected on this card. The CPU refusal test passed. On bad5f04 the six dispatch_chain tests pass again.

  • AMD Radeon (native wave64) and RTX 5090, measured by @⁠nnonno91 (comment) on bad5f04 with DXC 1.8.2502: the six dispatch_chain tests pass on both. On the Radeon none skip, and the native-wave64 test checks its GPU output. On both GPUs the new atomic-add test matches all 64 expected words for the whole shader and the split chain.

  • AMD RDNA4, measured by @⁠bielfreedom (comment), RX 9070 XT, on bad5f04: on that adapter this change splits only 2 more of the title's 2,689 compute programs (462 → 464), both about 125 KB in 2 pieces, 2.7 → 2.1 s for the pair. 1ada490879c33c0e is not among them there; why hasn't been checked. The dispatch_chain and split::tests tests pass, 6 of 6, with no skips.

  • AMD Radeon RX 9070, regression pair by @⁠Toons29 (comment), Ryzen 7 7800X3D, on d43468f (this branch before the latest rebase), 60 s of a title on the default route: main 568e7db 1566 frames and this PR 1635, peak commit 14592 / 14592 MB, no crash or device removal in either.

  • cargo test --workspace -- --test-threads=4 (debug) on 655885e: 1265 passed, 0 failed, 46 ignored. 25 SKIPPED notices: no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and no heap windows. The split tests alone with the DXC 1.9 validator: 33 passed, 0 failed, 1 ignored, no skips.

  • RTX 3080 Ti, checked by @⁠thehollowedone (comment) on 655885e, DXC 1.8: 1,265 passed, 0 failed, 46 ignored. Two extra controls of theirs pass with no skips: a contended 32-lane UAV add reaches 225 with all 32 expected old values in both forms, and a loop with a UAV read keeps the whole pipeline.

  • AMD RDNA4 on Linux, tested by @⁠ClosetPie107 (comment), RX 9070 (RADV, native wave64) under Proton Experimental with vkd3d-proton, 655885e merged onto main b49be18: gpu::dxil::module::split:: 10 passed, 0 failed, 0 ignored, no skips, so the GPU dispatch-chain tests, the new atomic-add one included, ran on that card. A 300 s retail run of main b49be18 with 7 PRs stacked (this one and #1540, #1675, #1844, #1899, #2369, #2422): exit 0, 0 crashes, 0 device removals, 2,014 presents, 44,546 chained split-compute dispatches across 245 split programs. That run is of the whole stack, not of this PR alone.

Regression run

The branch was rebased onto main afc5ee8, which has #2080, #2107 and #2126. The conflicts were in split.rs and the README, both with #2107. The planner now checks this PR's polling rule first, then #2107's four-times ceiling. Both PRs' tests are kept.

scripts/smoke.ps1 -Seconds 120, the same retail title, one after the other on the machine under Tested, release builds from clean trees.

main afc5ee8 (this PR's base):

xcl-smoke v1
commit: afc5ee86ae3a9521c9f15d96505cd73fe72f2191
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 120
exit: 0x0
frames shown: 1287 (PresentX 1287)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 28897 MB

this PR, 655885e:

xcl-smoke v1
commit: 655885ec578a156bef587002e23f439722bf897f
gpu: NVIDIA GeForce RTX 5070 Ti
title: ea3b5e4d
seconds: 120
exit: 0x0
frames shown: 1320 (PresentX 1320)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 29075 MB

PR vs main: 1320 / 1287 frames (103 %), peak commit 29075 / 28897 MB (101 %); device removals 0 and crashes 0 on the PR run, 0 and 0 on main.

Both runs use XCL_DIRECT_DXIL=1 and start with the same private XCL pipeline cache, holding only the pipeline list; the driver's own cache was left alone. main now splits too, and logged compute split: 8 programs split, 42 pieces built, 52 chained dispatches issued at 120 s. This PR logged 24 programs split, 103 pieces built, 70 chained dispatches issued (0 chains by 60 s, 68 by 70 s), and neither run logged a piece ... refused warning. How far the title gets before it stops varies between runs, so the difference in split programs isn't all this change. Both runs present no frames in their last 6 s, for a reason this change doesn't touch. The log doesn't say whether 1ada490879c33c0e was among the split programs, so this run checks for regressions but doesn't show the build gain.

Not tested

  • 1ada490879c33c0e's output on the GPU with title inputs: there is no seeded input for it.
  • GPU time of the split form.
  • 64-bit atomics, and 32-bit atomics other than add (and the unused-result AND/OR #2080 already takes): they still keep the whole pipeline.
  • AMD, native wave64 on hardware, Linux.

AI use

OpenAI Codex (GPT-6) wrote the change and the tests. Claude Code (Claude Opus 5.5) helpers ran the driver timings, and Claude Code wrote this description and opened the PR.

🤖 Generated with Claude Code

**@⁠Kalmarv** on GitHub · 2026-11-25 05:23 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123) `Kalmarv:direct-split-atomic-add` → `main` · +101 −1 · 2 files · 1 commits · open Part of #1269. #2080, the split this builds on, is merged; this PR is one commit on `main` `afc5ee8`, `655885e`. It was `7f4b22d` and before that `bad5f04`, stacked on #2080. #2080 splits a program with atomics only when they are 32-bit AND or OR whose old value is unused (the sub-dword stores). It declines every other atomic. For a global (UAV) 32-bit add that is safe to cut around. The add still runs exactly once per lane, in the piece where it stands. The UAV barrier between dispatches orders it before every later piece. Its old value is a live value like any other. The title's meshlet-cull program 1ada490879c33c0e (48,191 DXIL instructions; two guest add sites, which become eight DXIL atomic adds across its heap windows) was declined for this alone. With this change it splits into 4 pieces and builds cold in 0.86 s instead of 1.93 s. **What is in it** - `crates/xcl/src/gpu/dxil/module/split.rs`: `dx.op.atomicBinOp.i32` with ADD is now admitted. Each add stays at its original site and runs once whenever control reaches it, as before. Its old value goes to later pieces in an existing continuation slot when it is live there. The rule against polling is conservative. If a program has an add and any loop (including a self-loop) contains an atomic or a raw-buffer, typed-buffer or texture load, it keeps the whole pipeline, because such a loop could poll memory the add changes. It doesn't try to prove that the load aliases the add or decides the loop's exit. - Tests: a GPU test where each lane does an add, uses its old value, and then reads the counter back 24 times in later pieces. All 64 words match the whole shader and a CPU reference: 32 counters incremented exactly once and 32 outputs that consume the old value. A CPU test checks the refusal for a program that could poll. **Tested** - Ryzen 9 9950X, RTX 5070 Ti (NVIDIA 610.74), Windows 11 build 26200, release, DXC 1.9.2609. - **Cold pipeline build of 1ada490879c33c0e** as the title emits it (the whole binary is byte-identical to the title's cache, and so are its samplers), fresh process, implicit caches off, split pieces on 16 threads: | Form | Wall | Pieces | Slowest piece | Sum of pieces | |---|---|---|---|---| | Whole | 1.93 s | 1 | | | | Split | 0.86 s | 4 | 0.86 s | 3.09 s | 2.2× faster. All 4 pieces pass the DXC 1.9 validator, and the chain uses 7,488 scratch dwords per group. - `cargo test --release --offline --workspace -- --test-threads=4` on `e3c50c1`, the same change before #2080's README-only rebase onto `main` `f5c5bdf`: 1160 passed, 0 failed, 46 ignored, with 25 skip notices across 15 tests (no native wave64, unsupported per-lane forms, no heap windows). All five `dispatch_chain` GPU tests ran. Four passed with their output read back: the new `dispatch_chain_carries_uav_add_result_to_later_load`, plus `wave32_live_loops`, `divergent_forward_edges_3d` and `wave64_live_loops_and_exchange`. `native_wave64_builds_whole` skipped its GPU part as expected on this card. The CPU refusal test passed. On `bad5f04` the six `dispatch_chain` tests pass again. - **AMD Radeon (native wave64) and RTX 5090, measured by @⁠nnonno91** ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2123)) on `bad5f04` with DXC 1.8.2502: the six `dispatch_chain` tests pass on both. On the Radeon none skip, and the native-wave64 test checks its GPU output. On both GPUs the new atomic-add test matches all 64 expected words for the whole shader and the split chain. - **AMD RDNA4, measured by @⁠bielfreedom** ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2123)), RX 9070 XT, on `bad5f04`: on that adapter this change splits only 2 more of the title's 2,689 compute programs (462 → 464), both about 125 KB in 2 pieces, 2.7 → 2.1 s for the pair. 1ada490879c33c0e is not among them there; why hasn't been checked. The `dispatch_chain` and `split::tests` tests pass, 6 of 6, with no skips. - **AMD Radeon RX 9070, regression pair by @⁠Toons29** ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2123)), Ryzen 7 7800X3D, on `d43468f` (this branch before the latest rebase), 60 s of a title on the default route: `main` `568e7db` 1566 frames and this PR 1635, peak commit 14592 / 14592 MB, no crash or device removal in either. - `cargo test --workspace -- --test-threads=4` (debug) on `655885e`: 1265 passed, 0 failed, 46 ignored. 25 SKIPPED notices: no native wave64 on this card, three per-lane FP16 forms the per-lane lowering refuses, and no heap windows. The split tests alone with the DXC 1.9 validator: 33 passed, 0 failed, 1 ignored, no skips. - **RTX 3080 Ti, checked by @⁠thehollowedone** ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2123)) on `655885e`, DXC 1.8: 1,265 passed, 0 failed, 46 ignored. Two extra controls of theirs pass with no skips: a contended 32-lane UAV add reaches 225 with all 32 expected old values in both forms, and a loop with a UAV read keeps the whole pipeline. - **AMD RDNA4 on Linux, tested by @⁠ClosetPie107** ([comment](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2123)), RX 9070 (RADV, native wave64) under Proton Experimental with vkd3d-proton, `655885e` merged onto `main` `b49be18`: `gpu::dxil::module::split::` 10 passed, 0 failed, 0 ignored, no skips, so the GPU dispatch-chain tests, the new atomic-add one included, ran on that card. A 300 s retail run of `main` `b49be18` with 7 PRs stacked (this one and #1540, #1675, #1844, #1899, #2369, #2422): exit 0, 0 crashes, 0 device removals, 2,014 presents, 44,546 chained split-compute dispatches across 245 split programs. That run is of the whole stack, not of this PR alone. **Regression run** The branch was rebased onto `main` `afc5ee8`, which has #2080, #2107 and #2126. The conflicts were in `split.rs` and the README, both with #2107. The planner now checks this PR's polling rule first, then #2107's four-times ceiling. Both PRs' tests are kept. `scripts/smoke.ps1 -Seconds 120`, the same retail title, one after the other on the machine under **Tested**, release builds from clean trees. `main` `afc5ee8` (this PR's base): ``` xcl-smoke v1 commit: afc5ee86ae3a9521c9f15d96505cd73fe72f2191 gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 120 exit: 0x0 frames shown: 1287 (PresentX 1287) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 28897 MB ``` this PR, `655885e`: ``` xcl-smoke v1 commit: 655885ec578a156bef587002e23f439722bf897f gpu: NVIDIA GeForce RTX 5070 Ti title: ea3b5e4d seconds: 120 exit: 0x0 frames shown: 1320 (PresentX 1320) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 29075 MB ``` PR vs `main`: 1320 / 1287 frames (103 %), peak commit 29075 / 28897 MB (101 %); device removals 0 and crashes 0 on the PR run, 0 and 0 on `main`. Both runs use `XCL_DIRECT_DXIL=1` and start with the same private XCL pipeline cache, holding only the pipeline list; the driver's own cache was left alone. `main` now splits too, and logged `compute split: 8 programs split, 42 pieces built, 52 chained dispatches issued` at 120 s. This PR logged `24 programs split, 103 pieces built, 70 chained dispatches issued` (0 chains by 60 s, 68 by 70 s), and neither run logged a `piece ... refused` warning. How far the title gets before it stops varies between runs, so the difference in split programs isn't all this change. Both runs present no frames in their last 6 s, for a reason this change doesn't touch. The log doesn't say whether 1ada490879c33c0e was among the split programs, so this run checks for regressions but doesn't show the build gain. **Not tested** - 1ada490879c33c0e's output on the GPU with title inputs: there is no seeded input for it. - GPU time of the split form. - 64-bit atomics, and 32-bit atomics other than add (and the unused-result AND/OR #2080 already takes): they still keep the whole pipeline. - AMD, native wave64 on hardware, Linux. **AI use** OpenAI Codex (GPT-6) wrote the change and the tests. Claude Code (Claude Opus 5.5) helpers ran the driver timings, and Claude Code wrote this description and opened the PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Keep each integer UAV add in its original block. If its old value is
live on a crossing edge, save and restore it through the existing
scalar continuation slot. The inter-dispatch UAV barrier orders later
reads. Keep programs with a potentially polling loop on one pipeline.

Exercise a returned add value and dependent reads against whole-pipeline
and CPU results, and cover the polling-loop refusal separately.

Assisted-by: OpenAI Codex (GPT-6)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:19:47 +00:00
Author
Owner

@⁠nnonno91 on GitHub · 2026-11-25 06:01 UTC · original

Independent Radeon and RTX 5090 verification of exact PR head bad5f04f2a5291c2c911cbd3368e13db204094ee.

Tested

  • Ryzen 7 9800X3D, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC, Windows SDK DXC/DXIL 1.8.2502.11, unoptimized test profile.
  • Ran cargo test --locked -p xcl --lib dispatch_chain -- --nocapture --test-threads=1 in separate processes with XCL_ADAPTER=AMD Radeon and XCL_ADAPTER=NVIDIA GeForce RTX 5090. The dispatch-chain test log confirmed both adapter selections.
  • Radeon(TM) Graphics (32.0.21042.62, XCL_REQUIRE_GPU=wave64): 6 passed, 0 failed, 0 ignored and no skips. The native-wave64 test kept its shader whole and checked its GPU output.
  • GeForce RTX 5090 (32.0.16.1742): 6 passed, 0 failed and 0 ignored, with one explicit GPU skip in that pass count. dispatch_chain_native_wave64_builds_whole skipped GPU execution with no wave64.
  • On both GPUs, the new atomic-add test matched all 64 CPU-expected words with both the whole shader and the split chain: 32 counters incremented once, and 32 outputs carried each old counter value into later dispatches. The CPU test also confirmed that the splitter declines the potential polling loop.

Not tested

Retail inputs, title smoke, compile-time or GPU timing, and the full workspace suite in this run.

AI use

OpenAI Codex (GPT-6.2 Sol) ran the tests, checked the logs and wrote this report.

**@⁠nnonno91** on GitHub · 2026-11-25 06:01 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7154366534) Independent Radeon and RTX 5090 verification of exact PR head `bad5f04f2a5291c2c911cbd3368e13db204094ee`. **Tested** - Ryzen 7 9800X3D, Windows 11 25H2 build 26200.9974, Rust 1.100.0 MSVC, Windows SDK DXC/DXIL 1.8.2502.11, unoptimized test profile. - Ran `cargo test --locked -p xcl --lib dispatch_chain -- --nocapture --test-threads=1` in separate processes with `XCL_ADAPTER=AMD Radeon` and `XCL_ADAPTER=NVIDIA GeForce RTX 5090`. The dispatch-chain test log confirmed both adapter selections. - Radeon(TM) Graphics (32.0.21042.62, `XCL_REQUIRE_GPU=wave64`): 6 passed, 0 failed, 0 ignored and no skips. The native-wave64 test kept its shader whole and checked its GPU output. - GeForce RTX 5090 (32.0.16.1742): 6 passed, 0 failed and 0 ignored, with one explicit GPU skip in that pass count. `dispatch_chain_native_wave64_builds_whole` skipped GPU execution with `no wave64`. - On both GPUs, the new atomic-add test matched all 64 CPU-expected words with both the whole shader and the split chain: 32 counters incremented once, and 32 outputs carried each old counter value into later dispatches. The CPU test also confirmed that the splitter declines the potential polling loop. **Not tested** Retail inputs, title smoke, compile-time or GPU timing, and the full workspace suite in this run. **AI use** OpenAI Codex (GPT-6.2 Sol) ran the tests, checked the logs and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 06:17 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!

**@⁠DavidM1911** on GitHub · 2026-11-25 06:17 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7154644565) 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!
Author
Owner

@⁠bielfreedom on GitHub · 2026-11-25 06:55 UTC · original

AMD RDNA4 data for #2123. On the RX 9070 XT this change splits 2 more retail compute programs (462 → 464 of 2,689). Both are about 125 KB of direct DXIL, in 2 pieces each, and build 1.3× faster split (2.7 s → 2.1 s for the pair). The PR's tests pass on this card.

Setup

  • GPU: RX 9070 XT 16 GB (RDNA4), AMD driver 32.0.32029.2010.
  • CPU and memory: Ryzen 7 7700, 32 GB RAM, Windows 11, release.
  • Build: this PR at bad5f04 (on #2080), plus the local timing patch from my #2080 report. It builds the whole DXIL, then the pieces in parallel, and times every CreateComputePipelineState.

Method

  • XCL_DIRECT_DXIL=1, default split target, XCL_PSO_DISK_CACHE=0.
  • A fresh exe name per round, since the AMD driver cache is keyed on it.
  • 2 rounds.

Results (mean of 2 rounds)

direct DXIL pieces whole split faster sum of pieces
123 KB 2 1.3 s 1.0 s 1.24× 1.3 s
127 KB 2 1.4 s 1.0 s 1.38× 1.4 s
  • All 4 whole builds and 8 piece builds succeeded.
  • Only two programs gain the split here. The description's meshlet-cull program and the larger atomic-add programs may stay whole on this adapter for another reason, or carry a polling loop. I did not check which.

Tests on this card (XCL_REQUIRE_GPU=1, XCL_ADAPTER=9070)

  • cargo test --release -p xcl --lib -- dispatch_chain split::tests --test-threads=1: 6 passed, 0 failed, no SKIPPED notices.
  • That includes dispatch_chain_carries_uav_add_result_to_later_load and dispatch_chain_declines_uav_add_with_a_polling_loop.

Not tested

  • The split programs' output on title inputs.
  • A title run.
  • RDNA2 and RDNA3.

AI use: Claude Code (Claude Opus 5.5) ran the census, timings and tests and drafted this. Counts and timings only, no game data.

**@⁠bielfreedom** on GitHub · 2026-11-25 06:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7155296528) **AMD RDNA4 data for #2123.** On the RX 9070 XT this change splits **2 more** retail compute programs (462 → 464 of 2,689). Both are about 125 KB of direct DXIL, in 2 pieces each, and build **1.3× faster split** (2.7 s → 2.1 s for the pair). The PR's tests pass on this card. **Setup** - GPU: RX 9070 XT 16 GB (RDNA4), AMD driver 32.0.32029.2010. - CPU and memory: Ryzen 7 7700, 32 GB RAM, Windows 11, release. - Build: this PR at `bad5f04` (on #2080), plus the local timing patch from my [#2080 report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2080). It builds the whole DXIL, then the pieces in parallel, and times every `CreateComputePipelineState`. **Method** - `XCL_DIRECT_DXIL=1`, default split target, `XCL_PSO_DISK_CACHE=0`. - A fresh exe name per round, since the AMD driver cache is keyed on it. - 2 rounds. **Results** (mean of 2 rounds) | direct DXIL | pieces | whole | split | faster | sum of pieces | |---:|---:|---:|---:|---:|---:| | 123 KB | 2 | 1.3 s | 1.0 s | 1.24× | 1.3 s | | 127 KB | 2 | 1.4 s | 1.0 s | 1.38× | 1.4 s | - All 4 whole builds and 8 piece builds succeeded. - Only two programs gain the split here. The description's meshlet-cull program and the larger atomic-add programs may stay whole on this adapter for another reason, or carry a polling loop. I did not check which. **Tests on this card** (`XCL_REQUIRE_GPU=1`, `XCL_ADAPTER=9070`) - `cargo test --release -p xcl --lib -- dispatch_chain split::tests --test-threads=1`: **6 passed, 0 failed**, no SKIPPED notices. - That includes `dispatch_chain_carries_uav_add_result_to_later_load` and `dispatch_chain_declines_uav_add_with_a_polling_loop`. **Not tested** - The split programs' output on title inputs. - A title run. - RDNA2 and RDNA3. AI use: Claude Code (Claude Opus 5.5) ran the census, timings and tests and drafted this. Counts and timings only, no game data.
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 07:12 UTC · original

Tested

  • Clean detached bad5f04f2a5291c2c911cbd3368e13db204094ee on Intel Arc A770 (driver 32.0.101.9175), Ryzen 7 3800X, Windows 11 25H2 (26200.9974). Rust/Cargo 1.100.0 x64 MSVC and DXC/DXIL 1.9.2609.5. Unoptimized test build, debuginfo and incremental compilation disabled.
  • Prebuilt with cargo test --locked -p xcl --lib -j 2 --no-run --message-format=json. With XCL_ADAPTER=A770, ran the Cargo-reported test executable under the Arc mutex using & $fixtureExe --exact gpu::dxil::module::split::tests::dispatch_chain_carries_uav_add_result_to_later_load --nocapture --test-threads=1. Its SHA-256 matched before and after lock acquisition and after exit.
  • 1 passed, 0 failed, 0 ignored, 0 GPU skips, 1129 filtered out, 1.83 s. The whole direct-DXIL shader and the split dispatch chain each matched all 64 CPU-expected words on one wave32 group. The 32 counters each incremented by 7 and the 32 outputs included the old counter value plus the sum of 24 later loads.

Not tested

Polling-loop refusal, other GPUs or wave modes, workspace suite, retail inputs, title smoke, and performance.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the fixture, verified the logs, and wrote this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 07:12 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7155602631) **Tested** - Clean detached `bad5f04f2a5291c2c911cbd3368e13db204094ee` on Intel Arc A770 (driver 32.0.101.9175), Ryzen 7 3800X, Windows 11 25H2 (26200.9974). Rust/Cargo 1.100.0 x64 MSVC and DXC/DXIL 1.9.2609.5. Unoptimized test build, debuginfo and incremental compilation disabled. - Prebuilt with `cargo test --locked -p xcl --lib -j 2 --no-run --message-format=json`. With `XCL_ADAPTER=A770`, ran the Cargo-reported test executable under the Arc mutex using `& $fixtureExe --exact gpu::dxil::module::split::tests::dispatch_chain_carries_uav_add_result_to_later_load --nocapture --test-threads=1`. Its SHA-256 matched before and after lock acquisition and after exit. - **1 passed, 0 failed, 0 ignored, 0 GPU skips**, 1129 filtered out, 1.83 s. The whole direct-DXIL shader and the split dispatch chain each matched all 64 CPU-expected words on one wave32 group. The 32 counters each incremented by 7 and the 32 outputs included the old counter value plus the sum of 24 later loads. **Not tested** Polling-loop refusal, other GPUs or wave modes, workspace suite, retail inputs, title smoke, and performance. **AI use** T3 Code / Codex (gpt-6.2-sol) ran the fixture, verified the logs, and wrote this report.
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 11:19 UTC · original

Regression run of d43468f3 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 568e7db7, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1566 (PresentX 1566)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14592 MB
xcl-smoke v1
commit: d43468f37d5e99c7c901ea0eec4974431be16323
gpu: AMD Radeon RX 9070
title: 34df7c50
seconds: 60
exit: 0x0
frames shown: 1635 (PresentX 1635)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14592 MB

Against the limits in CONTRIBUTING.md: 104 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.

**@⁠Toons29** on GitHub · 2026-11-25 11:19 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7160900824) Regression run of `d43468f3` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `568e7db7`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 568e7db7729c8fa6c8f0f4b32d798faaf11462bb gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1566 (PresentX 1566) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14592 MB ``` ``` xcl-smoke v1 commit: d43468f37d5e99c7c901ea0eec4974431be16323 gpu: AMD Radeon RX 9070 title: 34df7c50 seconds: 60 exit: 0x0 frames shown: 1635 (PresentX 1635) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14592 MB ``` Against the limits in CONTRIBUTING.md: 104 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; a script posted this right after the run, with both blocks exactly as printed.
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-25 13:13 UTC · original · edited 2026-11-25 15:27 UTC

Independent RTX 3080 Ti recheck of the clean 655885e rebase onto afc5ee8. Windows 11 build 26300, NVIDIA 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC and DXC 1.8.2502.11.

  • cargo build --offline --locked --workspace -j 6 passed. cargo test --offline --locked --workspace -j 6 --no-fail-fast -- --test-threads=4 --nocapture finished with 1,265 passed, 0 failed, 46 ignored. The pass count includes 26 runtime skips. Both stock atomic split tests passed.
  • The same two test-only controls from the earlier check also passed on this revision, 2/2 with zero skips. A 32-lane contended UAV add reached 225 in both the split and whole forms. Each form returned all 32 expected old values. A two-block loop with a scalar counter could split, while the control with a UAV read kept the whole shader. Command: cargo test --offline --locked -p xcl --lib -j 6 local_split_add -- --test-threads=1 --nocapture.

I also merged this head locally onto 0829441, which includes the new dispatch scratch sizing. The workspace built and reported 1,274 passed, 0 failed and 46 ignored, including 26 runtime skips. The dispatch-chain filter reported 11 passes including one native-wave64 skip. The atomic-add GPU readback and polling-loop guard both passed.

A separate test-only check called the runtime allocator on the RTX 3080 Ti. With an 8 MiB total target, three live allocations used 6, 2 and 2 MiB. The first recording reused its buffer, and after release the next recording got 4 MiB. Live scratch returned to zero once the test released all buffers. The 10 MiB peak includes the intentional 2 MiB minimum for a new recording. This was a serial allocation check, separate from the dispatch readback.

Synthetic tests only. No retail smoke or pipeline timing on this revision.

AI-assisted. Codex (GPT-6, exact variant unavailable) reran the tests and drafted this report.

**@⁠thehollowedone** on GitHub · 2026-11-25 13:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7163477521) · edited 2026-11-25 15:27 UTC Independent RTX 3080 Ti recheck of the clean [655885e](https://github.com/xcl-dev/xcl/commit/655885ec578a156bef587002e23f439722bf897f) rebase onto [afc5ee8](https://github.com/xcl-dev/xcl/commit/afc5ee86ae3a9521c9f15d96505cd73fe72f2191). Windows 11 build 26300, NVIDIA 621.35, Ryzen 7 9800X3D, Rust 1.99.1 MSVC and DXC 1.8.2502.11. - `cargo build --offline --locked --workspace -j 6` passed. `cargo test --offline --locked --workspace -j 6 --no-fail-fast -- --test-threads=4 --nocapture` finished with **1,265 passed, 0 failed, 46 ignored**. The pass count includes 26 runtime skips. Both stock atomic split tests passed. - The same two test-only controls from the earlier check also passed on this revision, **2/2 with zero skips**. A 32-lane contended UAV add reached 225 in both the split and whole forms. Each form returned all 32 expected old values. A two-block loop with a scalar counter could split, while the control with a UAV read kept the whole shader. Command: `cargo test --offline --locked -p xcl --lib -j 6 local_split_add -- --test-threads=1 --nocapture`. I also merged this head locally onto [0829441](https://github.com/xcl-dev/xcl/commit/082944135cd2b96288470a595861fa608eee08dc), which includes the new dispatch scratch sizing. The workspace built and reported **1,274 passed, 0 failed and 46 ignored**, including 26 runtime skips. The dispatch-chain filter reported 11 passes including one native-wave64 skip. The atomic-add GPU readback and polling-loop guard both passed. A separate test-only check called the runtime allocator on the RTX 3080 Ti. With an 8 MiB total target, three live allocations used 6, 2 and 2 MiB. The first recording reused its buffer, and after release the next recording got 4 MiB. Live scratch returned to zero once the test released all buffers. The 10 MiB peak includes the intentional 2 MiB minimum for a new recording. This was a serial allocation check, separate from the dispatch readback. Synthetic tests only. No retail smoke or pipeline timing on this revision. AI-assisted. Codex (GPT-6, exact variant unavailable) reran the tests and drafted this report.
Author
Owner

@⁠oni-swr on GitHub · 2026-11-25 21:39 UTC · original

AMD RDNA3 on native Windows: full suite of 655885e merged onto main 6d12f58

Test report for head 655885ec578a156bef587002e23f439722bf897f. The PR's base is older than main, so I tested the PR head merged onto main 6d12f58a (a local merge commit, no conflicts; the diff against main is only this PR's two files) and compared it with main itself.

Tested

  • AMD Radeon RX 7800 XT (RDNA3, driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 build 26200, Rust/Cargo 1.100.0 MSVC, debug (unoptimized) profile, Windows SDK DXC.
  • cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4, both trees in the same target dir, one after the other; the log shows Compiling xcl from the tested worktree.
    • main 6d12f58a: 1422 passed, 1 failed, 46 ignored.
    • PR merged onto main: 1424 passed, 1 failed, 46 ignored. The 2 extra passes are this PR's new tests.
  • Both new tests ran on the GPU and passed (neither was skipped):
    • gpu::dxil::module::split::tests::dispatch_chain_carries_uav_add_result_to_later_load
    • gpu::dxil::module::split::tests::dispatch_chain_declines_uav_add_with_a_polling_loop
  • The one failure is the same on main and on the PR: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722, res[30] = 0x1, CPU 0x7fffffff). It also fails alone on main, so it is not caused by this PR; it looks like an RDNA3-specific mismatch in the fuzz test and may deserve its own issue.
  • SKIPPED, identical on both trees: gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu and f32_programs_on_the_gpu (the f16 / f32 conversion cases refused as unsupported, 6 lines) and heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

Not tested

  • No scripts/smoke.ps1 regression run on a retail title, so there is no xcl-smoke block here.
  • No end-to-end check that real programs now split or stay whole; only the unit tests above and the existing suite.
  • Release profile, wave64-only GPUs, RDNA4.

AI use: this run and report were done by Claude Code (Claude Sonnet 5.5), driven by oni-swr. The commands and counts are from the run above, not edited by hand.

**@⁠oni-swr** on GitHub · 2026-11-25 21:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7175364337) **AMD RDNA3 on native Windows: full suite of `655885e` merged onto `main` `6d12f58`** Test report for head `655885ec578a156bef587002e23f439722bf897f`. The PR's base is older than `main`, so I tested the PR head merged onto `main` `6d12f58a` (a local merge commit, no conflicts; the diff against `main` is only this PR's two files) and compared it with `main` itself. **Tested** - AMD Radeon RX 7800 XT (RDNA3, driver 32.0.31035.1003), Ryzen 7 5700X3D, Windows 11 build 26200, Rust/Cargo 1.100.0 MSVC, debug (unoptimized) profile, Windows SDK DXC. - `cargo test --workspace --no-fail-fast -j 4 -- --test-threads=4`, both trees in the same target dir, one after the other; the log shows `Compiling xcl` from the tested worktree. - `main` `6d12f58a`: 1422 passed, 1 failed, 46 ignored. - PR merged onto `main`: 1424 passed, 1 failed, 46 ignored. The 2 extra passes are this PR's new tests. - Both new tests ran on the GPU and passed (neither was skipped): - `gpu::dxil::module::split::tests::dispatch_chain_carries_uav_add_result_to_later_load` - `gpu::dxil::module::split::tests::dispatch_chain_declines_uav_add_with_a_polling_loop` - The one failure is the same on `main` and on the PR: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (seed 722, `res[30] = 0x1, CPU 0x7fffffff`). It also fails alone on `main`, so it is not caused by this PR; it looks like an RDNA3-specific mismatch in the fuzz test and may deserve its own issue. - `SKIPPED`, identical on both trees: `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` and `f32_programs_on_the_gpu` (the f16 / f32 conversion cases refused as unsupported, 6 lines) and `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). **Not tested** - No `scripts/smoke.ps1` regression run on a retail title, so there is no `xcl-smoke` block here. - No end-to-end check that real programs now split or stay whole; only the unit tests above and the existing suite. - Release profile, wave64-only GPUs, RDNA4. **AI use**: this run and report were done by Claude Code (Claude Sonnet 5.5), driven by `oni-swr`. The commands and counts are from the run above, not edited by hand.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 01:00 UTC · original

I'm closing and reopening this right away only to get a CI run on today's main (b49be18). #2371 changed split.rs after this PR's last run, and the head 655885e still merges into b49be18 without conflicts.

AI use: Claude Code (Claude Opus 5.5) checked the merge with git merge-tree and wrote this.

**@⁠Kalmarv** on GitHub · 2026-11-26 01:00 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7179337696) I'm closing and reopening this right away only to get a CI run on today's `main` (`b49be18`). #2371 changed `split.rs` after this PR's last run, and the head `655885e` still merges into `b49be18` without conflicts. AI use: Claude Code (Claude Opus 5.5) checked the merge with `git merge-tree` and wrote this.
Author
Owner

@⁠ClosetPie107 on GitHub · 2026-11-26 06:49 UTC · original

AMD RDNA4 / Linux (Proton Experimental) test report on head 655885ec (merged cleanly onto main b49be183):

Hardware & environment

  • AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux
  • Proton Experimental (experimental-11.0-20261112), vkd3d-proton master ec207194 (3.2.0) + dxil-spirv b540c8a2 + relaxed-vtable patch (-Db_ndebug=true), DXVK v3.1.1-209, DXC 1.9.2609.5, Rust x86_64-pc-windows-gnu

Isolated unit / GPU tests (main b49be183 + #2123 655885ec, debug, --test-threads=1, WINEDLLOVERRIDES="d3d12,d3d12core=n"):

  • xcl.exe gpu::dxil::module::split:: -- --test-threads=1: 10 passed, 0 failed, 0 ignored (0 skipped — all GPU dispatch-chain tests including dispatch_chain_carries_uav_add_result_to_later_load ran on the RX 9070).

Combined 300 s retail sanity run (release, main b49be183 + #1540 + #1675 + #1844 + #1899 + #2123 + #2369 + #2422, retail 1.0.2.1 pressing A past menus):

  • Completed full 300 s (exit=0), 0 crashes, 0 device removals, 2,014 PresentX frames, 131,072 translated draws, 660,943 dispatches, 44,546 chained split-compute dispatches across 245 split programs (2,575 pieces), 102,631 Opus packets (0 errors).

Not tested

  • Native Windows, full workspace test suite, or #2123 alone in a retail run.

AI use

  • T3 Code / Antigravity (Gemini 4 Neon) merged #2123 onto main, ran the Proton GPU/unit tests and combined retail run on this machine, and drafted this report.
**@⁠ClosetPie107** on GitHub · 2026-11-26 06:49 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7184812121) AMD RDNA4 / Linux (Proton Experimental) test report on head `655885ec` (merged cleanly onto `main` `b49be183`): **Hardware & environment** - AMD Radeon RX 9070 16 GB (RDNA4, RADV GFX1201, Mesa 26.3.1, native wave64), Ryzen 5 9600X, 30 GiB RAM, CachyOS Linux - Proton Experimental (`experimental-11.0-20261112`), `vkd3d-proton` `master` `ec207194` (3.2.0) + `dxil-spirv` `b540c8a2` + relaxed-vtable patch (`-Db_ndebug=true`), DXVK `v3.1.1-209`, DXC `1.9.2609.5`, Rust `x86_64-pc-windows-gnu` **Isolated unit / GPU tests** (`main` `b49be183` + #2123 `655885ec`, debug, `--test-threads=1`, `WINEDLLOVERRIDES="d3d12,d3d12core=n"`): - `xcl.exe gpu::dxil::module::split:: -- --test-threads=1`: **10 passed, 0 failed, 0 ignored** (0 skipped — all GPU dispatch-chain tests including `dispatch_chain_carries_uav_add_result_to_later_load` ran on the RX 9070). **Combined 300 s retail sanity run** (release, `main` `b49be183` + #1540 + #1675 + #1844 + #1899 + #2123 + #2369 + #2422, retail 1.0.2.1 pressing `A` past menus): - Completed full **300 s (`exit=0`)**, **0 crashes**, **0 device removals**, `2,014` `PresentX` frames, `131,072` translated draws, `660,943` dispatches, `44,546` chained split-compute dispatches across `245` split programs (`2,575` pieces), `102,631` Opus packets (0 errors). **Not tested** - Native Windows, full workspace test suite, or #2123 alone in a retail run. **AI use** - T3 Code / Antigravity (Gemini 4 Neon) merged #2123 onto `main`, ran the Proton GPU/unit tests and combined retail run on this machine, and drafted this report.
Author
Owner

@⁠Kalmarv on GitHub · 2026-11-26 06:55 UTC · original

@⁠ClosetPie107 thank you for the RDNA4 run under Proton. It's the first one on Linux, and the 300 s retail run issued 44,546 chained dispatches with no crash or device removal. It's in the description under Tested with your name, along with the note that the retail run is of the 7-PR stack, not this PR alone.

AI use: Claude Code (Claude Opus 5.5) updated the description and wrote this.

**@⁠Kalmarv** on GitHub · 2026-11-26 06:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7184921144) @⁠ClosetPie107 thank you for the RDNA4 run under Proton. It's the first one on Linux, and the 300 s retail run issued 44,546 chained dispatches with no crash or device removal. It's in the description under **Tested** with your name, along with the note that the retail run is of the 7-PR stack, not this PR alone. AI use: Claude Code (Claude Opus 5.5) updated the description and wrote this.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 07:28 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 07:28 UTC · [original](https://github.com/xcl-dev/xcl/pull/2123#issuecomment-7185501886) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2123/head:github-bot/gh-2123'
git switch 'github-bot/gh-2123'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2123'
git switch 'github-bot/gh-2123'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2123'
git switch 'github-bot/gh-2123'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2123'
git switch 'main'
git merge --squash 'github-bot/gh-2123'
git switch 'main'
git merge --ff-only 'github-bot/gh-2123'
git switch 'main'
git merge 'github-bot/gh-2123'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.