Recompiler: compact cases share code whose branch targets differ #1438

Closed
Pipodi wants to merge 5 commits from upstream-pr/1448 into main
Pipodi commented 2026-11-24 16:14:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T16:14:01Z.


Stacked on #1316 (rebased here as b662d124, efc54bda, 6a3c753a, 7c52d4f6, rebased onto main d52ff48c); only the top commit (51f9a05a) belongs here. The stack now carries rebased and edited versions of #1316's commits: b662d124 (prepare() split), efc54bda (compact form), 6a3c753a (A/B tests) and 7c52d4f6 (compact backend). The edits: the conflicts against main's dispatch_remap / no_remap are resolved, efc54bda adds the test the_compact_form_keeps_the_dispatch_remap, and translate_as opens one ShaderTranslation span for the compact attempt and the normal form. #1316 itself still sits on an older main.

Why over 800 lines: the diff against main carries #1316's 4 commits (CowboyBingus's PR, open and conflicting with main), rebased with main's rt32_mask threaded through; this PR's own commit 51f9a05a is about 341 changed lines.

This revision: rebased onto main d52ff48c. In #1316's rebased backend commit (7c52d4f6) the conflicts with main are resolved: build.rs's translator sources (main's mod.rs in place of dxc.rs, with compact.rs), and in pso.rs the compact refusal tag now wraps main's compile_cached_in / compile_cached choice. main's semantic_pipeline_setting (shaders.rs) now lists XCL_COMPACT_CS (in 7c52d4f6) and XCL_COMPACT_NEST (in #1692's eb7edf38), each with a test (warm_settings_keep_compact_cs_switch, warm_settings_keep_compact_nest_switch), so both change the warm-settings key. An earlier rebase (onto 0fe06eb0) threaded main's rt32_mask through #1316's rebased commits. An earlier rebase had one conflict, a comment in gpu/recomp/pso.rs against #3243, now worded as main's ("with XCL_DIRECT_DXIL=0"). The rebase before it (with #1316's commits) resolved conflicts in gpu/recomp/pso.rs (main's XCL_DEBUG_CS_SUB and rodata changes kept together with the compact routing; XCL_DEBUG_CS_SUB forces CompactCs::Never) and in shaders.rs, and fixed two places that no longer built after it: the super::translate path and the console_translation call in targets.rs.

#1316's compact form keys a block's case on its text, and the text includes the branch offset (xcl_b ± K). So blocks with the same code but different targets get different cases. The retail title's ActivateRays (95cc13288a27a96e, 19,949 blocks) gets 11,909 cases. Its table is then over MAX_TABLE_WORDS, and the program falls back to the normal form. This PR keys a case on the block's code and branch condition, and treats the target as data:

  • One offset: a case whose blocks all jump by the same offset keeps xcl_b ± K.
  • Several offsets: otherwise, the case starts from the offset most of its blocks jump by and sets each other block's target with xcl_t = select(xcl_b == k, target, xcl_t).
  • A bound on the selects: a case evaluates at most MAX_SELECTS (32) of them. Past that, [branch] if (xcl_b < pivot) splits the list until each leaf has at most 32 (xcl_b is wave-uniform, so the branch is too). Without it, a case that 1,799 blocks share ran 1,799 selects on every visit: @milesah3ad's probe found the dispatch up to 80 % slower than on #1316 (report); on this GPU I measured 37 % (table below). Cases with 32 or fewer differing targets emit the same text as before.
  • Packing across words: with 2,516 cases (12 bits), the usual packing of two cases to a word still needs 9,975 words. A table that the usual packing puts over MAX_TABLE_WORDS is now packed across words: bits bits from bit xcl_b * bits, two reads, and one word of padding. ActivateRays fits in 7,482 words. Tables under the cap are packed as before.

compact_wanted already counted distinct texts without the branch bytes, so the same programs are routed to the compact backend. One more of them now takes the compact form instead of falling back: ActivateRays. The two others below were already compact. Part of #1269.

What is in it

  • crates/xcl/src/gpu/recomp/compact.rs:
    • cases keyed on code and condition, with per-block targets, and the bounded select list (pick_targets, MAX_SELECTS);
    • packing across words past the cap;
    • compact() takes the packing threshold, so tests can force it.
  • crates/xcl/src/gpu/recomp/tests_compact.rs:
    • Dispatch::of reads the packed table; Dispatch::target follows a case's selects and branches for one block;
    • shared_targets: the same block branches forward from one copy and backward from the other; gpu_compact_shared_targets: one case, one select, results identical to translate in every form this adapter runs;
    • many_targets: 64 copies of one block with different targets. compact_many_targets_take_a_bounded_path (CPU) checks every block reaches its target with at most MAX_SELECTS selects; it fails with the bound removed (checked by passing usize::MAX). gpu_compact_many_targets compares the results with translate;
    • gpu_compact_dense_table: the packed table gives every block the case the usual packing gives it, with results identical to translate, on 5 programs.

