Recompiler: compact form that emits every distinct block text once #1315

Open
github-bot wants to merge 3 commits from github-bot/gh-1315 into main AGit
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 14:39 UTC · original
CowboyBingus:recomp-compact-form → main · +1607 −2 · 4 files · 3 commits · open

A compact translation for very large compute programs whose basic blocks repeat: each distinct block text is emitted once, as a case of one dispatch loop, and a static table gives every block's case and branch offset. Part of #1269 and #505 (the 29.75 MB ActivateProbes program, see this comment).

This PR adds the form and its tests; nothing calls it yet. #1316, stacked on this one, routes compute programs to it.

Measured on an RTX 5070 Ti (driver 621.24), indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes (56c0cd3b82a00c6e, 88,863 instructions), 4 memory windows, split wave64, through XCL's own DXC path and level rule; CreateComputePipelineState with XCL's ABI root signature, no cached blob, from a new exe:

translate translate_compact
HLSL 31,028,146 B 723,453 B
DXIL 29,750,144 B 1,053,264 B
DXC 138.6 s (-O0) 12.5 s
CreateComputePipelineState killed at a 600 s cap 9.7 s

The translate column was measured on 47efa2e plus one local commit outside gpu/ (bc394e3). The 600 s run was the same DXIL (sha256 e45bc693…) on another local tree. The translate_compact column was measured on a local merge (31be310) whose compact.rs differs from this PR's in two comments.

The program has 14,378 basic blocks, and 594 distinct block bodies when branch targets are set aside. compact_wanted takes programs of 20,000 instructions or more whose distinct blocks hold under 30 % of the instructions. By a survey of the retail pack's 2,689 compute-program records (2,682 distinct programs) that applies the same rule, these are 56c0cd3b82a00c6e, 958400d2caf07244 (ActivateProbesTarget) and 95cc13288a27a96e (ActivateRays).

ActivateRays needs a 9,975-word table. The table is capped at 8,192 words: a static array is constant data for the driver, and on this GPU CreateComputePipelineState of this program's compact form with an added 12,288-word static array succeeded, and with 15,360 words failed with E_OUTOFMEMORY. So translate_compact returns an error for ActivateRays, and the caller keeps translate.

Related: #1278 and #1279 change how programs of 4 MB of DXIL or more are scheduled. This PR adds a form for two of them, and the stacked PR routes them to it.

What is in it

  • Recompiler: decode and set up the emitter in prepare(), shared by translate – gpu/recomp/mod.rs, no behaviour change. prepare also takes the HEAP_WINDOWS flag out of mem_windows, as translate did since #680, so the compact form gets the same options.
  • Recompiler: compact form that emits every distinct block text once:
    • gpu/recomp/compact.rs (new).
    • gpu/recomp/emit.rs: reset_temps, so temporaries are numbered from t1 for each instruction.
    • Block bodies are the text emit::Em produces for each instruction, as in translate; the A/B tests below compare the results.
    • Back edges spend the loop budget (65,536 per lane); once it is spent the program ends, where the structured form leaves the loop and runs what follows.
  • Tests: A/B tests of translate_compact against translate on the GPU – gpu/recomp/tests_compact.rs.
    • Each test runs the same program through both forms and compares SGPRs, SCC, VGPRs, exports and memory.
    • Each test that uses the compact form asserts it does: the HLSL differs, and the cases, blocks and shared cases are counted.
    • Programs:
      • execz nests;
      • backward loops;
      • repeated blocks;
      • split wave64 exchanges in a shared case;
      • buffer_load_format_x as its own block at several addresses, and in 12 formats;
      • far s_setpc_b64 forward and backward;
      • s_endpgm before the last block;
      • v_mul_lo_u32;
      • a loop through 4 memory windows;
      • every program again with 4 windows;
      • a compute dispatch;
      • 200 forward jumps that #1307's bound (#1321) sends to pc blocks in translate;
      • XCL_SAMPLE_BIG_CS=<code file> adds a retail program; a program translate_compact returns an error for (e.g. its table limit) is SKIPPED, and when CreateComputePipelineState fails for translate's form the A/B comparison is SKIPPED and the compact form must still compile and run.
    • Also a test that DXC compiles both forms.
    • The test file is 1,220 lines. It is not split from the form because these tests are what shows the form computes what translate does; the runtime code is about 380 lines.

Tested

  • RTX 5070 Ti (driver 621.24), AMD Ryzen 7 9800X3D, Windows 11 (10.0.26300).
  • This PR's head 0d7907b (on main 6e1e2be): cargo build --workspace and cargo build --release succeeded; cargo test -p xcl --lib compact -- --test-threads=4: 25 passed, 0 failed, 0 ignored, with gpu_compact_native_wave64_form SKIPPED (no wave64); cargo test -p xcl --lib pso:: -- --test-threads=4: 16 passed, 0 failed, 1 ignored (compile_time_bench::repeated_pso_shader_compile). The full suite was not run on this head.
  • cargo build --workspace, then cargo test --workspace --no-fail-fast -- --test-threads=4 (debug) on an earlier head of this PR, c195f07 (on main 266b845): 976 passed, 1 failed, 42 ignored (lib tests 927 / 1 / 22). The failure is hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory (kernelx.rs:2070), which fails the same way on main 930e8b4. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, gpu_compact_native_wave64_form, and 16 lines of main's lower / lower_dxil tests. SKIPPED (per-lane form refused): 3 lines of lower_dxil's f16 / f32-conversion tests. SKIPPED (no heap windows): heap_window_out_of_memory_falls_back_to_the_switch_form.

Regression run
scripts/smoke.ps1 -Game <game folder> -Seconds 60 -Title retail (release builds, menus, no input):

main:

xcl-smoke v1
commit: 6e1e2befc7430126b1e7b98b5c3fe93813c866b6
gpu: NVIDIA GeForce RTX 5070 Ti
title: retail
seconds: 60
exit: 0x0
frames shown: 1538 (PresentX 1538)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17225 MB

this PR:

xcl-smoke v1
commit: 0d7907b385de6670b1a471ee015c32464da7ae10
gpu: NVIDIA GeForce RTX 5070 Ti
title: retail
seconds: 60
exit: 0x0
frames shown: 1591 (PresentX 1591)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 17294 MB

Not tested

  • AMD, wave64 hardware (the native wave64 case skips here: no wave64), Linux / Wine.
  • A GPU A/B run of the full 88,863-instruction program: its translate form did not finish in the driver within 600 s on this GPU.
  • This PR alone in a title run (nothing calls the form yet).
  • The compact form with #680's heap windows (XCL_HEAP_WINDOWS=1): the A/B tests use the switch form.

AI use

  • Claude Code (Claude Opus 5.5) wrote the code, the tests and this description, and ran the measurements; I ran the tests and runs on my machine and checked the results.

🤖 Generated with Claude Code