Tested

  • RTX 4090, driver 621.40, i9-13900K, Windows 11 Pro 10.0.26300, stable MSVC Rust (rustc 1.100.0 (0ef1bc386 2026-11-09)), debug build for the suite, release builds for the smoke runs.

  • Rebased onto main d52ff48c. The whole suite, cargo test --workspace --no-fail-fast -- --test-threads=4 (debug, RTX 4090), run on the top of the stack (#2025, a86c5f4c): 2916 passed, 1 failed, 51 ignored, 26 SKIPPED. 1 failed: gpu_direct_image_get_resinfo_d16, which fails on main d52ff48c too (broken by 43c56dce; fixed by test-only #3513).

  • The measurements below were taken at 57d7574 and not rerun.

  • SKIPPED lines of the workspace run at the stack top, deduplicated (29):

    SKIPPED gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64
    SKIPPED gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu: no wave64
    SKIPPED gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu: no wave64
    SKIPPED gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu: no wave64
    SKIPPED gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu: bridged_dpp, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu: const_mask, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))
    SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))
    SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 arithmetic, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 compares, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))
    SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 rounding, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 three-source, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 transcendentals, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: f64, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer arithmetic, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer carries, wave64: no wave64
    SKIPPED gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu: mask_ff0_flbit, wave64: no wave64
    SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64
    SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64
    SKIPPED gpu::recomp::tests_compact::gpu_compact_native_wave64_form: no wave64
    SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows
    SKIPPED hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1)
    SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): L'applicazione ha richiesto un'operazione che dipende da un componente SDK mancante o non corrispondente. (0x887A002D)
    
  • The probe (@milesah3ad's crates/xcl/examples/cmp1448.rs from a8eebfd, copied in locally, not part of this PR), release, --rounds 3600 --vary 1 --dispatch 30, median of 30 dispatches:

#1316 964f5ed this PR without the bound this PR (bound 32) bound 64
switch (--heap 0) 9.84 ms 13.52 ms 10.39 ms 10.36 ms
heap windows (--heap 1) 12.63 ms 13.41 ms 12.52 ms 12.04 ms
longest select run / [branch] if – 1,799 / 0 32 / 56 64 / 28
DXIL select / br i1 42 / 44 1,833 / 36 1,833 / 92 1,833 / 64

DXC keeps the branches. With --vary 0 (all copies share targets), the HLSL and DXIL are byte-identical with and without the bound; dispatch #1316 9.92 ms, this PR 9.88 ms.

  • xcl shaders <records> --precompile --only cs, then the same with --pipelines (release), on records of the retail title's three screen-probe programs. Each run had a fresh XCL_DXIL_CACHE and a new exe path, so the NVIDIA driver cache missed (each log: pipelines made on the GPU 1, refused 0, loaded from the driver cache 0):
program blocks cases (#1316) table words DXC DXIL driver peak private
ActivateRays 19,949 2,516 (11,909, falls back) 7,482, across words 20–24 s 2.89 MB 175, 190, 215, 233 s, made 8.08 GB
ActivateProbes 21,038 751 (906) 7,013 11.6 s 0.94 MB 12.6 s, made 1.41 GB
ActivateProbesTarget 20,972 698 (851) 6,991 22.2 s 0.85 MB 9.9 s, made 1.18 GB
  • ActivateRays's driver time and the bound: interleaved with the runs above, the same build without the bound (2.85 MB) took 162, 162, 164 and 201 s, and bound 64 took 200, 202 and 216 s. The means are 172 s (no bound), 203 s (32) and 206 s (64); the spread of each overlaps the others, so with 3–4 runs each I can't separate them. Bound 64 gives no gain in driver time and only a small one in the probe with heap windows (12.04 against 12.52 ms), so the PR keeps 32.
  • The case and table-word counts come from local builds that logged them, and the #1316 counts from 490ccbb, as in the earlier revision of this description.

Regression run

The same retail title for 60 s on both sides, RTX 4090, release builds.

main (d52ff48c):

xcl-smoke v1
commit: d52ff48caade1f5350d513bfffd370396dadfeb6
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1606 (PresentX 1606)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 22100 MB

This PR's head (51f9a05a, rebased onto main d52ff48c):

xcl-smoke v1
commit: 51f9a05ab846e2a0888295aa58c0b35c2a719ae0
gpu: NVIDIA GeForce RTX 4090
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1614 (PresentX 1614)
presents per 2 s (last 3): 60 60 61
device removals: 0
crashes: 0
peak commit: 18423 MB

Not tested

  • Whether the compact form of the retail programs gives the same results as translate on the GPU; only the small programs above were compared. translate's form of ActivateProbes (28.7 MB DXIL) was still in the driver after 33 minutes, so that comparison has no reference to run against.
  • A title run that reaches this code: 60 s of the title does not reach ActivateRays (in earlier runs neither log had a compact backend line), so the smoke pair is a regression check of the rest only.
  • A driver refusal of the compact form is not retried in the normal form (#1316 retries only a DXC refusal).
  • The direct-DXIL shortcuts on this head's default config: since #3243 made direct DXIL the default, a program that XCL_COMPACT_CS routes to the compact form goes to compile_hlsl without trying direct DXIL, so this PR's huge-program and enormous-HLSL direct shortcuts (pso.rs around lines 783 and 813, gated on !kernel::enabled()) run for those programs only with XCL_DIRECT_DXIL=0. On the 60 s smoke, peak commit is 118.3 % of main's (121 % before this rebase), under the 125 % limit. Gating the shortcuts on "direct DXIL was not tried" is left for a follow-up.
  • AMD: not tested by me. On an RX 9070 XT, @Nmopqr333 found that the AMD driver does not finish ActivateRays in this form (87 GB of private memory in about 150 s). @DTsordas reports the same driver needs over 55 GB for it as 3.3 MB of direct DXIL too.
  • Intel, wave64 hardware, Linux / vkd3d-proton. On Linux, @vitor127wt's run hit their 240 s timeout in the driver.
  • 160–230 s and 8 GB is still a long first build for one program. #1692 (stacked on this) nests the dispatch; there ActivateRays is 1.04 MB and built in 39 s in a title run on this GPU.
  • AMD / RDNA4 and wave64-only paths on this head: the suite and the smoke pair ran on the RTX 4090 only, where the 23 wave64 tests are SKIPPED.

AI use

  • Claude Code, Claude Opus 5.5 (the main session) wrote the change, the bound, the tests and this description, ran the suite, the probe and the driver timings, and did the rebases onto #1316's eb1f131 and 5328b15. A second agent of the same model reviewed the change before the bound, and another reviewed 7fadd08 with the bound and the packing across words: nothing blocking (it noted that the tests do not reach a select tree deeper than one split). Subagents on Claude Sonnet 5.5 ran the smoke pairs (the previous one included) and did earlier rebases.
  • An earlier revision: Claude Code, Claude Opus 5.5 rebased the stack (with #1316's commits) onto an earlier main, resolved the conflicts against dispatch_remap / no_remap, added the test the_compact_form_keeps_the_dispatch_remap and the span in translate_as, and ran the suite and the smoke pair on that head.
  • A later rebase onto main, the conflict resolution, the test runs and that description update were done with Claude Code (Claude Opus 5.5 orchestrating, Claude Sonnet 5.5 subagents).
  • The revision two before this one: Claude Code with Claude Opus 5.5 (the main session) did a rebase onto main and the conflict resolution, ran the suite and the smoke pair through subagents, and updated this description. A Claude Opus 5.5 reviewer agent checked the rebase (range-diff and the conflict resolutions).
  • The revision before this one: Claude Code, Claude Opus 5.5: rebased the branch, resolved the conflicts, updated this description; Claude Sonnet 5.5 subagents ran the tests and the smoke runs; a Claude Opus 5.5 reviewer agent checked the rebase (range-diff and the conflict resolution).
  • The rebase onto main 0fe06eb0: Claude Code, Claude Opus 5.5 (with subagents): the rebase, the suite and smoke runs, and this description update.
  • Rebase onto d52ff48c, counts and description update: Claude Code, Claude Opus 5.5
<!-- greyfinch-sync:ivall/xcl:issue:5475937644 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T16:14:01Z. --- Stacked on #1316 (rebased here as `b662d124`, `efc54bda`, `6a3c753a`, `7c52d4f6`, rebased onto main d52ff48c); only the top commit (`51f9a05a`) belongs here. The stack now carries rebased and edited versions of #1316's commits: `b662d124` (prepare() split), `efc54bda` (compact form), `6a3c753a` (A/B tests) and `7c52d4f6` (compact backend). The edits: the conflicts against `main`'s `dispatch_remap` / `no_remap` are resolved, `efc54bda` adds the test `the_compact_form_keeps_the_dispatch_remap`, and `translate_as` opens one `ShaderTranslation` span for the compact attempt and the normal form. #1316 itself still sits on an older `main`. Why over 800 lines: the diff against `main` carries #1316's 4 commits (CowboyBingus's PR, open and conflicting with `main`), rebased with `main`'s `rt32_mask` threaded through; this PR's own commit `51f9a05a` is about 341 changed lines. This revision: rebased onto main d52ff48c. In #1316's rebased backend commit (`7c52d4f6`) the conflicts with `main` are resolved: `build.rs`'s translator sources (`main`'s `mod.rs` in place of `dxc.rs`, with `compact.rs`), and in `pso.rs` the compact refusal tag now wraps `main`'s `compile_cached_in` / `compile_cached` choice. `main`'s `semantic_pipeline_setting` (`shaders.rs`) now lists `XCL_COMPACT_CS` (in `7c52d4f6`) and `XCL_COMPACT_NEST` (in #1692's `eb7edf38`), each with a test (`warm_settings_keep_compact_cs_switch`, `warm_settings_keep_compact_nest_switch`), so both change the warm-settings key. An earlier rebase (onto 0fe06eb0) threaded `main`'s `rt32_mask` through #1316's rebased commits. An earlier rebase had one conflict, a comment in `gpu/recomp/pso.rs` against #3243, now worded as `main`'s ("with `XCL_DIRECT_DXIL=0`"). The rebase before it (with #1316's commits) resolved conflicts in `gpu/recomp/pso.rs` (`main`'s `XCL_DEBUG_CS_SUB` and rodata changes kept together with the compact routing; `XCL_DEBUG_CS_SUB` forces `CompactCs::Never`) and in `shaders.rs`, and fixed two places that no longer built after it: the `super::translate` path and the `console_translation` call in `targets.rs`. #1316's compact form keys a block's case on its text, and the text includes the branch offset (`xcl_b ± K`). So blocks with the same code but different targets get different cases. The retail title's `ActivateRays` (`95cc13288a27a96e`, 19,949 blocks) gets 11,909 cases. Its table is then over `MAX_TABLE_WORDS`, and the program falls back to the normal form. This PR keys a case on the block's code and branch condition, and treats the target as data: - **One offset:** a case whose blocks all jump by the same offset keeps `xcl_b ± K`. - **Several offsets:** otherwise, the case starts from the offset most of its blocks jump by and sets each other block's target with `xcl_t = select(xcl_b == k, target, xcl_t)`. - **A bound on the selects:** a case evaluates at most `MAX_SELECTS` (32) of them. Past that, `[branch] if (xcl_b < pivot)` splits the list until each leaf has at most 32 (`xcl_b` is wave-uniform, so the branch is too). Without it, a case that 1,799 blocks share ran 1,799 selects on every visit: @milesah3ad's probe found the dispatch up to 80 % slower than on #1316 ([report](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7146244485)); on this GPU I measured 37 % (table below). Cases with 32 or fewer differing targets emit the same text as before. - **Packing across words:** with 2,516 cases (12 bits), the usual packing of two cases to a word still needs 9,975 words. A table that the usual packing puts over `MAX_TABLE_WORDS` is now packed across words: `bits` bits from bit `xcl_b * bits`, two reads, and one word of padding. `ActivateRays` fits in 7,482 words. Tables under the cap are packed as before. `compact_wanted` already counted distinct texts without the branch bytes, so the same programs are routed to the compact backend. One more of them now takes the compact form instead of falling back: `ActivateRays`. The two others below were already compact. Part of #1269. **What is in it** - `crates/xcl/src/gpu/recomp/compact.rs`: - cases keyed on code and condition, with per-block targets, and the bounded select list (`pick_targets`, `MAX_SELECTS`); - packing across words past the cap; - `compact()` takes the packing threshold, so tests can force it. - `crates/xcl/src/gpu/recomp/tests_compact.rs`: - `Dispatch::of` reads the packed table; `Dispatch::target` follows a case's selects and branches for one block; - `shared_targets`: the same block branches forward from one copy and backward from the other; `gpu_compact_shared_targets`: one case, one `select`, results identical to `translate` in every form this adapter runs; - `many_targets`: 64 copies of one block with different targets. `compact_many_targets_take_a_bounded_path` (CPU) checks every block reaches its target with at most `MAX_SELECTS` selects; it fails with the bound removed (checked by passing `usize::MAX`). `gpu_compact_many_targets` compares the results with `translate`; - `gpu_compact_dense_table`: the packed table gives every block the case the usual packing gives it, with results identical to `translate`, on 5 programs. **Tested** - RTX 4090, driver 621.40, i9-13900K, Windows 11 Pro 10.0.26300, stable MSVC Rust (`rustc 1.100.0 (0ef1bc386 2026-11-09)`), debug build for the suite, release builds for the smoke runs. - Rebased onto main d52ff48c. The whole suite, `cargo test --workspace --no-fail-fast -- --test-threads=4` (debug, RTX 4090), run on the top of the stack (#2025, `a86c5f4c`): **2916 passed, 1 failed, 51 ignored, 26 SKIPPED**. 1 failed: `gpu_direct_image_get_resinfo_d16`, which fails on main d52ff48c too (broken by 43c56dce; fixed by test-only #3513). - The measurements below were taken at `57d7574` and not rerun. - SKIPPED lines of the workspace run at the stack top, deduplicated (29): ``` SKIPPED gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64 SKIPPED gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu: no wave64 SKIPPED gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu: no wave64 SKIPPED gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu: no wave64 SKIPPED gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu: bridged_dpp, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu: const_mask, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's)) SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's)) SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 arithmetic, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 compares, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's)) SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 rounding, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 three-source, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 transcendentals, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: f64, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer arithmetic, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer carries, wave64: no wave64 SKIPPED gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu: mask_ff0_flbit, wave64: no wave64 SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64 SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64 SKIPPED gpu::recomp::tests_compact::gpu_compact_native_wave64_form: no wave64 SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows SKIPPED hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1) SKIPPED shaders::tests::pso_measurement_compiles_an_exact_synthetic_record: cannot disable the driver cache (Windows Developer Mode is required): L'applicazione ha richiesto un'operazione che dipende da un componente SDK mancante o non corrispondente. (0x887A002D) ``` - **The probe** (@milesah3ad's `crates/xcl/examples/cmp1448.rs` from [`a8eebfd`](https://github.com/milesah3ad/xcl/commit/a8eebfd), copied in locally, not part of this PR), release, `--rounds 3600 --vary 1 --dispatch 30`, median of 30 dispatches: | | #1316 `964f5ed` | this PR without the bound | this PR (bound 32) | bound 64 | |---|---:|---:|---:|---:| | switch (`--heap 0`) | 9.84 ms | 13.52 ms | **10.39 ms** | 10.36 ms | | heap windows (`--heap 1`) | 12.63 ms | 13.41 ms | **12.52 ms** | 12.04 ms | | longest select run / `[branch] if` | – | 1,799 / 0 | 32 / 56 | 64 / 28 | | DXIL `select` / `br i1` | 42 / 44 | 1,833 / 36 | 1,833 / 92 | 1,833 / 64 | DXC keeps the branches. With `--vary 0` (all copies share targets), the HLSL and DXIL are byte-identical with and without the bound; dispatch #1316 9.92 ms, this PR 9.88 ms. - `xcl shaders <records> --precompile --only cs`, then the same with `--pipelines` (release), on records of the retail title's three screen-probe programs. Each run had a fresh `XCL_DXIL_CACHE` and a new exe path, so the NVIDIA driver cache missed (each log: `pipelines made on the GPU 1, refused 0`, `loaded from the driver cache 0`): | program | blocks | cases (#1316) | table words | DXC | DXIL | driver | peak private | |---|---|---|---|---|---|---|---| | ActivateRays | 19,949 | **2,516** (11,909, falls back) | 7,482, across words | 20–24 s | 2.89 MB | **175, 190, 215, 233 s, made** | 8.08 GB | | ActivateProbes | 21,038 | 751 (906) | 7,013 | 11.6 s | 0.94 MB | 12.6 s, made | 1.41 GB | | ActivateProbesTarget | 20,972 | 698 (851) | 6,991 | 22.2 s | 0.85 MB | 9.9 s, made | 1.18 GB | - **`ActivateRays`'s driver time and the bound:** interleaved with the runs above, the same build without the bound (2.85 MB) took 162, 162, 164 and 201 s, and bound 64 took 200, 202 and 216 s. The means are 172 s (no bound), 203 s (32) and 206 s (64); the spread of each overlaps the others, so with 3–4 runs each I can't separate them. Bound 64 gives no gain in driver time and only a small one in the probe with heap windows (12.04 against 12.52 ms), so the PR keeps 32. - The case and table-word counts come from local builds that logged them, and the #1316 counts from `490ccbb`, as in the earlier revision of this description. **Regression run** The same retail title for 60 s on both sides, RTX 4090, release builds. main (`d52ff48c`): ``` xcl-smoke v1 commit: d52ff48caade1f5350d513bfffd370396dadfeb6 gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1606 (PresentX 1606) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 22100 MB ``` This PR's head (`51f9a05a`, rebased onto main d52ff48c): ``` xcl-smoke v1 commit: 51f9a05ab846e2a0888295aa58c0b35c2a719ae0 gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1614 (PresentX 1614) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 18423 MB ``` **Not tested** - Whether the compact form of the retail programs gives the same results as `translate` on the GPU; only the small programs above were compared. `translate`'s form of `ActivateProbes` (28.7 MB DXIL) was still in the driver after 33 minutes, so that comparison has no reference to run against. - A title run that reaches this code: 60 s of the title does not reach `ActivateRays` (in earlier runs neither log had a `compact backend` line), so the smoke pair is a regression check of the rest only. - A driver refusal of the compact form is not retried in the normal form (#1316 retries only a DXC refusal). - The direct-DXIL shortcuts on this head's default config: since #3243 made direct DXIL the default, a program that `XCL_COMPACT_CS` routes to the compact form goes to `compile_hlsl` without trying direct DXIL, so this PR's huge-program and enormous-HLSL direct shortcuts (`pso.rs` around lines 783 and 813, gated on `!kernel::enabled()`) run for those programs only with `XCL_DIRECT_DXIL=0`. On the 60 s smoke, peak commit is 118.3 % of `main`'s (121 % before this rebase), under the 125 % limit. Gating the shortcuts on "direct DXIL was not tried" is left for a follow-up. - AMD: not tested by me. On an RX 9070 XT, @Nmopqr333 [found](https://github.com/xcl-dev/xcl/issues/1269#issuecomment-7138763056) that the AMD driver does not finish `ActivateRays` in this form (87 GB of private memory in about 150 s). @DTsordas [reports](https://github.com/xcl-dev/xcl/issues/1269#issuecomment-7146202837) the same driver needs over 55 GB for it as 3.3 MB of direct DXIL too. - Intel, wave64 hardware, Linux / vkd3d-proton. On Linux, @vitor127wt's [run](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7138195091) hit their 240 s timeout in the driver. - 160–230 s and 8 GB is still a long first build for one program. #1692 (stacked on this) nests the dispatch; there `ActivateRays` is 1.04 MB and built in 39 s in a title run on this GPU. - AMD / RDNA4 and wave64-only paths on this head: the suite and the smoke pair ran on the RTX 4090 only, where the 23 wave64 tests are SKIPPED. **AI use** - Claude Code, Claude Opus 5.5 (the main session) wrote the change, the bound, the tests and this description, ran the suite, the probe and the driver timings, and did the rebases onto #1316's `eb1f131` and `5328b15`. A second agent of the same model reviewed the change before the bound, and another reviewed `7fadd08` with the bound and the packing across words: nothing blocking (it noted that the tests do not reach a select tree deeper than one split). Subagents on Claude Sonnet 5.5 ran the smoke pairs (the previous one included) and did earlier rebases. - An earlier revision: Claude Code, Claude Opus 5.5 rebased the stack (with #1316's commits) onto an earlier `main`, resolved the conflicts against `dispatch_remap` / `no_remap`, added the test `the_compact_form_keeps_the_dispatch_remap` and the span in `translate_as`, and ran the suite and the smoke pair on that head. - A later rebase onto `main`, the conflict resolution, the test runs and that description update were done with Claude Code (Claude Opus 5.5 orchestrating, Claude Sonnet 5.5 subagents). - The revision two before this one: Claude Code with Claude Opus 5.5 (the main session) did a rebase onto `main` and the conflict resolution, ran the suite and the smoke pair through subagents, and updated this description. A Claude Opus 5.5 reviewer agent checked the rebase (range-diff and the conflict resolutions). - The revision before this one: Claude Code, Claude Opus 5.5: rebased the branch, resolved the conflicts, updated this description; Claude Sonnet 5.5 subagents ran the tests and the smoke runs; a Claude Opus 5.5 reviewer agent checked the rebase (range-diff and the conflict resolution). - The rebase onto main 0fe06eb0: Claude Code, Claude Opus 5.5 (with subagents): the rebase, the suite and smoke runs, and this description update. - Rebase onto d52ff48c, counts and description update: Claude Code, Claude Opus 5.5
nnonno91 commented 2026-11-24 17:06:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T16:18:33Z.


AMD native-wave64 test report for 6c7bb05

Tested clean head 6c7bb05baa6f3bcb278f156e3473d377e42163b7 on the Ryzen 7 9800X3D’s integrated Radeon graphics. The shared-branch-target and dense-table tests produced byte-for-byte identical results to the standard translator in native wave64 and wave32, with structured and unstructured control flow. The dense-table test covered 28 entries that cross a word boundary.

Tested

  • AMD Radeon(TM) Graphics (driver 32.0.21042.62), GeForce RTX 5090 (driver 617.42), Ryzen 7 9800X3D, Windows 11 25H2 (26200.9974), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug/test profiles.
  • With XCL_ADAPTER selecting AMD, cargo build --workspace --locked and cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output passed with 775 passed, 0 failed, 41 ignored, and no reported hardware skips. The synthetic end-to-end title passed.
  • cargo test --locked -p xcl --lib gpu_compact_ -- --nocapture --test-threads=1 reported 18 passed, 0 failed, 0 ignored on each adapter. I set XCL_REQUIRE_GPU=wave64 on the AMD run. The NVIDIA run exercised split wave64 and reported one hardware skip, gpu_compact_native_wave64_form, which Cargo included in its pass count.

Not tested

  • The optional XCL_SAMPLE_BIG_CS fixture, retail shader equivalence, retail-title smoke runs, and performance. The checks above used the project’s synthetic test programs.

AI use

  • OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests and prepared this report.
<!-- greyfinch-sync:ivall/xcl:comment:7137453521 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1448#issuecomment-7137453521). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T16:18:33Z. --- ### AMD native-wave64 test report for `6c7bb05` Tested clean head `6c7bb05baa6f3bcb278f156e3473d377e42163b7` on the Ryzen 7 9800X3D’s integrated Radeon graphics. The shared-branch-target and dense-table tests produced byte-for-byte identical results to the standard translator in native wave64 and wave32, with structured and unstructured control flow. The dense-table test covered 28 entries that cross a word boundary. **Tested** - AMD Radeon(TM) Graphics (driver 32.0.21042.62), GeForce RTX 5090 (driver 617.42), Ryzen 7 9800X3D, Windows 11 25H2 (26200.9974), Rust 1.100.0 MSVC, DXC 1.8.2502.11, debug/test profiles. - With `XCL_ADAPTER` selecting AMD, `cargo build --workspace --locked` and `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` passed with **775 passed, 0 failed, 41 ignored**, and no reported hardware skips. The synthetic end-to-end title passed. - `cargo test --locked -p xcl --lib gpu_compact_ -- --nocapture --test-threads=1` reported **18 passed, 0 failed, 0 ignored** on each adapter. I set `XCL_REQUIRE_GPU=wave64` on the AMD run. The NVIDIA run exercised split wave64 and reported one hardware skip, `gpu_compact_native_wave64_form`, which Cargo included in its pass count. **Not tested** - The optional `XCL_SAMPLE_BIG_CS` fixture, retail shader equivalence, retail-title smoke runs, and performance. The checks above used the project’s synthetic test programs. **AI use** - OpenAI Codex (GPT-6, exact model variant unavailable) ran the tests and prepared this report.
t4l03 commented 2026-11-24 17:06:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T16:22:59Z.


Thanks for posting the exact stack. I tested the ActivateRays output from clean head 6c7bb05baa6f3bcb278f156e3473d377e42163b7 on the RTX 4070 Ti. This adds a lower-memory-budget data point for the four-switch-window form.

Tested

  • Windows 11 build 26300, Ryzen 7 7800X3D, RTX 4070 Ti driver 617.14, DXC/validator 1.9.2609.5.
  • An external release extractor called this head's translate_compact on the retail record with four switch windows and the original compute interface and static samplers. It emitted 2,516 cases and 2,275,162 B HLSL. An independent count found 10,096 target overrides. DXC cs_6_6 -HV 2021 -O1 took 18.64 s and emitted 2,848,780 B DXIL, which passed validation.
  • Two serial runs of that DXIL through the same standalone XCL compute ABI probe, each with an empty XCL cache and a distinct helper executable name. NVIDIA's global cache stayed enabled. Both crossed the harness's 6 GiB process-commit cap and were stopped, at 103.32 s / 6.116 GiB and 81.88 s / 6.101 GiB. Neither wrote a blob.

Not tested

  • Completion with a higher memory limit, game dispatch or device removal in the title. The harness stopped the two builds before the driver returned a pipeline. I’m preparing matched window-lowering comparisons against this exact output.

AI use

Codex via T3 Code (gpt-6.2-sol) pinned the head, wrote the external extractor, ran these checks and wrote the report. No game data or generated shaders attached.

<!-- greyfinch-sync:ivall/xcl:comment:7137576773 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1448#issuecomment-7137576773). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T16:22:59Z. --- Thanks for posting the exact stack. I tested the `ActivateRays` output from clean head `6c7bb05baa6f3bcb278f156e3473d377e42163b7` on the RTX 4070 Ti. This adds a lower-memory-budget data point for the four-switch-window form. **Tested** - Windows 11 build 26300, Ryzen 7 7800X3D, RTX 4070 Ti driver 617.14, DXC/validator 1.9.2609.5. - An external release extractor called this head's `translate_compact` on the retail record with four switch windows and the original compute interface and static samplers. It emitted 2,516 cases and 2,275,162 B HLSL. An independent count found 10,096 target overrides. DXC `cs_6_6 -HV 2021 -O1` took 18.64 s and emitted 2,848,780 B DXIL, which passed validation. - Two serial runs of that DXIL through the same standalone XCL compute ABI probe, each with an empty XCL cache and a distinct helper executable name. NVIDIA's global cache stayed enabled. Both crossed the harness's 6 GiB process-commit cap and were stopped, at 103.32 s / 6.116 GiB and 81.88 s / 6.101 GiB. Neither wrote a blob. **Not tested** - Completion with a higher memory limit, game dispatch or device removal in the title. The harness stopped the two builds before the driver returned a pipeline. I’m preparing matched window-lowering comparisons against this exact output. **AI use** Codex via T3 Code (`gpt-6.2-sol`) pinned the head, wrote the external extractor, ran these checks and wrote the report. No game data or generated shaders attached.
vitor127wt commented 2026-11-24 17:06:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by vitor127wt on 2026-11-24T16:46:49Z.


Linux / Wine test of ActivateRays at 6c7bb05

I tested clean head 6c7bb05baa6f3bcb278f156e3473d377e42163b7 in a Windows MSVC release cross-build. The isolated Series 1.0.2.1 CS_ScreenProbes_ActivateRays record (15ec6daefb19a780 in XCL) took the compact route with XCL_COMPACT_CS=auto. Translation and DXC took 12.0 s with 1 compiled and 0 errors. The outputs were 2,275,162 B HLSL and 2,848,780 B DXIL, the same sizes reported in the exact-head Windows test. Windows comparison

Cold PSO with precompiled DXIL Result Peak RSS
Default structurizer 240 s timeout, exit 124 584.2 MiB
Legacy structurizer 240 s timeout, exit 124 583.5 MiB

I ran xcl shaders <isolated folder> --precompile --only cs --windows 4 --split 1 and then the same command with --pipelines in a fresh process for each mode. One DXC worker and one PSO worker, XCL PSO and vkd3d-proton and NVIDIA disk caches disabled, and an 8 GiB cgroup with no swap. The PSO runs used VKD3D_CONFIG=pipeline_library_log and VKD3D_CONFIG=legacy_structurizer,pipeline_library_log. Both logged an empty pipeline cache and shader hash cc7047005a5c7dca. The cached DXIL SHA-256 was unchanged.

RTX 5070 Ti (16 GB), NVIDIA Linux driver 620.73.04, Ryzen 7 9700X, CachyOS x86-64 kernel 7.3.5-2-cachyos, Wine 11.22, vkd3d-proton ec20719452e916b with dxil-spirv 7c04863, Windows DXC 1.9.2609.5. This is one offline PSO attempt per mode, without shader dispatch or a title run. Earlier Wine result for the same shader with #1316 and #1321

AI use — Codex (GPT-6 family, exact variant unavailable) cross-built the exact head, ran the measurements, and drafted this report.

<!-- greyfinch-sync:ivall/xcl:comment:7138195091 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1448#issuecomment-7138195091). Originally posted by [vitor127wt](https://github.com/vitor127wt) on 2026-11-24T16:46:49Z. --- **Linux / Wine test of `ActivateRays` at `6c7bb05`** I tested clean head `6c7bb05baa6f3bcb278f156e3473d377e42163b7` in a Windows MSVC release cross-build. The isolated Series 1.0.2.1 `CS_ScreenProbes_ActivateRays` record (`15ec6daefb19a780` in XCL) took the compact route with `XCL_COMPACT_CS=auto`. Translation and DXC took **12.0 s** with 1 compiled and 0 errors. The outputs were **2,275,162 B HLSL** and **2,848,780 B DXIL**, the same sizes reported in the exact-head Windows test. [Windows comparison](https://github.com/ivall/xcl/pull/1448#issuecomment-7137576773) | Cold PSO with precompiled DXIL | Result | Peak RSS | | --- | --- | ---: | | Default structurizer | 240 s timeout, exit 124 | 584.2 MiB | | Legacy structurizer | 240 s timeout, exit 124 | 583.5 MiB | I ran `xcl shaders <isolated folder> --precompile --only cs --windows 4 --split 1` and then the same command with `--pipelines` in a fresh process for each mode. One DXC worker and one PSO worker, XCL PSO and vkd3d-proton and NVIDIA disk caches disabled, and an 8 GiB cgroup with no swap. The PSO runs used `VKD3D_CONFIG=pipeline_library_log` and `VKD3D_CONFIG=legacy_structurizer,pipeline_library_log`. Both logged an empty pipeline cache and shader hash `cc7047005a5c7dca`. The cached DXIL SHA-256 was unchanged. RTX 5070 Ti (16 GB), NVIDIA Linux driver `620.73.04`, Ryzen 7 9700X, CachyOS x86-64 kernel `7.3.5-2-cachyos`, Wine 11.22, vkd3d-proton `ec20719452e916b` with dxil-spirv `7c04863`, Windows DXC `1.9.2609.5`. This is one offline PSO attempt per mode, without shader dispatch or a title run. [Earlier Wine result for the same shader with #1316 and #1321](https://github.com/ivall/xcl/pull/1316#issuecomment-7135712638) **AI use** — Codex (GPT-6 family, exact variant unavailable) cross-built the exact head, ran the measurements, and drafted this report.
Pipodi commented 2026-11-24 17:06:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T16:46:52Z.


@t4l03 thanks, that is a bigger lever than the one I was measuring. On an RTX 4090, a build of the same ActivateRays input that drops all 10,096 overrides (wrong output, a ceiling only) cuts the DXIL by only 6 % (2,848,780 → 2,672,544 B, DXC 21–25 s → 14 s). Together with your grouping result, the overrides look like a small part of the cost; sharing immediates goes at the case count itself. The driver timing of that ceiling build is not run yet.

Two points before anyone writes it:

  • The table cap. 10,455 routing words is over the compact form's MAX_TABLE_WORDS = 8,192 (compact.rs:27-31). The comment there says CreateComputePipelineState took 12,288 words on an RTX 5070 Ti and failed with E_OUTOFMEMORY at 15,360, for a single array. It is not known whether the limit is per array or for all static data together, which decides whether your parameter arrays fit.
  • Who writes it. Do you plan to open this as a PR stacked on #1448? If not, I can write it on top of #1448, with a GPU test per substituted operand kind, after you say so; I'd rather not have two versions.

AI use: Claude Code (Claude Opus 5.5) wrote this comment; the 4090 numbers come from its own DXC runs on 98191af, a local build of #1448 with the overrides removed.

<!-- greyfinch-sync:ivall/xcl:comment:7138196521 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1448#issuecomment-7138196521). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T16:46:52Z. --- @t4l03 thanks, that is a bigger lever than the one I was measuring. On an RTX 4090, a build of the same `ActivateRays` input that drops all 10,096 overrides (wrong output, a ceiling only) cuts the DXIL by only 6 % (2,848,780 → 2,672,544 B, DXC 21–25 s → 14 s). Together with your grouping result, the overrides look like a small part of the cost; sharing immediates goes at the case count itself. The driver timing of that ceiling build is not run yet. Two points before anyone writes it: - **The table cap.** 10,455 routing words is over the compact form's `MAX_TABLE_WORDS` = 8,192 (`compact.rs:27-31`). The comment there says `CreateComputePipelineState` took 12,288 words on an RTX 5070 Ti and failed with `E_OUTOFMEMORY` at 15,360, for a single array. It is not known whether the limit is per array or for all static data together, which decides whether your parameter arrays fit. - **Who writes it.** Do you plan to open this as a PR stacked on #1448? If not, I can write it on top of #1448, with a GPU test per substituted operand kind, after you say so; I'd rather not have two versions. **AI use:** Claude Code (Claude Opus 5.5) wrote this comment; the 4090 numbers come from its own DXC runs on `98191af`, a local build of #1448 with the overrides removed.
t4l03 commented 2026-11-24 17:06:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T16:45:36Z.


Immediate-operand sharing follow-up on exact #1448 input

I used the ActivateRays HLSL emitted by 6c7bb05baa6f3bcb278f156e3473d377e42163b7 as input to a local prototype. Sharing case templates that differ at supported unsigned literal positions reduced the case count from 2,516 to 1,214. Decode-and-substitute matched all 19,949 input block bodies and their target expressions. The additional parameter arrays and repacked dispatch table take 11,078 routing words, up from 7,482. The emitted prototype retained 12-bit case IDs. Using 11 bits would bring the projected total to 10,455 words.

RTX 4070 Ti driver 617.14, Windows 11 26300, Ryzen 7 7800X3D, DXC/validator 1.9.2609.5, -O1. Same standalone compute ABI probe and static samplers, separate empty XCL caches and executable names. NVIDIA global DXCache stayed enabled.

Four-window form DXIL PSO wall time Peak process commit
#1448 + switches 2,848,780 B stopped at cap twice 6.116 / 6.101 GiB
#1448 + #680 heap 2,560,312 B 81.49 / 78.11 s 4.340 / 4.338 GiB
Immediate sharing + switches 1,802,576 B 68.40 / 61.10 s 3.384 / 3.379 GiB
Immediate sharing + #680 heap 1,548,804 B 26.79 / 25.47 s 1.428 / 1.427 GiB

The immediate-sharing variants passed DXIL validation and each successful run saved a driver blob. The combined form uses the accessor block emitted by the local #1448 + #680 stack and the immediate-sharing dispatcher. Compared with heap windows alone it cut mean wall time and peak commit by about 67% each. The exact baseline and combined form each hit the 6 GiB process cap in a separate one-run check on the 7800X3D's AMD iGPU, with no blob.

I also tried grouping existing overrides by absolute target without adding tables. The mapping still matched all 10,096 overrides, and the code emitted 5,208 selects. DXIL grew to 2,868,640 B and the first NVIDIA run hit the 6 GiB cap, so I set that form aside.

This is a local compilation and pipeline-creation result. Compatibility of the extra static data, runtime heap binding, and retail dispatch output are still open.

AI use: GLM-5.3 via T3 Code built and tested the local HLSL adapter. Codex via T3 Code (gpt-6.2-sol) verified the artifacts, ran the capped PSO checks and wrote this report. The prototype stays local.

<!-- greyfinch-sync:ivall/xcl:comment:7138163239 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1448#issuecomment-7138163239). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T16:45:36Z. --- **Immediate-operand sharing follow-up on exact #1448 input** I used the `ActivateRays` HLSL emitted by `6c7bb05baa6f3bcb278f156e3473d377e42163b7` as input to a local prototype. Sharing case templates that differ at supported unsigned literal positions reduced the case count from 2,516 to 1,214. Decode-and-substitute matched all 19,949 input block bodies and their target expressions. The additional parameter arrays and repacked dispatch table take 11,078 routing words, up from 7,482. The emitted prototype retained 12-bit case IDs. Using 11 bits would bring the projected total to 10,455 words. RTX 4070 Ti driver 617.14, Windows 11 26300, Ryzen 7 7800X3D, DXC/validator 1.9.2609.5, `-O1`. Same standalone compute ABI probe and static samplers, separate empty XCL caches and executable names. NVIDIA global DXCache stayed enabled. | Four-window form | DXIL | PSO wall time | Peak process commit | |---|---:|---|---| | #1448 + switches | 2,848,780 B | stopped at cap twice | 6.116 / 6.101 GiB | | #1448 + #680 heap | 2,560,312 B | 81.49 / 78.11 s | 4.340 / 4.338 GiB | | Immediate sharing + switches | 1,802,576 B | 68.40 / 61.10 s | 3.384 / 3.379 GiB | | Immediate sharing + #680 heap | 1,548,804 B | 26.79 / 25.47 s | 1.428 / 1.427 GiB | The immediate-sharing variants passed DXIL validation and each successful run saved a driver blob. The combined form uses the accessor block emitted by the local #1448 + #680 stack and the immediate-sharing dispatcher. Compared with heap windows alone it cut mean wall time and peak commit by about 67% each. The exact baseline and combined form each hit the 6 GiB process cap in a separate one-run check on the 7800X3D's AMD iGPU, with no blob. I also tried grouping existing overrides by absolute target without adding tables. The mapping still matched all 10,096 overrides, and the code emitted 5,208 selects. DXIL grew to 2,868,640 B and the first NVIDIA run hit the 6 GiB cap, so I set that form aside. This is a local compilation and pipeline-creation result. Compatibility of the extra static data, runtime heap binding, and retail dispatch output are still open. **AI use:** GLM-5.3 via T3 Code built and tested the local HLSL adapter. Codex via T3 Code (`gpt-6.2-sol`) verified the artifacts, ran the capped PSO checks and wrote this report. The prototype stays local.
Pipodi commented 2026-11-24 17:06:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T16:54:20Z.


@t4l03 understood, it's yours; I've stopped my side of it. When you have a branch, I can run its GPU equivalence tests and a --pipelines timing of ActivateRays on an RTX 4090 with driver 617.42, in both window forms.

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

<!-- greyfinch-sync:ivall/xcl:comment:7138388044 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1448#issuecomment-7138388044). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T16:54:20Z. --- @t4l03 understood, it's yours; I've stopped my side of it. When you have a branch, I can run its GPU equivalence tests and a `--pipelines` timing of `ActivateRays` on an RTX 4090 with driver 617.42, in both window forms. **AI use:** Claude Code (Claude Opus 5.5) wrote this comment.
t4l03 commented 2026-11-24 17:06:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T16:52:46Z.


Thanks for checking the override cost and raising the table limit. I’m taking the immediate-sharing follow-up for now, so please hold off on a parallel implementation. I’m starting with the routing-data budget and GPU equivalence before deciding what is ready to stack on #1448.

The measured layout used 11,078 routing words in four arrays: 7,482 case words and 2,660, 624 and 312 parameter words. The 10,455-word figure was a projection using narrower case IDs.

For provenance, Codex (gpt-6.2-sol) planned and reviewed the experiments and ran the GPU pipeline benchmarks. GLM-5.3 wrote the local HLSL prototype. Any further implementation from my side will be written with GPT and will credit the prototype as prior work.

11-bit follow-up: Codex (gpt-6.2-sol) wrote and ran a scratch repacker on the combined heap variant. All 19,949 case IDs matched independently after repacking. The 10,455-word layout passed DXIL validation and built twice on the same RTX 4070 Ti, in 23.94 / 23.71 s at 1.425 GiB peak process commit in both runs. Both saved a 1,252,974-byte driver blob. The same isolated XCL cache setup was used, with NVIDIA global DXCache enabled. This removes 623 routing words from the measured 12-bit form. The total still exceeds 8,192 words, and retail dispatch correctness is still open.

<!-- greyfinch-sync:ivall/xcl:comment:7138347900 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1448#issuecomment-7138347900). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T16:52:46Z. --- Thanks for checking the override cost and raising the table limit. I’m taking the immediate-sharing follow-up for now, so please hold off on a parallel implementation. I’m starting with the routing-data budget and GPU equivalence before deciding what is ready to stack on #1448. The measured layout used 11,078 routing words in four arrays: 7,482 case words and 2,660, 624 and 312 parameter words. The 10,455-word figure was a projection using narrower case IDs. For provenance, Codex (gpt-6.2-sol) planned and reviewed the experiments and ran the GPU pipeline benchmarks. GLM-5.3 wrote the local HLSL prototype. Any further implementation from my side will be written with GPT and will credit the prototype as prior work. **11-bit follow-up:** Codex (gpt-6.2-sol) wrote and ran a scratch repacker on the combined heap variant. All 19,949 case IDs matched independently after repacking. The 10,455-word layout passed DXIL validation and built twice on the same RTX 4070 Ti, in 23.94 / 23.71 s at 1.425 GiB peak process commit in both runs. Both saved a 1,252,974-byte driver blob. The same isolated XCL cache setup was used, with NVIDIA global DXCache enabled. This removes 623 routing words from the measured 12-bit form. The total still exceeds 8,192 words, and retail dispatch correctness is still open.
mastrr9 commented 2026-11-24 17:06:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by mastrr9 on 2026-11-24T17:05:39Z.


Verified head 6c7bb05baa6f3bcb278f156e3473d377e42163b7 on Windows 11 / NVIDIA RTX 5080 (Blackwell, split-wave64):

  • cargo test -p xcl --lib -- gpu::recomp --test-threads=4: 213 passed, 0 failed, 18 ignored (0 new compiler warnings).

Clean pass on RTX 5080.

<!-- greyfinch-sync:ivall/xcl:comment:7138674541 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7138674541). Originally posted by [mastrr9](https://github.com/mastrr9) on 2026-11-24T17:05:39Z. --- Verified head `6c7bb05baa6f3bcb278f156e3473d377e42163b7` on Windows 11 / NVIDIA RTX 5080 (Blackwell, split-wave64): - `cargo test -p xcl --lib -- gpu::recomp --test-threads=4`: **213 passed, 0 failed, 18 ignored** (0 new compiler warnings). Clean pass on RTX 5080.
t4l03 commented 2026-11-24 18:08:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T17:16:23Z.


@Pipodi the GPT-written Rust follow-up is available in #1548. The version tested here was stacked on your then-current #1448 head. Set XCL_COMPACT_IMMEDIATES=1 to try it with the usual xcl shaders … --precompile --only cs --pipelines command. XCL_COMPACT_CS still controls eligibility and the translated cache has a separate _ci entry.

On ActivateRays it emits 2,281 cases (was 2,516), with 7,482 dispatch words and 708 operand words. An independent decode check matched all 19,949 emitted block bodies and branch mappings. The synthetic GPU equivalence test passed on RTX 4070 Ti and AMD iGPU with native or split wave64 as available: cargo test --locked -p xcl --lib gpu_compact_immediates_match_translate -- --nocapture.

On the 4070 Ti (617.14), the new output with #680's heap accessors built twice in 64.76 / 63.26 s at 3.509 / 3.492 GiB. The matching #1448 + #680 control was 81.49 / 78.11 s at 4.340 / 4.338 GiB. The new switch form still hit the 6 GiB process cap in one run. These were standalone PSOs with separate XCL caches and NVIDIA global DXCache enabled. The 4090 comparison you offered would be useful, particularly the switch form. The heap arm needs #680 on top of this stack.

AI use: Codex (gpt-6.2-sol) wrote and tested the Rust implementation and wrote this report. The earlier GLM-5.3 HLSL prototype motivated the work.

<!-- greyfinch-sync:ivall/xcl:comment:7138945922 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7138945922). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T17:16:23Z. --- @Pipodi the GPT-written Rust follow-up is available in #1548. The version tested here was stacked on your then-current #1448 head. Set `XCL_COMPACT_IMMEDIATES=1` to try it with the usual `xcl shaders … --precompile --only cs --pipelines` command. `XCL_COMPACT_CS` still controls eligibility and the translated cache has a separate `_ci` entry. On `ActivateRays` it emits 2,281 cases (was 2,516), with 7,482 dispatch words and 708 operand words. An independent decode check matched all 19,949 emitted block bodies and branch mappings. The synthetic GPU equivalence test passed on RTX 4070 Ti and AMD iGPU with native or split wave64 as available: `cargo test --locked -p xcl --lib gpu_compact_immediates_match_translate -- --nocapture`. On the 4070 Ti (617.14), the new output with #680's heap accessors built twice in 64.76 / 63.26 s at 3.509 / 3.492 GiB. The matching #1448 + #680 control was 81.49 / 78.11 s at 4.340 / 4.338 GiB. The new switch form still hit the 6 GiB process cap in one run. These were standalone PSOs with separate XCL caches and NVIDIA global DXCache enabled. The 4090 comparison you offered would be useful, particularly the switch form. The heap arm needs #680 on top of this stack. **AI use:** Codex (`gpt-6.2-sol`) wrote and tested the Rust implementation and wrote this report. The earlier GLM-5.3 HLSL prototype motivated the work.
kesku commented 2026-11-24 18:08:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by kesku on 2026-11-24T17:19:23Z.


This gets ActivateRays (95cc13288a27a96e) compiling on my 5080 now!!

With #1316 the table needed 9,975 words and fell back to the old translator. With 6c7bb05 it builds to 2.85 MB of DXIL, the driver accepts it, and the next run no longer waits on that pipeline.

Tested on b7aa9f3 with #1316 and local storage/scheduling changes. Driver 621.01, DXC 1.9.2602.17 :)

<!-- greyfinch-sync:ivall/xcl:comment:7139020458 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7139020458). Originally posted by [kesku](https://github.com/kesku) on 2026-11-24T17:19:23Z. --- This gets `ActivateRays` (`95cc13288a27a96e`) compiling on my 5080 now!! With #1316 the table needed 9,975 words and fell back to the old translator. With `6c7bb05` it builds to 2.85 MB of DXIL, the driver accepts it, and the next run no longer waits on that pipeline. Tested on `b7aa9f3` with #1316 and local storage/scheduling changes. Driver 621.01, DXC 1.9.2602.17 :)
imnicho commented 2026-11-24 18:08:59 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by imnicho on 2026-11-24T17:21:50Z.


Test report at 6c7bb05 from a small machine (4 cores, 16 GB RAM): 15ec6daefb19a780 takes the compact form, its pipeline is built inside a title run, and the process no longer runs out of commit. This is the follow-up to my report on #1316 (https://github.com/ivall/xcl/pull/1316#issuecomment-7136355438), where that program's fallback ended every run.

Tested

  • NVIDIA GeForce RTX 5080 16 GB (driver 610.47, 32-lane waves), Intel Core i7-7700K (4 cores / 8 threads), 16 GB RAM, commit limit 64 GB, Windows 10 22H2 (19045), DXC 1.9.2602.17, rustc 1.100.0, release.
  • Tree: main b7aa9f3 + #266 + #684 + #1288 + #680 (heap windows on, so sizes differ a little from the switch form's), and this PR at 6c7bb05 merged into it. One conflict, with #680 in gpu/recomp/mod.rs, resolved by hand as before.
  • The retail title of #505, one 900 s run, XCL_NETWORK=0, scripted pad, binds waiting (no XCL_PSO_WAIT_MS), XCL_COMPACT_CS unset, inside a job with a 50 GB commit cap, on the cache folder of the earlier runs.
#1316 at 5e312d5 (the earlier report) this PR at 6c7bb05
15ec6daefb19a780 (76,699 instructions) refused (9,975-word table), translated as before compact form, 2,269,990 B of HLSL
DXC for it – about 40 s (translated at 21.3 s of the run, its DXIL in the cache at 61 s)
its pipeline – 2,560,316 B of DXIL, 175.8 s in the driver, done at 238.8 s of the run
process commit to the cap: 50.2 GB at 100 s 28.8 to 29.6 GB from 120 s to the end
end of the run 0xc0000409 at 125.8 s, before the world's set-up running at the 900 s limit; world set-up at 108.2 s, 0 dispatches skipped
  • d122faa48eb0afdc (88,863 instructions) also takes the compact form here, at 733,609 B of HLSL.
  • The 175.8 s are with the title's other builds beside it on four cores, so they say little about the driver alone.
  • After both programs the title was still waiting for other pipelines (25 builds of 10 s or more in this run) and presented no frame of the world, so I cannot say anything about the output of either compact program in the title.

Not tested

  • The same without #680; DXC and the driver alone for this program; AMD; Windows 11.

AI use

  • Claude Code with Claude Fable 5.2 ran the build and the run on the machine named and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7139081585 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7139081585). Originally posted by [imnicho](https://github.com/imnicho) on 2026-11-24T17:21:50Z. --- **Test report at `6c7bb05` from a small machine (4 cores, 16 GB RAM): `15ec6daefb19a780` takes the compact form, its pipeline is built inside a title run, and the process no longer runs out of commit.** This is the follow-up to my report on #1316 (https://github.com/ivall/xcl/pull/1316#issuecomment-7136355438), where that program's fallback ended every run. **Tested** - NVIDIA GeForce RTX 5080 16 GB (driver 610.47, 32-lane waves), Intel Core i7-7700K (4 cores / 8 threads), 16 GB RAM, commit limit 64 GB, Windows 10 22H2 (19045), DXC 1.9.2602.17, rustc 1.100.0, release. - Tree: `main` `b7aa9f3` + #266 + #684 + #1288 + #680 (heap windows on, so sizes differ a little from the switch form's), and this PR at `6c7bb05` merged into it. One conflict, with #680 in `gpu/recomp/mod.rs`, resolved by hand as before. - The retail title of #505, one 900 s run, `XCL_NETWORK=0`, scripted pad, binds waiting (no `XCL_PSO_WAIT_MS`), `XCL_COMPACT_CS` unset, inside a job with a 50 GB commit cap, on the cache folder of the earlier runs. | | #1316 at `5e312d5` (the earlier report) | this PR at `6c7bb05` | |---|---|---| | `15ec6daefb19a780` (76,699 instructions) | refused (9,975-word table), translated as before | compact form, 2,269,990 B of HLSL | | DXC for it | – | about 40 s (translated at 21.3 s of the run, its DXIL in the cache at 61 s) | | its pipeline | – | 2,560,316 B of DXIL, 175.8 s in the driver, done at 238.8 s of the run | | process commit | to the cap: 50.2 GB at 100 s | 28.8 to 29.6 GB from 120 s to the end | | end of the run | `0xc0000409` at 125.8 s, before the world's set-up | running at the 900 s limit; world set-up at 108.2 s, 0 dispatches skipped | - `d122faa48eb0afdc` (88,863 instructions) also takes the compact form here, at 733,609 B of HLSL. - The 175.8 s are with the title's other builds beside it on four cores, so they say little about the driver alone. - After both programs the title was still waiting for other pipelines (25 builds of 10 s or more in this run) and presented no frame of the world, so I cannot say anything about the output of either compact program in the title. **Not tested** - The same without #680; DXC and the driver alone for this program; AMD; Windows 11. **AI use** - Claude Code with Claude Fable 5.2 ran the build and the run on the machine named and wrote this report.
t4l03 commented 2026-11-24 18:09:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T17:23:44Z.


Quick status on the test branch after the repository transfer: GitHub’s API still shows the test branch on the fork, but Git fetches of both the fork and xcl-dev/xcl currently return HTTP 403 with a repository-disabled message. The branch may be unavailable to clone for now. The release CLI check and both 60-second smoke runs are complete. I’m keeping the patch ready while Git access and draft PR creation are blocked.

<!-- greyfinch-sync:ivall/xcl:comment:7139128659 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7139128659). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T17:23:44Z. --- Quick status on the test branch after the repository transfer: GitHub’s API still shows the test branch on the fork, but Git fetches of both the fork and `xcl-dev/xcl` currently return HTTP 403 with a repository-disabled message. The branch may be unavailable to clone for now. The release CLI check and both 60-second smoke runs are complete. I’m keeping the patch ready while Git access and draft PR creation are blocked.
Pipodi commented 2026-11-24 18:09:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T17:26:34Z.


@t4l03 the 4090 run of 235a71f. Your switch form was the one you asked about; it gets 1.4 GB smaller here, but not faster.

Tested: RTX 4090 24 GB, driver 617.42, 32 GB RAM, Windows 11 Pro (26300), release build. Tree: 235a71f merged locally with #680's final head deb4b92 (local 5e48c35; I resolved two conflicts in recomp/mod.rs by hand: both test modules kept, and the heap-window normalisation of Options at the top of prepare). xcl shaders <pack> --precompile --only cs --pipelines on ActivateRays (95cc13288a27a96e) alone, a new XCL cache per arm. NVIDIA's global DXCache is on: an arm whose DXIL was built before on this machine comes back from it in about 1 s, so the controls are my earlier cold runs. One run per arm.

Arm HLSL DXIL DXC + driver Peak private
XCL_COMPACT_IMMEDIATES=1 + XCL_HEAP_WINDOWS=1 2.19 MB 2.38 MB 113.5 s 3.55 GB
#1448 6c7bb05 + #680 95f34c1, heap (earlier cold run) 2.27 MB 2.56 MB 127.1 s (20.5 + 106.6) 4.37 GB
XCL_COMPACT_IMMEDIATES=1, switch form 2.19 MB 2.67 MB 194.6 s 6.81 GB
#1448 6c7bb05, switch form (earlier cold runs) 2.28 MB 2.85 MB 170–199 s 8.2 GB
  • Both immediate-sharing arms logged (immediate sharing) and made the pipeline, with 0 refused. DXC took about 20 s in each.
  • Heap form: about 11 % less total time and 19 % less peak memory. With one sample, the time difference is within what I saw between runs before (170–199 s for the same switch-form DXIL).
  • Switch form: 17 % less peak memory, and the time is inside the earlier range. It did not hit a cap here; the process passed 6 GiB, so a 6 GiB limit would have stopped it.
  • cargo test --release -p xcl --lib gpu_compact_immediates_match_translate -- --test-threads=4 on this tree: 1 passed, 0 failed, not skipped.

Not tested: repeat runs (needed before the time difference means anything), the full suite on this tree, a title run, AMD.

{"campaign": 1269, "task": "M5", "class": "nv-win", "gpu": "RTX 4090", "driver": "617.42", "commit": "235a71f", "local_patches": ["merge of #680 deb4b92 (local 5e48c35)"], "scenario": "ActivateRays 95cc13288a27a96e, xcl shaders --precompile --only cs --pipelines, cold", "runs": 1, "measurements": [{"what": "imm_heap_total_s", "value": 113.5, "unit": "s"}, {"what": "imm_heap_peak_gb", "value": 3.55, "unit": "GB"}, {"what": "imm_heap_dxil_mb", "value": 2.38, "unit": "MB"}, {"what": "imm_switch_total_s", "value": 194.6, "unit": "s"}, {"what": "imm_switch_peak_gb", "value": 6.81, "unit": "GB"}, {"what": "imm_switch_dxil_mb", "value": 2.67, "unit": "MB"}]}

AI use: Claude Code (Claude Opus 5.5) ran the builds and measurements and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7139200552 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7139200552). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T17:26:34Z. --- @t4l03 the 4090 run of `235a71f`. Your switch form was the one you asked about; it gets 1.4 GB smaller here, but not faster. **Tested:** RTX 4090 24 GB, driver 617.42, 32 GB RAM, Windows 11 Pro (26300), release build. Tree: `235a71f` merged locally with #680's final head `deb4b92` (local `5e48c35`; I resolved two conflicts in `recomp/mod.rs` by hand: both test modules kept, and the heap-window normalisation of `Options` at the top of `prepare`). `xcl shaders <pack> --precompile --only cs --pipelines` on `ActivateRays` (`95cc13288a27a96e`) alone, a new XCL cache per arm. NVIDIA's global DXCache is on: an arm whose DXIL was built before on this machine comes back from it in about 1 s, so the controls are my earlier cold runs. **One run per arm.** | Arm | HLSL | DXIL | DXC + driver | Peak private | |---|---|---|---|---| | `XCL_COMPACT_IMMEDIATES=1` + `XCL_HEAP_WINDOWS=1` | 2.19 MB | 2.38 MB | 113.5 s | 3.55 GB | | #1448 `6c7bb05` + #680 `95f34c1`, heap (earlier cold run) | 2.27 MB | 2.56 MB | 127.1 s (20.5 + 106.6) | 4.37 GB | | `XCL_COMPACT_IMMEDIATES=1`, switch form | 2.19 MB | 2.67 MB | 194.6 s | 6.81 GB | | #1448 `6c7bb05`, switch form (earlier cold runs) | 2.28 MB | 2.85 MB | 170–199 s | 8.2 GB | - Both immediate-sharing arms logged `(immediate sharing)` and made the pipeline, with 0 refused. DXC took about 20 s in each. - Heap form: about 11 % less total time and 19 % less peak memory. With one sample, the time difference is within what I saw between runs before (170–199 s for the same switch-form DXIL). - Switch form: 17 % less peak memory, and the time is inside the earlier range. It did not hit a cap here; the process passed 6 GiB, so a 6 GiB limit would have stopped it. - `cargo test --release -p xcl --lib gpu_compact_immediates_match_translate -- --test-threads=4` on this tree: 1 passed, 0 failed, not skipped. **Not tested:** repeat runs (needed before the time difference means anything), the full suite on this tree, a title run, AMD. ```xcl-result {"campaign": 1269, "task": "M5", "class": "nv-win", "gpu": "RTX 4090", "driver": "617.42", "commit": "235a71f", "local_patches": ["merge of #680 deb4b92 (local 5e48c35)"], "scenario": "ActivateRays 95cc13288a27a96e, xcl shaders --precompile --only cs --pipelines, cold", "runs": 1, "measurements": [{"what": "imm_heap_total_s", "value": 113.5, "unit": "s"}, {"what": "imm_heap_peak_gb", "value": 3.55, "unit": "GB"}, {"what": "imm_heap_dxil_mb", "value": 2.38, "unit": "MB"}, {"what": "imm_switch_total_s", "value": 194.6, "unit": "s"}, {"what": "imm_switch_peak_gb", "value": 6.81, "unit": "GB"}, {"what": "imm_switch_dxil_mb", "value": 2.67, "unit": "MB"}]} ``` AI use: Claude Code (Claude Opus 5.5) ran the builds and measurements and wrote this report.
t4l03 commented 2026-11-24 18:09:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T17:29:19Z.


Thanks for running both forms. The switch result is a useful cross-check: it completed above our 6 GiB cap, used less commit than your earlier control, and stayed within its timing range. I’ve added the 4090 result to the draft with the historical-control caveat. Git access has recovered and the tested fork SHA still matches.

<!-- greyfinch-sync:ivall/xcl:comment:7139269254 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7139269254). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T17:29:19Z. --- Thanks for running both forms. The switch result is a useful cross-check: it completed above our 6 GiB cap, used less commit than your earlier control, and stayed within its timing range. I’ve added the 4090 result to the draft with the historical-control caveat. Git access has recovered and the tested fork SHA still matches.
DavidM1911 commented 2026-11-24 19:07:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:54:15Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7141314062 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7141314062). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T18:54:15Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** — needs a rebase before it can be tested.
Pipodi commented 2026-11-24 19:07:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T18:55:34Z.