**@⁠CowboyBingus** on GitHub · 2026-11-24 14:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315) `CowboyBingus:recomp-compact-form` → `main` · +1607 −2 · 4 files · 3 commits · open A compact translation for very large compute programs whose basic blocks repeat: each distinct block text is emitted once, as a case of one dispatch loop, and a static table gives every block's case and branch offset. Part of #1269 and #505 (the 29.75 MB `ActivateProbes` program, see [this comment](https://github.com/ivall/xcl/issues/505#issuecomment-7133103125)). This PR adds the form and its tests; nothing calls it yet. #1316, stacked on this one, routes compute programs to it. **Measured** on an RTX 5070 Ti (driver 621.24), `indirect_diffuse_lighting:CS_ScreenProbes_ActivateProbes` (`56c0cd3b82a00c6e`, 88,863 instructions), 4 memory windows, split wave64, through XCL's own DXC path and level rule; `CreateComputePipelineState` with XCL's ABI root signature, no cached blob, from a new exe: | | `translate` | `translate_compact` | |---|---|---| | HLSL | 31,028,146 B | 723,453 B | | DXIL | 29,750,144 B | 1,053,264 B | | DXC | 138.6 s (`-O0`) | 12.5 s | | `CreateComputePipelineState` | killed at a 600 s cap | 9.7 s | The `translate` column was measured on `47efa2e` plus one local commit outside `gpu/` (`bc394e3`). The 600 s run was the same DXIL (sha256 `e45bc693…`) on another local tree. The `translate_compact` column was measured on a local merge (`31be310`) whose `compact.rs` differs from this PR's in two comments. The program has 14,378 basic blocks, and 594 distinct block bodies when branch targets are set aside. `compact_wanted` takes programs of 20,000 instructions or more whose distinct blocks hold under 30 % of the instructions. By a survey of the retail pack's 2,689 compute-program records (2,682 distinct programs) that applies the same rule, these are `56c0cd3b82a00c6e`, `958400d2caf07244` (`ActivateProbesTarget`) and `95cc13288a27a96e` (`ActivateRays`). `ActivateRays` needs a 9,975-word table. The table is capped at 8,192 words: a static array is constant data for the driver, and on this GPU `CreateComputePipelineState` of this program's compact form with an added 12,288-word static array succeeded, and with 15,360 words failed with `E_OUTOFMEMORY`. So `translate_compact` returns an error for `ActivateRays`, and the caller keeps `translate`. Related: #1278 and #1279 change how programs of 4 MB of DXIL or more are scheduled. This PR adds a form for two of them, and the stacked PR routes them to it. **What is in it** - `Recompiler: decode and set up the emitter in prepare(), shared by translate` – `gpu/recomp/mod.rs`, no behaviour change. `prepare` also takes the `HEAP_WINDOWS` flag out of `mem_windows`, as `translate` did since #680, so the compact form gets the same options. - `Recompiler: compact form that emits every distinct block text once`: - `gpu/recomp/compact.rs` (new). - `gpu/recomp/emit.rs`: `reset_temps`, so temporaries are numbered from t1 for each instruction. - Block bodies are the text `emit::Em` produces for each instruction, as in `translate`; the A/B tests below compare the results. - Back edges spend the loop budget (65,536 per lane); once it is spent the program ends, where the structured form leaves the loop and runs what follows. - `Tests: A/B tests of translate_compact against translate on the GPU` – `gpu/recomp/tests_compact.rs`. - Each test runs the same program through both forms and compares SGPRs, SCC, VGPRs, exports and memory. - Each test that uses the compact form asserts it does: the HLSL differs, and the cases, blocks and shared cases are counted. - Programs: - execz nests; - backward loops; - repeated blocks; - split wave64 exchanges in a shared case; - `buffer_load_format_x` as its own block at several addresses, and in 12 formats; - far `s_setpc_b64` forward and backward; - `s_endpgm` before the last block; - `v_mul_lo_u32`; - a loop through 4 memory windows; - every program again with 4 windows; - a compute dispatch; - 200 forward jumps that #1307's bound (#1321) sends to `pc` blocks in `translate`; - `XCL_SAMPLE_BIG_CS=<code file>` adds a retail program; a program `translate_compact` returns an error for (e.g. its table limit) is SKIPPED, and when `CreateComputePipelineState` fails for `translate`'s form the A/B comparison is SKIPPED and the compact form must still compile and run. - Also a test that DXC compiles both forms. - The test file is 1,220 lines. It is not split from the form because these tests are what shows the form computes what `translate` does; the runtime code is about 380 lines. **Tested** - RTX 5070 Ti (driver 621.24), AMD Ryzen 7 9800X3D, Windows 11 (10.0.26300). - This PR's head `0d7907b` (on `main` `6e1e2be`): `cargo build --workspace` and `cargo build --release` succeeded; `cargo test -p xcl --lib compact -- --test-threads=4`: 25 passed, 0 failed, 0 ignored, with `gpu_compact_native_wave64_form` SKIPPED (no wave64); `cargo test -p xcl --lib pso:: -- --test-threads=4`: 16 passed, 0 failed, 1 ignored (`compile_time_bench::repeated_pso_shader_compile`). The full suite was not run on this head. - `cargo build --workspace`, then `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug) on an earlier head of this PR, `c195f07` (on `main` `266b845`): 976 passed, 1 failed, 42 ignored (lib tests 927 / 1 / 22). The failure is `hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory` (kernelx.rs:2070), which fails the same way on `main` `930e8b4`. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `gpu_compact_native_wave64_form`, and 16 lines of `main`'s `lower` / `lower_dxil` tests. SKIPPED (per-lane form refused): 3 lines of `lower_dxil`'s f16 / f32-conversion tests. SKIPPED (no heap windows): `heap_window_out_of_memory_falls_back_to_the_switch_form`. **Regression run** `scripts/smoke.ps1 -Game <game folder> -Seconds 60 -Title retail` (release builds, menus, no input): main: ``` xcl-smoke v1 commit: 6e1e2befc7430126b1e7b98b5c3fe93813c866b6 gpu: NVIDIA GeForce RTX 5070 Ti title: retail seconds: 60 exit: 0x0 frames shown: 1538 (PresentX 1538) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17225 MB ``` this PR: ``` xcl-smoke v1 commit: 0d7907b385de6670b1a471ee015c32464da7ae10 gpu: NVIDIA GeForce RTX 5070 Ti title: retail seconds: 60 exit: 0x0 frames shown: 1591 (PresentX 1591) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 17294 MB ``` **Not tested** - AMD, wave64 hardware (the native wave64 case skips here: no wave64), Linux / Wine. - A GPU A/B run of the full 88,863-instruction program: its `translate` form did not finish in the driver within 600 s on this GPU. - This PR alone in a title run (nothing calls the form yet). - The compact form with #680's heap windows (`XCL_HEAP_WINDOWS=1`): the A/B tests use the switch form. **AI use** - Claude Code (Claude Opus 5.5) wrote the code, the tests and this description, and ran the measurements; I ran the tests and runs on my machine and checked the results. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
No behaviour change: the decoding, block leaders and emitter set-up at the
start of translate() move into prepare(), so a second form of the program
(the compact form) is built from exactly the same decoded program and
emitter state.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
DXC inlines every helper of a cs_6_x target, so a retail compute shader
with thousands of equal blocks (ActivateProbes 56c0cd3b82a00c6e: 88,863
instructions, 3,281 buffer_load_format_x) becomes 29.75 MB of DXIL that
the driver needs minutes for. translate_compact() cuts the program into
blocks (leaders, plus every instruction whose HLSL exceeds 600 B on its
own), emits each instruction with emit::Em as translate() does,
temporaries numbered from t1 per instruction, and shares equal block
texts as cases of one dispatch loop. Branches go to a block at an offset
from their own (part of the text), so a static table only holds every
block's case, packed. The table is capped at 8,192 words: on an RTX 5070
Ti, CreateComputePipelineState of this program's compact form with an
added 12,288-word static array succeeded; with 15,360 words it failed
with E_OUTOFMEMORY. Back edges spend the loop budget (65,536 per lane);
once it is spent the program ends, where the structured form leaves the
loop and runs what follows. compact_wanted() picks programs of
20,000+ instructions whose distinct blocks hold under 30 % of them.
Not called yet.