@DavidM1911 thanks. #1316 was rebased onto main c160d86, and #1448 is now rebased onto it: head b370923 (on #1316 5749171), no conflicts. The suite passed on the same files: 884 passed, 0 failed, 42 ignored, on the RTX 4090. A new smoke pair against c160d86 is running, and the description gets updated with it.

AI use: Claude Code (Claude Opus 5.5) did the rebase and wrote this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7141344953 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7141344953). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T18:55:34Z. --- @DavidM1911 thanks. #1316 was rebased onto `main` `c160d86`, and #1448 is now rebased onto it: head `b370923` (on #1316 `5749171`), no conflicts. The suite passed on the same files: 884 passed, 0 failed, 42 ignored, on the RTX 4090. A new smoke pair against `c160d86` is running, and the description gets updated with it. **AI use:** Claude Code (Claude Opus 5.5) did the rebase and wrote this reply.
t4l03 commented 2026-11-24 19:07:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T18:55:34Z.


@Pipodi #1316 is now mergeable at 5749171. I’ll rebase #1548 and rerun its GPU tests and smoke check once #1448 is restacked, so the 3060 Ti retest can also use your updated head.

<!-- greyfinch-sync:ivall/xcl:comment:7141345053 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7141345053). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T18:55:34Z. --- @Pipodi #1316 is now mergeable at `5749171`. I’ll rebase #1548 and rerun its GPU tests and smoke check once #1448 is restacked, so the 3060 Ti retest can also use your updated head.
Pipodi commented 2026-11-24 19:07:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T18:56:33Z.


@t4l03 it is restacked: #1448's head is b370923, on #1316 5749171. Nothing in #1448's own commit changed from 4cbb6b6, so #1548 should rebase onto it without trouble.

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

<!-- greyfinch-sync:ivall/xcl:comment:7141367783 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7141367783). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T18:56:33Z. --- @t4l03 it is restacked: #1448's head is `b370923`, on #1316 `5749171`. Nothing in #1448's own commit changed from `4cbb6b6`, so #1548 should rebase onto it without trouble. **AI use:** Claude Code (Claude Opus 5.5) wrote this reply.
WillyboPeep commented 2026-11-24 21:09:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by WillyboPeep on 2026-11-24T20:13:00Z.


Test report: b370923 with #1321 on an RTX 4090, XCL_HEAP_WINDOWS=1. Both screen-probe programs the title uses are built and kept, and a title run loads them from the driver cache in 0.2 – 0.3 s. The world load still ends at the title's watchdog, now behind the other pipelines being built. Counts and timings only.

Setup: NVIDIA GeForce RTX 4090 (driver 621.01, 32-lane waves), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust 1.98.1 MSVC, release, DXC 1.9.2602.17, retail 1.0.2.1. Tree: main 9039900 + this PR (b370923, with #1316 / #1315) + #1321 (0936337, its head when I built; it is at 69a892c now) + two approved VFS / script PRs (#1170, #1229). XCL_HEAP_WINDOWS=1 throughout.

  • #1321 with this stack: the merge conflicts in recomp/mod.rs. After #1316's prepare() split, #1321's let program = code; belongs at the top of translate; git put it in prepare, where nothing uses it, and translate then does not build. With that line moved it builds.
  • cargo test --release -p xcl --lib -- --test-threads=4 on that tree: 836 passed, 0 failed, 22 ignored. SKIPPED: gpu_compact_native_wave64_form (no wave64).

The two programs offline: xcl shaders <pack> --precompile --only cs --pipelines, limited by a local filter to the title's used-pipelines.txt, everything else already in the driver cache, one driver compile at a time.

DXIL (compact form, heap windows) CreateComputePipelineState process private bytes
ActivateProbes (56c0cd3b82a00c6e) 872 716 B 10.8 s 2.6 GB when done
ActivateRays (95cc13288a27a96e) 2 560 316 B 69.4 s 5.2 GB at 60 s, 4.8 GB when done

Your 199.3 s for ActivateRays on a 4090 above was without heap windows, as far as I can tell. ActivateProbesTarget is not in this title's used-pipelines.txt here, so it was not built.

A title run on that cache: A pressed every 4 s from 15 s, page file grown beforehand.

  • Both programs came from the driver's blob, built by the preload at 4.4 s: 159 ms and 314 ms.
  • 863 compute pipelines, 834 of them from kept blobs; none of the others took 0.1 s.
  • Commit stayed at or under 31.5 GB (no #1307 growth with #1321).
  • Presents per 2 s: 60 from 40 to 60 s, 20 at 80 s, 0 from about 100 s. The title's watchdog (+0x23cf683) came at 116.9 s.
  • At 100 s the render thread waited in bind::execute_indirect → pso_async::resolve_wait, with 4 threads in DXC and 6 in nvgpucomp64.dll while graphics pipelines were being built (the 2001st at 109 s).
  • For comparison, the same tree without this PR and #1321, on the same cache with the preload off (because of #1307): the watchdog came at 106.9 s, the render thread in the same wait from about 77 s, one worker in nvgpucomp64.dll. One run each, so the times say little; what changed is that the screen-probe programs are no longer what is waited for.

Not tested: a title run of this PR without #1321 or without heap windows; ActivateProbesTarget; AMD.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs on my PC and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7143203236 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7143203236). Originally posted by [WillyboPeep](https://github.com/WillyboPeep) on 2026-11-24T20:13:00Z. --- **Test report: `b370923` with #1321 on an RTX 4090, `XCL_HEAP_WINDOWS=1`. Both screen-probe programs the title uses are built and kept, and a title run loads them from the driver cache in 0.2 – 0.3 s. The world load still ends at the title's watchdog, now behind the other pipelines being built.** Counts and timings only. **Setup:** NVIDIA GeForce RTX 4090 (driver 621.01, 32-lane waves), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 26300, Rust 1.98.1 MSVC, release, DXC 1.9.2602.17, retail 1.0.2.1. Tree: `main` `9039900` + this PR (`b370923`, with #1316 / #1315) + #1321 (`0936337`, its head when I built; it is at `69a892c` now) + two approved VFS / script PRs (#1170, #1229). `XCL_HEAP_WINDOWS=1` throughout. - **#1321 with this stack:** the merge conflicts in `recomp/mod.rs`. After #1316's `prepare()` split, #1321's `let program = code;` belongs at the top of `translate`; git put it in `prepare`, where nothing uses it, and `translate` then does not build. With that line moved it builds. - `cargo test --release -p xcl --lib -- --test-threads=4` on that tree: 836 passed, 0 failed, 22 ignored. SKIPPED: `gpu_compact_native_wave64_form` (no wave64). **The two programs offline:** `xcl shaders <pack> --precompile --only cs --pipelines`, limited by a local filter to the title's `used-pipelines.txt`, everything else already in the driver cache, one driver compile at a time. | | DXIL (compact form, heap windows) | `CreateComputePipelineState` | process private bytes | |---|---|---|---| | ActivateProbes (`56c0cd3b82a00c6e`) | 872 716 B | 10.8 s | 2.6 GB when done | | ActivateRays (`95cc13288a27a96e`) | 2 560 316 B | 69.4 s | 5.2 GB at 60 s, 4.8 GB when done | Your 199.3 s for ActivateRays on a 4090 above was without heap windows, as far as I can tell. ActivateProbesTarget is not in this title's `used-pipelines.txt` here, so it was not built. **A title run on that cache:** A pressed every 4 s from 15 s, page file grown beforehand. - Both programs came from the driver's blob, built by the preload at 4.4 s: 159 ms and 314 ms. - 863 compute pipelines, 834 of them from kept blobs; none of the others took 0.1 s. - Commit stayed at or under 31.5 GB (no #1307 growth with #1321). - Presents per 2 s: 60 from 40 to 60 s, 20 at 80 s, 0 from about 100 s. The title's watchdog (`+0x23cf683`) came at 116.9 s. - At 100 s the render thread waited in `bind::execute_indirect` → `pso_async::resolve_wait`, with 4 threads in DXC and 6 in `nvgpucomp64.dll` while graphics pipelines were being built (the 2001st at 109 s). - For comparison, the same tree without this PR and #1321, on the same cache with the preload off (because of #1307): the watchdog came at 106.9 s, the render thread in the same wait from about 77 s, one worker in `nvgpucomp64.dll`. One run each, so the times say little; what changed is that the screen-probe programs are no longer what is waited for. **Not tested:** a title run of this PR without #1321 or without heap windows; ActivateProbesTarget; AMD. **AI use:** Claude Code (Claude Opus 5.5) ran the builds and runs on my PC and wrote this report.
Pipodi commented 2026-11-24 21:09:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T20:13:22Z.


@WillyboPeep thanks. You're right: my 199.3 s for ActivateRays was without heap windows. With them and this PR, 69.4 s at 4.8 GB on the same GPU is a useful number. Two notes:

  • The title runs past both screen-probe programs and stops on graphics pipelines being built. So that stop is a separate problem from this PR's.
  • #1692 (the two-level dispatch, XCL_COMPACT_NEST=32, on top of this PR) cut the same program to 31.8 s in the driver on @brothernog's RTX 3050 in the heap form. If you rerun, it is one variable away.

This PR is rebased onto #1316's new head (f207df1). The new head goes up once its suite and smoke runs are done, so your b370923 result stays on the record for the old head.

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

<!-- greyfinch-sync:ivall/xcl:comment:7143211807 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7143211807). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T20:13:22Z. --- @WillyboPeep thanks. You're right: my 199.3 s for ActivateRays was without heap windows. With them and this PR, 69.4 s at 4.8 GB on the same GPU is a useful number. Two notes: - The title runs past both screen-probe programs and stops on graphics pipelines being built. So that stop is a separate problem from this PR's. - #1692 (the two-level dispatch, `XCL_COMPACT_NEST=32`, on top of this PR) cut the same program to 31.8 s in the driver on @brothernog's RTX 3050 in the heap form. If you rerun, it is one variable away. This PR is rebased onto #1316's new head (`f207df1`). The new head goes up once its suite and smoke runs are done, so your `b370923` result stays on the record for the old head. **AI use:** Claude Code (Claude Opus 5.5) wrote this reply.
Pipodi commented 2026-11-24 21:09:25 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T20:20:44Z.


Rebased onto #1316's new head f207df1 (on main 85e3826, after #1524). The new head is 42b2f11. The commit's patch is the same as b370923's; only the base moved.

  • On the RTX 4090, the whole suite gave 901 passed, 0 failed, 42 ignored.
  • The smoke run against main 85e3826 reached 98.6 % of main's frames and 96.6 % of its peak commit, with no crash or device removal.

The description has the new counts and both blocks. The new pso_measurement_compiles_an_exact_synthetic_record test from #1524 is SKIPPED here, because it needs Windows Developer Mode.

AI use: Claude Code (Claude Opus 5.5) rebased and wrote this comment. A Claude Sonnet 5.5 subagent ran the suite and the smoke runs.

<!-- greyfinch-sync:ivall/xcl:comment:7143401162 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7143401162). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T20:20:44Z. --- Rebased onto #1316's new head `f207df1` (on `main` `85e3826`, after #1524). The new head is `42b2f11`. The commit's patch is the same as `b370923`'s; only the base moved. - On the RTX 4090, the whole suite gave 901 passed, 0 failed, 42 ignored. - The smoke run against `main` `85e3826` reached 98.6 % of `main`'s frames and 96.6 % of its peak commit, with no crash or device removal. The description has the new counts and both blocks. The new `pso_measurement_compiles_an_exact_synthetic_record` test from #1524 is SKIPPED here, because it needs Windows Developer Mode. **AI use:** Claude Code (Claude Opus 5.5) rebased and wrote this comment. A Claude Sonnet 5.5 subagent ran the suite and the smoke runs.
milesah3ad commented 2026-11-24 21:09:43 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by milesah3ad on 2026-11-24T20:52:56Z.