Measured on 56c0cd3b82a00c6e (4 memory windows, split wave64, RTX 5070
Ti, a local merge, 31be310): 723,453 B HLSL, DXIL
1,053,264 B in 12.5 s, CreateComputePipelineState 9.7 s from a new exe
with no cached blob.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
tests_compact translates each program with translate and with
compact::translate_compact and runs both on the same inputs. The kernel
programs assert byte-identical SGPRs, SCC, VGPRs of all lanes, exports
and the split form's upper-half SGPRs, plus flat memory or the first
64 KiB of each memory window; the compute dispatch compares memory.

Programs: nested execz regions, divergent and scalar backward loops,
one block repeated at five addresses, far jumps (s_getpc_b64, add or
sub, s_setpc_b64) forward and backward, v_mul_lo_u32,
buffer_load_format_x in twelve formats and repeated as a block of its
own, a cross-lane block (ballot, readfirstlane, readlane) repeated
under four exec masks, s_endpgm before the last block, a loop through
four memory windows with loads, stores and per-lane atomics, a
compute dispatch, and 200 forward jumps that #1307's bound sends to
pc blocks in translate (gpu_compact_against_the_pc_block_fallback). The kernel programs run in each form forms() lists
for the adapter (wave64 split or native, wave32; with branches also
unstructured), and in the wave64 forms with mem_windows: 4; the
compute dispatch runs in wave64 (split where the adapter needs it) and
wave32.

Every program here except one has a branch, and the tests assert that
translate_compact gives it the compact form: they read its dispatch
loop back from the HLSL. translate_compact keeps translate's form for a
program without branches, so the two straight-line programs start with
a branch to the next instruction. For the repeated blocks, the
exchange block, the buffer loads, the window loop, the far jumps and
s_endpgm they also assert the shape: fewer cases than blocks, one case
for the four copies of the exchange block and one for the block after
the load, the load a case of its own, the far jumps' block offsets,
two program ends before the last block. The exception is the
memory-window program of gpu_memory_windows_above_4_gib (no branch):
it gets translate's form from both, so its test compares translate
with itself; the window loop runs the compact form through the
windows.

The atomics in the memory-window programs add to a dword per lane. On
an RTX 5070 Ti (split wave64, 4 windows), with all 64 lanes adding to
one dword, 40 runs of the same DXIL returned two different lane 0
values (5 and 35 runs): the split halves' atomics land in either
order.

gpu_compact_sample_big_cs (XCL_SAMPLE_BIG_CS=<code file>) runs a retail
program both ways. A program translate_compact refuses (e.g. its table
limit) is SKIPPED; when the driver cannot create translate's pipeline
(e.g. E_OUTOFMEMORY), the A/B comparison is SKIPPED and the compact
form must still compile and run.

Needs the compact backend (compact.rs and `pub mod compact`).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:50:28 +00:00
Author
Owner

@⁠ASThome00 on GitHub · 2026-11-24 14:58 UTC · original

Test report for this PR on an adapter with native 64-lane waves, which covers the test listed as skipped above.