A synthetic case that this change makes slower to run, not only bigger: when many blocks of one case jump by a minority offset, the per-block select chain grows with the program, and since it sits inside the case, it runs every time the case does. On an RTX 5080 that cost +80 % GPU time on the larger program. The suite passes.

Setup: RTX 5080 16 GB, driver 621.24, Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, rustc 1.100.0, DXC 1.9.2609.5. This commit at b370923 (same patch as 42b2f11) against its base, #1316 5749171; release for the probe, debug for the suite.

Probe: cmp1448 (a8eebfd, local tooling, not for merging) calls compact::translate_compact on a synthetic program (128 threads, wave64 + split wave64, 4 windows). Every round is the same code (an LCG step, a load + store, then an if header: v_cmp / s_and_saveexec / s_cbranch_execz). The header jumps over a one-block body in even rounds and a three-block body (a nested if) in odd rounds, so identical headers jump by two different block counts. It's deliberately adversarial: half of that case's blocks are at the minority offset. compact_wanted is true for both sizes.

Tested

  • cargo build --workspace then cargo test --workspace --no-fail-fast -- --test-threads=4 on b370923: 884 passed, 0 failed, 42 ignored. SKIPPED: gpu_compact_native_wave64_form and the two wave64-only tests (no wave64), and heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Control (--vary 0, every header jumps the same way, 32k / 65k instructions): byte-identical DXIL on #1316 and here, both forms.
  • --vary 1:
rounds (instructions) cases #1316 → here xcl_t = select lines HLSL KB DXIL KB (switch / heap) cold driver s (switch / heap, 3 salts) GPU ms, 64 groups (switch / heap)
1,800 (37,809) 8 → 7 0 → 899 57 → 106 13 → 29 / 12 → 28 0.06 → 0.12 / 0.05 → 0.12 4.05 → 4.38 (+8 %) / 3.97 → 4.28 (+8 %)
3,600 (75,609) 8 → 7 0 → 1,799 64 → 164 18 → 51 / 17 → 50 0.06 → 0.19 / 0.06 → 0.23 8.11 → 14.63 (+80 %) / 7.94 → 14.42 (+82 %)
  • The GPU times are medians of 30 dispatches through runner::dispatch_timed, 2 salted variants each. Min and max are within 0.3 % of the median. #1316's time doubles with the program (4.05 → 8.11 ms); this commit's grows 3.3× (4.38 → 14.63 ms).
  • The driver times are small in absolute terms here, but they grow with the select count (2–4× on the bigger program).

Reading: for the retail programs in the description, this is a win (ActivateRays becomes buildable). The cost shows up when a case has many blocks at minority offsets: one select per such block, all evaluated on every execution of the case. Counting the xcl_t = select lines per case in ActivateRays' HLSL would show whether retail programs get near this. If they can, a cap on the minority blocks per case (above it, keep the targets apart as #1316 did) or the target in the block table instead of a select chain would bound it.

Not tested

  • Retail programs or a title run. I didn't check this probe's results for correctness (the PR's GPU parity tests cover that). Other GPUs.
  • How many minority-offset blocks the retail programs actually have.

AI use

  • Claude Code (Claude Opus 5.5) ran the builds, tests and measurements and wrote this report; I checked the numbers against the logs.
<!-- greyfinch-sync:ivall/xcl:comment:7144181868 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7144181868). Originally posted by [milesah3ad](https://github.com/milesah3ad) on 2026-11-24T20:52:56Z. --- A synthetic case that this change makes slower to run, not only bigger: when many blocks of one case jump by a minority offset, the per-block `select` chain grows with the program, and since it sits inside the case, it runs every time the case does. On an RTX 5080 that cost +80 % GPU time on the larger program. The suite passes. **Setup:** RTX 5080 16 GB, driver 621.24, Ryzen 7 9800X3D, 64 GB, Windows 11 Pro 26300, rustc 1.100.0, DXC 1.9.2609.5. This commit at `b370923` (same patch as `42b2f11`) against its base, #1316 `5749171`; release for the probe, debug for the suite. **Probe:** [`cmp1448`](https://github.com/milesah3ad/xcl/blob/compact-probe/crates/xcl/examples/cmp1448.rs) (`a8eebfd`, local tooling, not for merging) calls `compact::translate_compact` on a synthetic program (128 threads, wave64 + split wave64, 4 windows). Every round is the same code (an LCG step, a load + store, then an `if` header: `v_cmp` / `s_and_saveexec` / `s_cbranch_execz`). The header jumps over a one-block body in even rounds and a three-block body (a nested `if`) in odd rounds, so identical headers jump by two different block counts. It's deliberately adversarial: half of that case's blocks are at the minority offset. `compact_wanted` is true for both sizes. **Tested** - `cargo build --workspace` then `cargo test --workspace --no-fail-fast -- --test-threads=4` on `b370923`: **884 passed, 0 failed, 42 ignored**. SKIPPED: `gpu_compact_native_wave64_form` and the two wave64-only tests (no wave64), and `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - Control (`--vary 0`, every header jumps the same way, 32k / 65k instructions): **byte-identical DXIL** on #1316 and here, both forms. - `--vary 1`: | rounds (instructions) | cases #1316 → here | `xcl_t = select` lines | HLSL KB | DXIL KB (switch / heap) | cold driver s (switch / heap, 3 salts) | GPU ms, 64 groups (switch / heap) | |---|---|---:|---|---|---|---| | 1,800 (37,809) | 8 → 7 | 0 → 899 | 57 → 106 | 13 → 29 / 12 → 28 | 0.06 → 0.12 / 0.05 → 0.12 | 4.05 → 4.38 (+8 %) / 3.97 → 4.28 (+8 %) | | 3,600 (75,609) | 8 → 7 | 0 → 1,799 | 64 → 164 | 18 → 51 / 17 → 50 | 0.06 → 0.19 / 0.06 → 0.23 | 8.11 → 14.63 (**+80 %**) / 7.94 → 14.42 (**+82 %**) | - The GPU times are medians of 30 dispatches through `runner::dispatch_timed`, 2 salted variants each. Min and max are within 0.3 % of the median. #1316's time doubles with the program (4.05 → 8.11 ms); this commit's grows 3.3× (4.38 → 14.63 ms). - The driver times are small in absolute terms here, but they grow with the select count (2–4× on the bigger program). **Reading:** for the retail programs in the description, this is a win (ActivateRays becomes buildable). The cost shows up when a case has many blocks at minority offsets: one `select` per such block, all evaluated on every execution of the case. Counting the `xcl_t = select` lines per case in `ActivateRays`' HLSL would show whether retail programs get near this. If they can, a cap on the minority blocks per case (above it, keep the targets apart as #1316 did) or the target in the block table instead of a select chain would bound it. **Not tested** - Retail programs or a title run. I didn't check this probe's results for correctness (the PR's GPU parity tests cover that). Other GPUs. - How many minority-offset blocks the retail programs actually have. **AI use** - Claude Code (Claude Opus 5.5) ran the builds, tests and measurements and wrote this report; I checked the numbers against the logs.
t4l03 commented 2026-11-24 21:09:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T20:55:34Z.


@milesah3ad I counted the branch-target selects in the retail ActivateRays record 95cc13288a27a96e. I exported it with four memory windows and --split 0 from the #1548 revision stacked on 42b2f11, toggling XCL_COMPACT_IMMEDIATES. Both switch and heap windows gave the same counts.

Form Cases Cases with selects Total target selects P99 per case Max per case
#1448 compact route 2,516 372 10,096 75 1,347
With #1548 immediate sharing 2,281 373 10,330 86 1,347

The longest retail chain is between the 899- and 1,799-select synthetic probes. These are emitted HLSL counts. We still need to know how often that retail case executes and what it costs on the GPU. If #1448 changes how it emits target selection, I’ll carry that through to #1548 when I restack it.

AI use

Codex (gpt-6.2-sol) ran the exports, counted the selects, and drafted this reply.

<!-- greyfinch-sync:ivall/xcl:comment:7144240380 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7144240380). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T20:55:34Z. --- @milesah3ad I counted the branch-target selects in the retail ActivateRays record `95cc13288a27a96e`. I exported it with four memory windows and `--split 0` from the #1548 revision stacked on `42b2f11`, toggling `XCL_COMPACT_IMMEDIATES`. Both switch and heap windows gave the same counts. | Form | Cases | Cases with selects | Total target selects | P99 per case | Max per case | | --- | ---: | ---: | ---: | ---: | ---: | | #1448 compact route | 2,516 | 372 | 10,096 | 75 | 1,347 | | With #1548 immediate sharing | 2,281 | 373 | 10,330 | 86 | 1,347 | The longest retail chain is between the 899- and 1,799-select synthetic probes. These are emitted HLSL counts. We still need to know how often that retail case executes and what it costs on the GPU. If #1448 changes how it emits target selection, I’ll carry that through to #1548 when I restack it. **AI use** Codex (gpt-6.2-sol) ran the exports, counted the selects, and drafted this reply.
Pipodi commented 2026-11-24 21:09:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T20:56:32Z.


@milesah3ad thank you. The probe is right, and the retail program gets there. I counted the xcl_t = select lines in #1448's own HLSL for ActivateRays: the same patch as 42b2f11, the dump whose DXIL is the description's 2,848,780 B. Counts only:

  • 10,096 selects in 372 of its 2,516 cases. Among those 372 cases the median is 8 and the 90th percentile 60.
  • The five largest cases have 1,347, 519, 490, 218 and 214 selects, over 1, 15, 15, 12 and 12 other body lines.
  • So the largest is a one-line block shared by 1,348 blocks. Each time it runs, it evaluates 1,347 selects for about one line of work, which is your adversarial profile.
  • The offsets differ almost every time: 1,165 distinct offsets among its 1,347 selects, and 510 of 519 and 490 of 490 in the next two. So giving each common offset its own case doesn't bound it: with a threshold of 8 blocks per offset, 17 new cases would remove only 282 of the 10,096.

I'll bound it in this PR. The selects stay where a text has few minority blocks; above a cap, those blocks get their target from data instead of the chain, at a constant cost per execution. I'll come back with the design and its numbers: case count, table words, DXIL and driver time for ActivateRays, and your probe's GPU time.

Until then I'm moving this PR and #1692, which is stacked on it, back to draft, because a fix is pending.