Commit: 711897240007a7c906bd31b1bb571a15907f1269 (this PR's head, on main 930e8b4), debug build.

Hardware: AMD Radeon(TM) Graphics (integrated, Ryzen 9 7900X3D; driver 31.0.24002.92) and NVIDIA RTX 5070 Ti (driver 32.0.16.2124), 64 GB RAM, Windows 11 26300, Rust 1.100.0, DXC 1.9.2602.17.

Tested

  • XCL_ADAPTER=radeon cargo test -p xcl --lib compact -- --test-threads=4: 19 passed, 0 failed, 0 ignored, none SKIPPED. gpu_compact_native_wave64_form ran and passed; the "wave64 native" variants (also unstructured and with 4 windows) report result bytes identical to translate.
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 769 passed, 1 failed, 41 ignored. SKIPPED (no mesh shaders): gpu_geometry_mode_es_gs_strip, gpu_mesh_mode_two_passes.
    • The failure is gpu::recomp::tests::gpu_s_round_mode_controls_f16_rounding_across_modes (tests.rs:6838, lane 1 (0xbf800800) RNE: left 15360, right 48128). It fails the same way on main 930e8b4 on this adapter (2 of 2 runs), so it is not from this PR.
  • Same command on the RTX 5070 Ti: 770 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, gpu_compact_native_wave64_form.

Not tested

  • gpu_compact_sample_big_cs did nothing here (XCL_SAMPLE_BIG_CS not set).
  • No scripts/smoke.ps1 run, no DXC or driver compile times, no title run.
  • The stacked PR #1316.

AI use: Claude Code (Claude Fable 5.2) ran the tests and wrote this report.

**@⁠ASThome00** on GitHub · 2026-11-24 14:58 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315#issuecomment-7135255465) Test report for this PR on an adapter with native 64-lane waves, which covers the test listed as skipped above. **Commit:** `711897240007a7c906bd31b1bb571a15907f1269` (this PR's head, on `main` `930e8b4`), debug build. **Hardware:** AMD Radeon(TM) Graphics (integrated, Ryzen 9 7900X3D; driver 31.0.24002.92) and NVIDIA RTX 5070 Ti (driver 32.0.16.2124), 64 GB RAM, Windows 11 26300, Rust 1.100.0, DXC 1.9.2602.17. **Tested** - `XCL_ADAPTER=radeon cargo test -p xcl --lib compact -- --test-threads=4`: 19 passed, 0 failed, 0 ignored, none SKIPPED. `gpu_compact_native_wave64_form` ran and passed; the "wave64 native" variants (also unstructured and with 4 windows) report result bytes identical to `translate`. - `XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`: 769 passed, 1 failed, 41 ignored. SKIPPED (no mesh shaders): `gpu_geometry_mode_es_gs_strip`, `gpu_mesh_mode_two_passes`. - The failure is `gpu::recomp::tests::gpu_s_round_mode_controls_f16_rounding_across_modes` (tests.rs:6838, lane 1 (0xbf800800) RNE: left 15360, right 48128). It fails the same way on `main` `930e8b4` on this adapter (2 of 2 runs), so it is not from this PR. - Same command on the RTX 5070 Ti: 770 passed, 0 failed, 41 ignored. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `gpu_compact_native_wave64_form`. **Not tested** - `gpu_compact_sample_big_cs` did nothing here (`XCL_SAMPLE_BIG_CS` not set). - No `scripts/smoke.ps1` run, no DXC or driver compile times, no title run. - The stacked PR #1316. AI use: Claude Code (Claude Fable 5.2) ran the tests and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 15:34 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 21 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 15:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315#issuecomment-7136249027) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 21 ignored. Thanks!
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 17:35 UTC · original

Rebased onto main 9e3831e (after #680); the head is now 732f2ff. Two conflicts, both in gpu/recomp/mod.rs: #680's HEAP_WINDOWS handling at the start of translate now sits in prepare(), which translate and translate_compact share; and the module list keeps both mod heap_window_tests and mod tests_compact. Suite, smoke and description are updated for the new head.

AI use: Claude Code (Claude Opus 5.5) wrote this comment.

**@⁠CowboyBingus** on GitHub · 2026-11-24 17:35 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315#issuecomment-7139413914) Rebased onto `main` `9e3831e` (after #680); the head is now [`732f2ff`](https://github.com/ivall/xcl/pull/1315/commits/732f2ff8f28e9639227edde269d0f8313b7c1553). Two conflicts, both in `gpu/recomp/mod.rs`: #680's `HEAP_WINDOWS` handling at the start of `translate` now sits in `prepare()`, which `translate` and `translate_compact` share; and the module list keeps both `mod heap_window_tests` and `mod tests_compact`. Suite, smoke and description are updated for the new head. AI use: Claude Code (Claude Opus 5.5) wrote this comment.
Author
Owner

@⁠CowboyBingus on GitHub · 2026-11-24 18:52 UTC · original

Rebased onto main c160d86 (after #1426); the head is now a45ac0c. No conflicts in this PR's commits. Suite, smoke and description are updated for the new head.

AI use: Claude Code (Claude Opus 5.5) wrote this comment.

**@⁠CowboyBingus** on GitHub · 2026-11-24 18:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315#issuecomment-7141263529) Rebased onto `main` `c160d86` (after #1426); the head is now [`a45ac0c`](https://git.gtahub.st/github/xcl-dev--xcl/pulls/1315/commits/a45ac0cc6cb661b9d9c09b6fd86cfa391ae1e49a). No conflicts in this PR's commits. Suite, smoke and description are updated for the new head. AI use: Claude Code (Claude Opus 5.5) wrote this comment.
Author
Owner

@⁠thaqiart139-alt on GitHub · 2026-11-24 15:39 UTC · original · edited 2026-11-24 20:00 UTC

Edited: rerun on the current head a45ac0c (rebased onto main c160d86). The first run was on 7118972, against main 930e8b4, with the same result: all pass on both GPUs.

Test report for this PR's head a45ac0c on AMD RDNA2 with native 64-lane waves (the description's "native wave64 case skips here"), and on a 32-lane NVIDIA card.

Tested

  • GPUs: AMD Radeon(TM) Graphics, the RDNA2 iGPU of a Ryzen 7 7800X3D (native wave64, driver 32.0.21045.29003), and NVIDIA GeForce RTX 5070 (driver 32.0.16.2101). Ryzen 7 7800X3D, 32 GB, Windows 11 Home build 26300, Rust 1.100.0, debug, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0). Adapter chosen with XCL_ADAPTER=radeon / nvidia; the SKIPPED lists below show which GPU each run used.
  • cargo test --workspace -- --test-threads=4, this PR against its base:
main c160d86 this PR a45ac0c
RTX 5070 858 passed, 0 failed, 42 ignored 877 passed, 0 failed, 42 ignored
Radeon iGPU 858 passed, 0 failed, 42 ignored 877 passed, 0 failed, 42 ignored
  • All 16 tests in tests_compact.rs pass on the iGPU, gpu_compact_native_wave64_form included (it runs there; on the RTX 5070 it is SKIPPED: no wave64). gpu_compact_sample_big_cs returns at once without XCL_SAMPLE_BIG_CS, so 15 of them ran.
  • hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory, the one failure in the description, passes on both GPUs here, on c160d86 and on a45ac0c.
  • SKIPPED, the same on c160d86:
    • RTX 5070: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware and gpu_compact_native_wave64_form (no wave64); heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
    • iGPU: gpu::dxil::graphics::tests::emitted_ms_primitive_attribute_reaches_the_pixel_shader, gpu::dxil::graphics::tests::emitted_ms_ps_draw_a_triangle, gpu_geometry_mode_es_gs_strip and gpu_mesh_mode_two_passes (no mesh shaders); heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).