AI use: Claude Code (Claude Opus 5.5) counted the dump and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7144262571 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7144262571). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T20:56:32Z. --- @milesah3ad thank you. The probe is right, and the retail program gets there. I counted the `xcl_t = select` lines in #1448's own HLSL for ActivateRays: the same patch as `42b2f11`, the dump whose DXIL is the description's 2,848,780 B. Counts only: - 10,096 selects in 372 of its 2,516 cases. Among those 372 cases the median is 8 and the 90th percentile 60. - The five largest cases have 1,347, 519, 490, 218 and 214 selects, over 1, 15, 15, 12 and 12 other body lines. - So the largest is a one-line block shared by 1,348 blocks. Each time it runs, it evaluates 1,347 selects for about one line of work, which is your adversarial profile. - The offsets differ almost every time: 1,165 distinct offsets among its 1,347 selects, and 510 of 519 and 490 of 490 in the next two. So giving each common offset its own case doesn't bound it: with a threshold of 8 blocks per offset, 17 new cases would remove only 282 of the 10,096. I'll bound it in this PR. The selects stay where a text has few minority blocks; above a cap, those blocks get their target from data instead of the chain, at a constant cost per execution. I'll come back with the design and its numbers: case count, table words, DXIL and driver time for ActivateRays, and your probe's GPU time. Until then I'm moving this PR and #1692, which is stacked on it, back to draft, because a fix is pending. **AI use:** Claude Code (Claude Opus 5.5) counted the dump and wrote this comment.
t4l03 commented 2026-11-24 21:09:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by t4l03 on 2026-11-24T20:57:05Z.


@Pipodi one budget detail for the data-backed version: on ActivateRays the current block table is 7,482 words, and #1548 adds a 708-word literal table. That leaves two words under #1548’s combined 8,192-word cap. When I restack #1548, I’ll check that its optional literal sharing accounts for the new target data and that the standard compact route still works when there’s no room for literals.

AI use

Codex (gpt-6.2-sol) checked the emitted table sizes and drafted this note.

<!-- greyfinch-sync:ivall/xcl:comment:7144274732 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7144274732). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T20:57:05Z. --- @Pipodi one budget detail for the data-backed version: on ActivateRays the current block table is 7,482 words, and #1548 adds a 708-word literal table. That leaves two words under #1548’s combined 8,192-word cap. When I restack #1548, I’ll check that its optional literal sharing accounts for the new target data and that the standard compact route still works when there’s no room for literals. **AI use** Codex (gpt-6.2-sol) checked the emitted table sizes and drafted this note.
Pipodi commented 2026-11-24 21:29:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T21:16:34Z.


Two corrections to my comment above, and where the design stands. @t4l03 this changes your budget.

  • No target data. I wrote that above a cap the blocks would "get their target from data". That doesn't fit. On ActivateRays XCL_BT is 7,482 of 8,192 words, so 710 are free (2 beside #1548's 708-word literal table), and the 1,347-select chain alone needs 1,264 words in the most compact layout I counted. So the fix adds no table words and leaves XCL_BT unchanged. It bounds the chain inside the case's code. For #1548 that means a recount, not a new budget.
  • The largest case. It is an empty block text that ends in an unconditional jump, shared by 1,352 blocks (not 1,348), 5 of them at the majority offset, hence 1,347 selects. 1,351 of them directly follow a conditional branch, and none of them is a branch target. They are the else-jumps of two-way branches, so jump threading has nothing to retarget.
  • Not measured yet. The candidates (a branch on the block index inside the case, or splitting the case into chunks) are counted on the dump only. I'll run @milesah3ad's probe on them before I pick one, and post the numbers then.

AI use: Claude Code. A Claude Fable 5.2 subagent counted the dump and the table layouts. Claude Opus 5.5 (the main session) checked the counts against the plan and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7144713180 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7144713180). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T21:16:34Z. --- Two corrections to my comment above, and where the design stands. @t4l03 this changes your budget. - **No target data.** I wrote that above a cap the blocks would "get their target from data". That doesn't fit. On ActivateRays `XCL_BT` is 7,482 of 8,192 words, so 710 are free (2 beside #1548's 708-word literal table), and the 1,347-select chain alone needs 1,264 words in the most compact layout I counted. So the fix adds no table words and leaves `XCL_BT` unchanged. It bounds the chain inside the case's code. For #1548 that means a recount, not a new budget. - **The largest case.** It is an empty block text that ends in an unconditional jump, shared by 1,352 blocks (not 1,348), 5 of them at the majority offset, hence 1,347 selects. 1,351 of them directly follow a conditional branch, and none of them is a branch target. They are the else-jumps of two-way branches, so jump threading has nothing to retarget. - **Not measured yet.** The candidates (a branch on the block index inside the case, or splitting the case into chunks) are counted on the dump only. I'll run @milesah3ad's probe on them before I pick one, and post the numbers then. **AI use:** Claude Code. A Claude Fable 5.2 subagent counted the dump and the table layouts. Claude Opus 5.5 (the main session) checked the counts against the plan and wrote this comment.
milesah3ad commented 2026-11-24 23:08:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by milesah3ad on 2026-11-24T22:27:04Z.


@Pipodi thanks. So the candidates can be compared with the numbers above, here is how they were made. The probe is the single file crates/xcl/examples/cmp1448.rs from a8eebfd. Copy it into any tree that has compact::translate_compact and compact::compact_wanted, then cargo build --release --example cmp1448.

# the two sizes in the table: --rounds 1800 (37,809 console instructions) and 3600 (75,609)
# --vary 1 = the adversarial case; --vary 0 = the control (same targets, byte-identical DXIL on #1316 and #1448)
# --heap 0 / 1 = switch / heap windows; --salt 1 and 2 were the two seeds
cmp1448 --out OUT\h0 --name vary1_r3600_s1 --rounds 3600 --vary 1 --heap 0 --salt 1 --dispatch 30

Each line prints the cases, HLSL / DXIL size and DXC time. --dispatch 30 runs the program 30 times on the GPU (64 groups, addresses in window 0) and prints the median. The GPU times in my table are those medians. The trees were #1316 5749171 and #1448 b370923, RTX 5080, driver 621.24, release:

--rounds switch, #1316 → #1448 heap, #1316 → #1448
1800 4.05 → 4.38 ms 3.97 → 4.28 ms
3600 8.11 → 14.63 ms 7.94 → 14.42 ms

Seeds 1 and 2 agree to within 0.02 ms. I can run it on the candidate branches here too if that saves you a step. Push them and tag me.

AI use: Claude Code (Claude Opus 5.5) wrote this. The numbers are from the run logs behind my report above.

<!-- greyfinch-sync:ivall/xcl:comment:7146244485 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7146244485). Originally posted by [milesah3ad](https://github.com/milesah3ad) on 2026-11-24T22:27:04Z. --- @Pipodi thanks. So the candidates can be compared with the numbers above, here is how they were made. The probe is the single file `crates/xcl/examples/cmp1448.rs` from [`a8eebfd`](https://github.com/milesah3ad/xcl/commit/a8eebfd). Copy it into any tree that has `compact::translate_compact` and `compact::compact_wanted`, then `cargo build --release --example cmp1448`. ```powershell # the two sizes in the table: --rounds 1800 (37,809 console instructions) and 3600 (75,609) # --vary 1 = the adversarial case; --vary 0 = the control (same targets, byte-identical DXIL on #1316 and #1448) # --heap 0 / 1 = switch / heap windows; --salt 1 and 2 were the two seeds cmp1448 --out OUT\h0 --name vary1_r3600_s1 --rounds 3600 --vary 1 --heap 0 --salt 1 --dispatch 30 ``` Each line prints the cases, HLSL / DXIL size and DXC time. `--dispatch 30` runs the program 30 times on the GPU (64 groups, addresses in window 0) and prints the median. The GPU times in my table are those medians. The trees were #1316 `5749171` and #1448 `b370923`, RTX 5080, driver 621.24, release: | `--rounds` | switch, #1316 → #1448 | heap, #1316 → #1448 | |---|---:|---:| | 1800 | 4.05 → 4.38 ms | 3.97 → 4.28 ms | | 3600 | 8.11 → 14.63 ms | 7.94 → 14.42 ms | Seeds 1 and 2 agree to within 0.02 ms. I can run it on the candidate branches here too if that saves you a step. Push them and tag me. AI use: Claude Code (Claude Opus 5.5) wrote this. The numbers are from the run logs behind my report above.
Pipodi commented 2026-11-24 23:08:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-24T22:48:32Z.


@milesah3ad thanks for the probe and the exact commands: they found a real problem. The new head 57d7574 (still stacked on #1316 964f5ed) bounds the select list: a case evaluates at most 32 selects, and past that [branch] if (xcl_b < pivot) splits the list (xcl_b is wave-uniform). Cases with 32 or fewer differing targets emit the same text as before.

Your probe from a8eebfd, copied in locally, --rounds 3600 --vary 1 --dispatch 30, release, RTX 4090 (driver 617.42), median of 30 dispatches:

#1316 964f5ed previous head, no bound 57d7574 (bound 32)
switch (--heap 0) 9.84 ms 13.52 ms 10.39 ms
heap windows (--heap 1) 12.63 ms 13.41 ms 12.52 ms

DXC keeps the branches (92 conditional branches in the DXIL against 36 without the bound). With --vary 0 the HLSL and DXIL are byte-identical with and without the bound.

The cost of the bound is in the driver: a cold build of the screen-probe ActivateRays program took 175–233 s (mean 203 s, 4 runs) against 162–201 s (mean 172 s, 4 runs) without it, interleaved. The spreads overlap. A bound of 64 was no better (200–216 s). The PR description has the full tables, the suite (986 passed, 0 failed, 42 ignored) and the smoke pair against main 689f2db.

You offered to run the probe on the new head. On your RTX 5080 that would be welcome, especially --rounds 1800 and 3600 with --heap 0 and 1.

AI use: Claude Code with Claude Opus 5.5 made the change and the measurements and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7146668580 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7146668580). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T22:48:32Z. --- @milesah3ad thanks for the probe and the exact commands: they found a real problem. The new head `57d7574` (still stacked on #1316 `964f5ed`) bounds the select list: a case evaluates at most 32 selects, and past that `[branch] if (xcl_b < pivot)` splits the list (`xcl_b` is wave-uniform). Cases with 32 or fewer differing targets emit the same text as before. Your probe from `a8eebfd`, copied in locally, `--rounds 3600 --vary 1 --dispatch 30`, release, RTX 4090 (driver 617.42), median of 30 dispatches: | | #1316 `964f5ed` | previous head, no bound | `57d7574` (bound 32) | |---|---:|---:|---:| | switch (`--heap 0`) | 9.84 ms | 13.52 ms | 10.39 ms | | heap windows (`--heap 1`) | 12.63 ms | 13.41 ms | 12.52 ms | DXC keeps the branches (92 conditional branches in the DXIL against 36 without the bound). With `--vary 0` the HLSL and DXIL are byte-identical with and without the bound. The cost of the bound is in the driver: a cold build of the screen-probe `ActivateRays` program took 175–233 s (mean 203 s, 4 runs) against 162–201 s (mean 172 s, 4 runs) without it, interleaved. The spreads overlap. A bound of 64 was no better (200–216 s). The PR description has the full tables, the suite (986 passed, 0 failed, 42 ignored) and the smoke pair against `main` `689f2db`. You offered to run the probe on the new head. On your RTX 5080 that would be welcome, especially `--rounds 1800` and `3600` with `--heap 0` and `1`. AI use: Claude Code with Claude Opus 5.5 made the change and the measurements and wrote this comment.
milesah3ad commented 2026-11-24 23:08:37 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by milesah3ad on 2026-11-24T22:56:55Z.


@Pipodi the bound holds on Blackwell as well: on the RTX 5080 the adversarial case is back at the parent's time, or under it in the switch form.

Tested: RTX 5080 16 GB, driver 621.24, Ryzen 7 9800X3D, Windows 11 Pro 26300, rustc 1.100.0, DXC 1.9.2609.5, release. The probe at a8eebfd built on #1316 964f5ed and on this head 57d7574. --vary 1 --dispatch 30, two seeds per row, trees interleaved per configuration. GPU dispatch medians:

--rounds form #1316 964f5ed 57d7574 (bound 32) unbound head (my earlier run)
1800 switch (--heap 0) 4.05 ms 3.85 ms (−5 %) 4.38 ms
3600 switch 8.10 ms 7.70 ms (−5 %) 14.63 ms
1800 heap (--heap 1) 3.98 ms 4.03 ms (+1 %) 4.28 ms
3600 heap 7.95 ms 8.01 ms (+1 %) 14.42 ms
  • The two seeds agree to within 0.01 ms in every row.
  • The +80 % on the 75,609-instruction program is gone. In the heap form what's left is +1 %, and the switch form is now 5 % faster than the parent.
  • DXIL grows with the bound: 18 → 53 KB at 3600 rounds and 13 → 30 KB at 1800 (switch form), with 8 → 7 cases. That fits your driver-time cost being on the compile side, not at run time.
  • Control (--vary 0 --rounds 3600): byte-identical DXIL on both trees.
  • The "unbound" column comes from my earlier run against 5749171. The parent's times here (8.10 / 7.95 ms) match that run's (8.11 / 7.94 ms), so the columns are comparable.

Not tested: cold driver builds of ActivateRays (no title here), the suite on this head, AMD.

AI use: Claude Code (Claude Opus 5.5) ran the builds and measurements on the machine above and wrote this report. I checked the numbers against the logs.

<!-- greyfinch-sync:ivall/xcl:comment:7146832883 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7146832883). Originally posted by [milesah3ad](https://github.com/milesah3ad) on 2026-11-24T22:56:55Z. --- @Pipodi the bound holds on Blackwell as well: on the RTX 5080 the adversarial case is back at the parent's time, or under it in the switch form. **Tested:** RTX 5080 16 GB, driver 621.24, Ryzen 7 9800X3D, Windows 11 Pro 26300, rustc 1.100.0, DXC 1.9.2609.5, release. The probe at `a8eebfd` built on #1316 `964f5ed` and on this head `57d7574`. `--vary 1 --dispatch 30`, two seeds per row, trees interleaved per configuration. GPU dispatch medians: | `--rounds` | form | #1316 `964f5ed` | `57d7574` (bound 32) | unbound head (my earlier run) | |---|---|---:|---:|---:| | 1800 | switch (`--heap 0`) | 4.05 ms | **3.85 ms** (−5 %) | 4.38 ms | | 3600 | switch | 8.10 ms | **7.70 ms** (−5 %) | 14.63 ms | | 1800 | heap (`--heap 1`) | 3.98 ms | **4.03 ms** (+1 %) | 4.28 ms | | 3600 | heap | 7.95 ms | **8.01 ms** (+1 %) | 14.42 ms | - The two seeds agree to within 0.01 ms in every row. - The +80 % on the 75,609-instruction program is gone. In the heap form what's left is +1 %, and the switch form is now 5 % faster than the parent. - DXIL grows with the bound: 18 → 53 KB at 3600 rounds and 13 → 30 KB at 1800 (switch form), with 8 → 7 cases. That fits your driver-time cost being on the compile side, not at run time. - Control (`--vary 0 --rounds 3600`): **byte-identical DXIL** on both trees. - The "unbound" column comes from my earlier run against `5749171`. The parent's times here (8.10 / 7.95 ms) match that run's (8.11 / 7.94 ms), so the columns are comparable. **Not tested:** cold driver builds of `ActivateRays` (no title here), the suite on this head, AMD. AI use: Claude Code (Claude Opus 5.5) ran the builds and measurements on the machine above and wrote this report. I checked the numbers against the logs.
Pipodi commented 2026-11-25 00:09:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-25T00:05:38Z.


Back to draft: since main merged #1836, #1316 (which this PR is stacked on) conflicts with main in pso.rs (details). This PR's own commits don't touch that code. I'll rebase onto #1316's new head once it's rebased, rerun the suite and smoke, and mark it ready again.

AI use: Claude Code with Claude Opus 5.5.

<!-- greyfinch-sync:ivall/xcl:comment:7148130615 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7148130615). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-25T00:05:38Z. --- Back to draft: since `main` merged #1836, #1316 (which this PR is stacked on) conflicts with `main` in `pso.rs` ([details](https://github.com/xcl-dev/xcl/pull/1316)). This PR's own commits don't touch that code. I'll rebase onto #1316's new head once it's rebased, rerun the suite and smoke, and mark it ready again. AI use: Claude Code with Claude Opus 5.5.
itsSio commented 2026-11-25 11:08:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by itsSio on 2026-11-25T10:13:25Z.


Tested

Independent check requested in #1269, on clean PR head 7fadd08829e3713cdef26829e81356920b9866e4, no local patches or merge. Both systems: Windows 11 Pro 26200, x64 MSVC, unoptimized dev/test with debug info off. cargo build --workspace --locked succeeded on both. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture completed all 21 test result blocks on each:

GPU / driver CPU, RAM, toolchain Passed / failed / ignored Runtime SKIPPED
RTX 5080 / 32.0.16.1088 Ryzen 7 9800X3D, 32 GiB; Rust 1.97.0, DXC/DXIL 1.9.2609.5 1183 / 0 / 46 26
RTX 2080 SUPER / 32.0.16.1088 Ryzen 5 5600X, 16 GiB; Rust 1.99.1, DXC/DXIL 1.8.2502.11 1183 / 0 / 46 28

Both logged 21 native-wave64 skips, three per-lane f16/f32 refusals, unavailable driver-cache control and unavailable heap windows. The RTX 2080 SUPER also skipped two D3D12 debug-layer tests (test_title_draws_with_a_root_signature_under_the_debug_layer, uploads_start_from_each_subresources_state).

cargo test -p xcl --lib --locked gpu::recomp::tests_compact -- --test-threads=1 --nocapture: 21 / 0 / 0 on the Radeon RDNA2 iGPU (32.0.21043.5001, same Ryzen 7 system) with no runtime skips; 21 / 0 / 0 on the RTX 2080 SUPER with one native-wave64 skip. The shared-branch-target check matched the reference output. The RTX 2080 SUPER results were recovered from the two completed on-disk logs because the runner did not return a terminal response.

Not tested

Retail smoke or samples, full AMD workspace, RADV, Intel, or compile and execution performance.

AI use

Ran via Samaritan:

  • OpenCode with OpenAI GPT-6.2 Sol (openai/gpt-6.2-sol): ran the checks, recovered and verified the logs, and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7159400423 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7159400423). Originally posted by [itsSio](https://github.com/itsSio) on 2026-11-25T10:13:25Z. --- **Tested** Independent check requested in #1269, on clean PR head `7fadd08829e3713cdef26829e81356920b9866e4`, no local patches or merge. Both systems: Windows 11 Pro 26200, x64 MSVC, unoptimized dev/test with debug info off. `cargo build --workspace --locked` succeeded on both. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture` completed all 21 test result blocks on each: | GPU / driver | CPU, RAM, toolchain | Passed / failed / ignored | Runtime SKIPPED | | --- | --- | ---: | ---: | | RTX 5080 / `32.0.16.1088` | Ryzen 7 9800X3D, 32 GiB; Rust 1.97.0, DXC/DXIL 1.9.2609.5 | **1183 / 0 / 46** | 26 | | RTX 2080 SUPER / `32.0.16.1088` | Ryzen 5 5600X, 16 GiB; Rust 1.99.1, DXC/DXIL 1.8.2502.11 | **1183 / 0 / 46** | 28 | Both logged 21 native-wave64 skips, three per-lane f16/f32 refusals, unavailable driver-cache control and unavailable heap windows. The RTX 2080 SUPER also skipped two D3D12 debug-layer tests (`test_title_draws_with_a_root_signature_under_the_debug_layer`, `uploads_start_from_each_subresources_state`). `cargo test -p xcl --lib --locked gpu::recomp::tests_compact -- --test-threads=1 --nocapture`: **21 / 0 / 0** on the Radeon RDNA2 iGPU (`32.0.21043.5001`, same Ryzen 7 system) with no runtime skips; **21 / 0 / 0** on the RTX 2080 SUPER with one native-wave64 skip. The shared-branch-target check matched the reference output. The RTX 2080 SUPER results were recovered from the two completed on-disk logs because the runner did not return a terminal response. **Not tested** Retail smoke or samples, full AMD workspace, RADV, Intel, or compile and execution performance. **AI use** Ran via Samaritan: - OpenCode with OpenAI GPT-6.2 Sol (`openai/gpt-6.2-sol`): ran the checks, recovered and verified the logs, and wrote this report.
DavidM1911 commented 2026-11-26 01:05:39 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T00:26:41Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7178763193 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7178763193). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:26:41Z. --- 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.
Pipodi commented 2026-11-27 15:42:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-27T15:42:58Z.