Not tested

  • The giant retail programs, a title run, DXC or driver timings, other AMD generations, Linux / Wine.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report.
**@⁠thaqiart139-alt** on GitHub · 2026-11-24 15:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315#issuecomment-7136401051) · edited 2026-11-24 20:00 UTC *Edited: rerun on the current head `a45ac0c` (rebased onto `main` `c160d86`). The first run was on `7118972`, against `main` `930e8b4`, with the same result: all pass on both GPUs.* Test report for this PR's head `a45ac0c` on AMD RDNA2 with native 64-lane waves (the description's "native wave64 case skips here"), and on a 32-lane NVIDIA card. **Tested** - GPUs: AMD Radeon(TM) Graphics, the RDNA2 iGPU of a Ryzen 7 7800X3D (native wave64, driver 32.0.21045.29003), and NVIDIA GeForce RTX 5070 (driver 32.0.16.2101). Ryzen 7 7800X3D, 32 GB, Windows 11 Home build 26300, Rust 1.100.0, debug, DXC 1.9.2602.17 (Windows SDK 10.0.26100.0). Adapter chosen with `XCL_ADAPTER=radeon` / `nvidia`; the SKIPPED lists below show which GPU each run used. - `cargo test --workspace -- --test-threads=4`, this PR against its base: | | `main` `c160d86` | this PR `a45ac0c` | |---|---|---| | RTX 5070 | 858 passed, 0 failed, 42 ignored | 877 passed, 0 failed, 42 ignored | | Radeon iGPU | 858 passed, 0 failed, 42 ignored | 877 passed, 0 failed, 42 ignored | - All 16 tests in `tests_compact.rs` pass on the iGPU, `gpu_compact_native_wave64_form` included (it runs there; on the RTX 5070 it is SKIPPED: no wave64). `gpu_compact_sample_big_cs` returns at once without `XCL_SAMPLE_BIG_CS`, so 15 of them ran. - `hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory`, the one failure in the description, passes on both GPUs here, on `c160d86` and on `a45ac0c`. - SKIPPED, the same on `c160d86`: - RTX 5070: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` and `gpu_compact_native_wave64_form` (no wave64); `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - iGPU: `gpu::dxil::graphics::tests::emitted_ms_primitive_attribute_reaches_the_pixel_shader`, `gpu::dxil::graphics::tests::emitted_ms_ps_draw_a_triangle`, `gpu_geometry_mode_es_gs_strip` and `gpu_mesh_mode_two_passes` (no mesh shaders); `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). **Not tested** - The giant retail programs, a title run, DXC or driver timings, other AMD generations, Linux / Wine. **AI use** - Claude Code (Claude Opus 5.5) ran the builds and tests and wrote this report.
Author
Owner