Rebased onto current main (623d02e4); the suite rerun and the smoke pair on the new head are updated in the description.

<!-- greyfinch-sync:ivall/xcl:comment:7222394369 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7222394369). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-27T15:42:58Z. --- Rebased onto current main (623d02e4); the suite rerun and the smoke pair on the new head are updated in the description.
Pipodi commented 2026-11-27 19:11:31 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-27T19:11:31Z.


@DavidM1911 rebased onto current main (6089122a); new head e3cf1166. The whole suite and a smoke pair were rerun, see the description. Ready for a retest when you have time.

AI use: Claude Code (Claude Opus 5.5)

<!-- greyfinch-sync:ivall/xcl:comment:7226280617 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7226280617). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-27T19:11:31Z. --- @DavidM1911 rebased onto current main (6089122a); new head `e3cf1166`. The whole suite and a smoke pair were rerun, see the description. Ready for a retest when you have time. AI use: Claude Code (Claude Opus 5.5)
Pipodi commented 2026-11-29 04:18:20 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-29T04:18:20Z.


The failing "Build and test (Windows, no GPU)" job here is the known pipeline_library race, not this change: builder_deduplicates_names_and_atomically_replaces_output sees 4 entries instead of 2 (a concurrent split_compute_program_prebuilds_and_caches_chain_pieces stores into the shared builder), and the three tests after it fail on the poisoned BUILD_TEST lock. This PR does not touch those files; #3183 and #3221 fix the race. The same head passed locally (whole suite, 0 failed), and the same tests pass in the CI run of #1692 on the same stack. I cannot rerun the job myself; a rerun should pass.

(Claude Code, Claude Opus 5.5, wrote this comment.)

<!-- greyfinch-sync:ivall/xcl:comment:7250572331 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7250572331). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-29T04:18:20Z. --- The failing "Build and test (Windows, no GPU)" job here is the known `pipeline_library` race, not this change: `builder_deduplicates_names_and_atomically_replaces_output` sees 4 entries instead of 2 (a concurrent `split_compute_program_prebuilds_and_caches_chain_pieces` stores into the shared builder), and the three tests after it fail on the poisoned `BUILD_TEST` lock. This PR does not touch those files; #3183 and #3221 fix the race. The same head passed locally (whole suite, 0 failed), and the same tests pass in the CI run of #1692 on the same stack. I cannot rerun the job myself; a rerun should pass. (Claude Code, Claude Opus 5.5, wrote this comment.)
Foniass commented 2026-12-01 05:47:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:47:26Z.


Triage (#1607) – head 51f9a05

Stacked on #1316 (itself on #1315); only the top commit 51f9a05a (compact cases keyed on code and condition, per-block targets via pick_targets, cross-word table packing) belongs here. #1692, #2018 and #2025 are stacked on top of it, and #1548 is stacked on it too. They share its lines because of the stack, not because they duplicate it. None of the compact backend is on main yet.
No problems found in the top commit: pick_targets terminates (mid < len), the pivot test matches the sorted block list, and the dense table read handles a bit offset of 0.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7302140612 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7302140612). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T05:47:26Z. --- **Triage (#1607)** – head 51f9a05 Stacked on #1316 (itself on #1315); only the top commit `51f9a05a` (compact cases keyed on code and condition, per-block targets via `pick_targets`, cross-word table packing) belongs here. #1692, #2018 and #2025 are stacked on top of it, and #1548 is stacked on it too. They share its lines because of the stack, not because they duplicate it. None of the compact backend is on `main` yet. No problems found in the top commit: `pick_targets` terminates (mid < len), the pivot test matches the sorted block list, and the dense table read handles a bit offset of 0. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
fromthemoonx commented 2026-12-01 14:11:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T14:11:26Z.


merge-check
base: b2b1f109d2
head: 51f9a05ab8
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2933 passed, 0 failed, 51 ignored (base alone: 2902 passed, 0 failed, 51 ignored); SKIPPED: 26 (23 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps): base's 25 plus tests_compact::gpu_compact_native_wave64_form (no wave64); failing: none
review: read the whole diff, the 4 rebased #1316 commits and the top one (9 files, +2243 -90; tests_compact.rs skimmed for what each test compares). No correctness problem found. With XCL_COMPACT_CS unset (auto), compute programs of 20,000+ instructions whose distinct blocks are under 30 % take the compact form; DXC refusing it falls back to the normal form under the normal disk entry; compact entries get a _c file name; XCL_COMPACT_CS is a semantic pipeline setting and compact.rs is in TRANSLATOR_SOURCES.

  • On this wave32 GPU, tests_compact:: passes 3 of 3 runs (21 tests, ~11 s a run; the wave64 shapes run split, the native-wave64 one skips); compact::tests:: (4) pass in the suite.
  • Mutation: minority branch targets in pick_targets set to the block itself ({to}u -> {k}u) fails 5 tests: gpu_compact_matches_translate, gpu_compact_dense_table, gpu_compact_many_targets, gpu_compact_shared_targets, compact_many_targets_take_a_bounded_path. Good.
  • Reading notes, not blockers: (1) the huge-program direct route (huge_direct_min, on by default) still runs before the compact form in compile_hlsl, so by default the compact form applies only to programs whose direct DXIL is under that size. (2) On a cache miss compact_wanted decodes the program twice (compact_form, then translate_as). (3) When compact_form says yes but the compact translation is incomplete, the normal form is stored under the _c entry: a duplicate, not a wrong hit.
  • No retail title on this machine: the compact form of a real program (e.g. ActivateRays) was not compiled or run here.
    performance: not measured here. Default path: only programs compact_wanted picks change form; adding compact.rs to the translator identity rebuilds every translated entry once after the update.
    verdict: safe to merge
    hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
<!-- greyfinch-sync:ivall/xcl:comment:7313842821 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7313842821). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-01T14:11:26Z. --- merge-check base: b2b1f109d27e746a62ec95b04dd1f9924452e682 head: 51f9a05ab846e2a0888295aa58c0b35c2a719ae0 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2933 passed, 0 failed, 51 ignored (base alone: 2902 passed, 0 failed, 51 ignored); SKIPPED: 26 (23 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps): base's 25 plus `tests_compact::gpu_compact_native_wave64_form` (no wave64); failing: none review: read the whole diff, the 4 rebased #1316 commits and the top one (9 files, +2243 -90; `tests_compact.rs` skimmed for what each test compares). No correctness problem found. With `XCL_COMPACT_CS` unset (`auto`), compute programs of 20,000+ instructions whose distinct blocks are under 30 % take the compact form; DXC refusing it falls back to the normal form under the normal disk entry; compact entries get a `_c` file name; `XCL_COMPACT_CS` is a semantic pipeline setting and `compact.rs` is in `TRANSLATOR_SOURCES`. - On this wave32 GPU, `tests_compact::` passes 3 of 3 runs (21 tests, ~11 s a run; the wave64 shapes run split, the native-wave64 one skips); `compact::tests::` (4) pass in the suite. - Mutation: minority branch targets in `pick_targets` set to the block itself (`{to}u` -> `{k}u`) fails 5 tests: `gpu_compact_matches_translate`, `gpu_compact_dense_table`, `gpu_compact_many_targets`, `gpu_compact_shared_targets`, `compact_many_targets_take_a_bounded_path`. Good. - Reading notes, not blockers: (1) the huge-program direct route (`huge_direct_min`, on by default) still runs before the compact form in `compile_hlsl`, so by default the compact form applies only to programs whose direct DXIL is under that size. (2) On a cache miss `compact_wanted` decodes the program twice (`compact_form`, then `translate_as`). (3) When `compact_form` says yes but the compact translation is incomplete, the normal form is stored under the `_c` entry: a duplicate, not a wrong hit. - No retail title on this machine: the compact form of a real program (e.g. `ActivateRays`) was not compiled or run here. performance: not measured here. Default path: only programs `compact_wanted` picks change form; adding `compact.rs` to the translator identity rebuilds every translated entry once after the update. verdict: safe to merge hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
Pipodi commented 2026-12-02 15:59:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-02T15:59:26Z.


Closing: main's direct DXIL path now has its own compact dispatch and nesting (dxil/kernel.rs, #2034, #2174), and with the defaults this stack's goes_direct(direct_on, compact_routed) (pso.rs) takes the programs compact_wanted picks away from it and sends them back through HLSL and DXC, the form that never finished compiling on AMD (ActivateRays, @Nmopqr333). Foniass's #1316 triage reached the same conclusion. If the packing across words in pick_targets still pays off, it can come back as a small PR against the direct translator.

AI use: Claude Code, Claude Opus 5.5 audited the stack; closed by the author.

<!-- greyfinch-sync:ivall/xcl:comment:7351265975 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1448#issuecomment-7351265975). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-12-02T15:59:26Z. --- Closing: main's direct DXIL path now has its own compact dispatch and nesting (`dxil/kernel.rs`, #2034, #2174), and with the defaults this stack's `goes_direct(direct_on, compact_routed)` (`pso.rs`) takes the programs `compact_wanted` picks away from it and sends them back through HLSL and DXC, the form that never finished compiling on AMD (ActivateRays, @Nmopqr333). Foniass's #1316 triage reached the same conclusion. If the packing across words in `pick_targets` still pays off, it can come back as a small PR against the direct translator. AI use: Claude Code, Claude Opus 5.5 audited the stack; closed by the author.

Pull request closed

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!1438
No description provided.