@⁠DarkPanda69 on GitHub · 2026-11-24 14:57 UTC · original · edited 2026-11-25 06:29 UTC

AMD run with 64-lane waves, where gpu_compact_native_wave64_form runs instead of skipping. Updated for head 0d7907b (earlier runs on c195f07, 7118972, d58677a, 732f2ff, a45ac0c and a940184, same result).

Tested: pass, head 0d7907b applied on main 6ea813a, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17.

cargo test -p xcl --lib -- gpu:: --test-threads=4 (now the wider gpu:: filter, which also runs the direct DXIL tests):

  • AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 604 passed, 2 failed, 22 ignored. The 2 failures are the AMD fuzz seeds 722 and 1599 tracked in #2115, which fail the same way on main without this PR. All 17 gpu_compact_* tests ok, gpu_compact_native_wave64_form and gpu_compact_against_the_pc_block_fallback included.
  • NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 606 passed, 0 failed, 22 ignored. gpu_compact_native_wave64_form SKIPPED (no wave64); the other gpu_compact_* tests ok.
  • The other SKIPPED lines (direct DXIL per-lane form refused, and no wave64 on the 3060) are the same on main without this PR.

gpu_dxil_wide_parity was not rerun for this head (3 passed, 0 SKIPPED on both GPUs at c195f07).

Not tested: the whole workspace suite; #1316 on top of this; a title; compile time of the big program.

AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.

**@⁠DarkPanda69** on GitHub · 2026-11-24 14:57 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315#issuecomment-7135230364) · edited 2026-11-25 06:29 UTC AMD run with 64-lane waves, where `gpu_compact_native_wave64_form` runs instead of skipping. Updated for head `0d7907b` (earlier runs on `c195f07`, `7118972`, `d58677a`, `732f2ff`, `a45ac0c` and `a940184`, same result). **Tested:** pass, head `0d7907b` applied on `main` `6ea813a`, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17. `cargo test -p xcl --lib -- gpu:: --test-threads=4` (now the wider `gpu::` filter, which also runs the direct DXIL tests): - AMD RX 9070 XT (RDNA4), driver 32.0.32029.2010, waves 32..64: 604 passed, 2 failed, 22 ignored. The 2 failures are the AMD fuzz seeds 722 and 1599 tracked in #2115, which fail the same way on `main` without this PR. All 17 `gpu_compact_*` tests ok, `gpu_compact_native_wave64_form` and `gpu_compact_against_the_pc_block_fallback` included. - NVIDIA RTX 3060, driver 32.0.16.1088, waves 32 only: 606 passed, 0 failed, 22 ignored. `gpu_compact_native_wave64_form` SKIPPED (no wave64); the other `gpu_compact_*` tests ok. - The other SKIPPED lines (direct DXIL per-lane form refused, and no wave64 on the 3060) are the same on `main` without this PR. `gpu_dxil_wide_parity` was not rerun for this head (3 passed, 0 SKIPPED on both GPUs at `c195f07`). **Not tested:** the whole workspace suite; #1316 on top of this; a title; compile time of the big program. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 04:47 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 04:47 UTC · [original](https://github.com/xcl-dev/xcl/pull/1315#issuecomment-7182907942) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/gpu/recomp/mod.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

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

Merge

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