Recompiler: compact dispatch can switch in two levels (XCL_COMPACT_NEST) #1682

Closed
Pipodi wants to merge 7 commits from upstream-pr/1692 into main
Pipodi commented 2026-11-24 19:20:46 +00:00 (Migrated from github.com)

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


Stacked on #1448 (51f9a05a, itself on #1316's commits rebased as b662d124..7c52d4f6, rebased onto main d52ff48c); only the top two commits (421109bb, 5d9d3209) belong 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.

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 421109bb), 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. In an earlier rebase, this PR's own commits had no conflicts. #1448's rebase (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.

The compact form's dispatch loop is one switch over every case. All cases fall through to one merge block, which has a predecessor per case and a phi operand per predecessor for each of the ~147 loop-carried registers. On ActivateRays (2,516 cases), that is 436,656 merge operands. The NVIDIA driver's time and memory follow them: about 165 s and 8.2 GB for one cold pipeline build (#1269 result).

XCL_COMPACT_NEST=<P> (a power of two up to 65536; off when unset or 0) switches on case >> log2(P) first. Each group of P cases has its own inner switch and ends in xcl_nb = min(xcl_nb, <blocks>u). The min stops DXC from folding the groups' exits back into one merge. Without it, the 147 × 2,910 merge comes back. This PR adds the switch, off by default. Turning it on above a case count is a separate PR, after measurements on more programs and GPUs. Part of #1269.

What is in it

  • crates/xcl/src/gpu/recomp/compact.rs:
    • compact_with takes the group size, and compact() reads it from XCL_COMPACT_NEST once.
    • An invalid value logs a warning and leaves the nest off.
    • With the nest off, the HLSL is the flat form as before (the selector expression is only factored out).
  • crates/xcl/src/gpu/recomp/pso.rs: the translated-shader disk cache names a nested compact entry _c_n<P> instead of _c, so a warm flat entry is never loaded for a nested run, or the other way round. Names with the nest off are unchanged.
  • crates/xcl/src/shaders.rs: XCL_COMPACT_NEST is one of the settings in the warm-settings key (semantic_pipeline_setting); test warm_settings_keep_compact_nest_switch, which uses XCL_COMPACT_NEST=32 (a value this PR accepts; auto comes with #2018).
  • Tests:
    • compact::tests::nested_dispatch_groups_the_cases: P = 2, 4, 8, 16, with ceil(cases/P) inner switches, every case once, one min per group, and the flat text with P = 0.
    • The parsing of the size.
    • The cache file name.
    • tests_compact::gpu_compact_nested_dispatch: the GPU A/B against translate with P = 2 and 4, on the synthetic programs (now with #1448's many_targets, whose case has the [branch] if tree of selects), in every form the adapter runs.
    • compact_sample_big_cs_nested_dxil on the existing XCL_SAMPLE_BIG_CS hook: DXC only, nested DXIL under 80 % of the flat compact form's.
    • Second commit, 5d9d3209 (tests only): nested_matches_flat checks the nested HLSL against the flat one. The text around the dispatch is the same, the case number is the flat switch's expression, case k sits in group k >> log2(P) with the flat case's address and text, and every group ends in min(xcl_nb, n) with the loop's own n. nested_dispatch_runs_the_flat_cases runs it on the synthetic programs (P = 1 to 32, both table packings) and checks that it catches a case moved to another group, a changed case text and a changed bound. compact_sample_big_cs_nested_runs_the_flat_cases runs it on XCL_SAMPLE_BIG_CS (CPU only, P = 16, 32, 64).
    • The tests' reader of the compact HLSL (Dispatch::of) reads the nested form too. With XCL_COMPACT_NEST set for the whole run, the compact tests now check the nested form instead of stopping at the flat switch line (@einfachama found 15 of them doing that).

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), on this head (5d9d3209): 2913 passed, 3 failed, 51 ignored, 26 SKIPPED. The failures: gpu_direct_image_get_resinfo_d16, which fails on main d52ff48c too (broken by 43c56dce; fixed by test-only #3513), and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (two test targets), which is intermittent: it passes on #2025 (30aaa283, which contains this PR).

  • At 9c09c8f (not rerun): cargo test -p xcl --lib compact -- --test-threads=4 with XCL_COMPACT_NEST unset, =32 and =2: 33 passed, 0 failed, 0 ignored each (SKIPPED gpu_compact_native_wave64_form: no wave64).

  • 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)
    
  • Fails without the change: with compact_with made to ignore the group size, nested_dispatch_groups_the_cases and gpu_compact_nested_dispatch fail. The GPU test fails on its HLSL-shape assert; its results would be equal either way.

  • Release, xcl shaders <record> --precompile --only cs, a new XCL_DXIL_CACHE per run, on records of three compute programs from the retail title:

program DXIL, nest off DXIL, XCL_COMPACT_NEST=32 ratio DXC, off / 32
ActivateRays 2,848,780 B (the same hash as #1448 at b370923) 1,037,876 B 36 % 22.0 / 9.8 s
second program 942,812 B 602,444 B 64 % 12.0 / 9.2 s
third program 847,392 B 539,260 B 64 % 22.1 / 20.2 s
  • With the nest off, the DXIL of all three is byte-identical to #1448 at b370923. These DXIL numbers were measured at 00f10ee, the same patch before the rebase onto #1448's select bound. The bound changes the text of ActivateRays in both forms (#1448: 2.85 → 2.89 MB flat), so the table is not this head's; it was not rerun.
  • compact_sample_big_cs_nested_dxil on two of these programs (the test's options differ from the precompiler's) gave 874,064 → 566,372 B (65 %) and 811,152 → 516,816 B (64 %). Both pass.
  • Driver: in a throwaway build with the same emission, ActivateRays at P = 32 built cold in 37.7–38.2 s with a 1.5 GB peak, against 163–169 s and 8.2 GB flat, on this GPU (#1269 result). That was not rerun on this commit.

Regression run

The same retail title for 60 s on both sides, scripts/smoke.ps1 on clean trees, release builds, XCL_PREPARE=0 and XCL_PRESS_AT=16:A on both sides, RTX 4090 (driver 621.40).

main (6bfb5c51):

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

This PR's head (5d9d3209, rebased onto main d52ff48c):

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

The PR's run got 99.9 % of main's frames and 121.9 % of its peak commit, higher than main's but within 125 %.

Not tested

  • The nested form in a title run by me: the smoke runs above have it off, so they check only that the change breaks nothing.
  • AMD timing and Intel. On NVIDIA Linux, @0naku measured it (45 s against 350 s). On an RTX 3050 8 GB, @brothernog built ActivateRays in the heap form in 31.8 s against 312 s flat. On Linux / RADV (RX 9070 XT), @St5sz2Jk found the nested form slower in the driver: 244 s and a 45.5 GB peak, against 70 s for the flat form with @0naku's switch-tree patch. On an RTX 4060 8 GB, @einfachama built ActivateRays nested in a title run in 24.9 s from cold. On AMD and RTX 5090, @nnonno91 ran the GPU tests, including the packed table.
  • The nested form with a packed (dense) table runs on the GPU only on @nnonno91's AMD and RTX 5090; here it is checked for HLSL shape.
  • Results on the retail programs are compared only through the synthetic programs: their own dispatch does not finish within the test runner's 10 s with zero inputs. 5d9d3209's check compares their nested and flat HLSL when XCL_SAMPLE_BIG_CS is set; I did not run it with the variable set on this head.
  • #1548 (9c26337, stacked on #1448's old head 42b2f11): it builds the dispatch from the decoded instructions, not from the HLSL (@t4l03's correction). Both PRs change compact.rs and pso.rs and conflict there (git merge-tree of 9c26337 and 7123faa), so whichever merges second has to reconcile the dispatch emission and the cache names. The two have not been run together.
  • 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.
    • A Claude Sonnet 5.5 subagent wrote the code, the tests and the commit message. It also ran the suite, the sample tests and the smoke run.
    • A Claude Fable 5.2 subagent planned the merge-phi measurement.
    • Claude Opus 5.5 (the main session) set the design, ran the DXIL size checks, made the tests read the nested form, wrote the second commit's check, did the rebases onto #1448's heads (now 51f9a05a), ran the suite on the previous head, read the diff and wrote this description. A second Opus 5.5 agent reviewed the diff, and another reviewed the second commit (now 5d9d3209).
    • A Claude Sonnet 5.5 subagent ran the smoke pair on the previous head.
  • 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).
  • 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
  • The review fix on 5d9d3209 (the test's value): Claude Code, Claude Opus 5.5 (main session) orchestrated it, restacked #2018 and #2025 and updated this description; a Claude Sonnet 5.5 subagent made the change; subagents ran the suite and the smoke pair.
<!-- greyfinch-sync:ivall/xcl:issue:5478773582 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T19:20:46Z. --- Stacked on #1448 (`51f9a05a`, itself on #1316's commits rebased as `b662d124`..`7c52d4f6`, rebased onto main d52ff48c); only the top two commits (`421109bb`, `5d9d3209`) belong 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`. 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 `421109bb`), 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. In an earlier rebase, this PR's own commits had no conflicts. #1448's rebase (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`. The compact form's dispatch loop is one `switch` over every case. All cases fall through to one merge block, which has a predecessor per case and a phi operand per predecessor for each of the ~147 loop-carried registers. On `ActivateRays` (2,516 cases), that is 436,656 merge operands. The NVIDIA driver's time and memory follow them: about 165 s and 8.2 GB for one cold pipeline build ([#1269 result](https://github.com/xcl-dev/xcl/issues/1269#issuecomment-7141317244)). `XCL_COMPACT_NEST=<P>` (a power of two up to 65536; off when unset or 0) switches on `case >> log2(P)` first. Each group of P cases has its own inner `switch` and ends in `xcl_nb = min(xcl_nb, <blocks>u)`. The `min` stops DXC from folding the groups' exits back into one merge. Without it, the 147 × 2,910 merge comes back. This PR adds the switch, off by default. Turning it on above a case count is a separate PR, after measurements on more programs and GPUs. Part of #1269. **What is in it** - `crates/xcl/src/gpu/recomp/compact.rs`: - `compact_with` takes the group size, and `compact()` reads it from `XCL_COMPACT_NEST` once. - An invalid value logs a warning and leaves the nest off. - With the nest off, the HLSL is the flat form as before (the selector expression is only factored out). - `crates/xcl/src/gpu/recomp/pso.rs`: the translated-shader disk cache names a nested compact entry `_c_n<P>` instead of `_c`, so a warm flat entry is never loaded for a nested run, or the other way round. Names with the nest off are unchanged. - `crates/xcl/src/shaders.rs`: `XCL_COMPACT_NEST` is one of the settings in the warm-settings key (`semantic_pipeline_setting`); test `warm_settings_keep_compact_nest_switch`, which uses `XCL_COMPACT_NEST=32` (a value this PR accepts; `auto` comes with #2018). - Tests: - `compact::tests::nested_dispatch_groups_the_cases`: P = 2, 4, 8, 16, with ceil(cases/P) inner switches, every case once, one `min` per group, and the flat text with P = 0. - The parsing of the size. - The cache file name. - `tests_compact::gpu_compact_nested_dispatch`: the GPU A/B against `translate` with P = 2 and 4, on the synthetic programs (now with #1448's `many_targets`, whose case has the `[branch] if` tree of selects), in every form the adapter runs. - `compact_sample_big_cs_nested_dxil` on the existing `XCL_SAMPLE_BIG_CS` hook: DXC only, nested DXIL under 80 % of the flat compact form's. - Second commit, `5d9d3209` (tests only): `nested_matches_flat` checks the nested HLSL against the flat one. The text around the dispatch is the same, the case number is the flat switch's expression, case k sits in group k >> log2(P) with the flat case's address and text, and every group ends in `min(xcl_nb, n)` with the loop's own n. `nested_dispatch_runs_the_flat_cases` runs it on the synthetic programs (P = 1 to 32, both table packings) and checks that it catches a case moved to another group, a changed case text and a changed bound. `compact_sample_big_cs_nested_runs_the_flat_cases` runs it on `XCL_SAMPLE_BIG_CS` (CPU only, P = 16, 32, 64). - The tests' reader of the compact HLSL (`Dispatch::of`) reads the nested form too. With `XCL_COMPACT_NEST` set for the whole run, the compact tests now check the nested form instead of stopping at the flat switch line (@einfachama found 15 of them doing that). **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), on this head (`5d9d3209`): **2913 passed, 3 failed, 51 ignored, 26 SKIPPED**. The failures: `gpu_direct_image_get_resinfo_d16`, which fails on main d52ff48c too (broken by 43c56dce; fixed by test-only #3513), and `two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs` (two test targets), which is intermittent: it passes on #2025 (`30aaa283`, which contains this PR). - At `9c09c8f` (not rerun): `cargo test -p xcl --lib compact -- --test-threads=4` with `XCL_COMPACT_NEST` unset, `=32` and `=2`: 33 passed, 0 failed, 0 ignored each (SKIPPED `gpu_compact_native_wave64_form`: no wave64). - 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) ``` - Fails without the change: with `compact_with` made to ignore the group size, `nested_dispatch_groups_the_cases` and `gpu_compact_nested_dispatch` fail. The GPU test fails on its HLSL-shape assert; its results would be equal either way. - Release, `xcl shaders <record> --precompile --only cs`, a new `XCL_DXIL_CACHE` per run, on records of three compute programs from the retail title: | program | DXIL, nest off | DXIL, `XCL_COMPACT_NEST=32` | ratio | DXC, off / 32 | |---|---|---|---|---| | ActivateRays | 2,848,780 B (the same hash as #1448 at `b370923`) | 1,037,876 B | 36 % | 22.0 / 9.8 s | | second program | 942,812 B | 602,444 B | 64 % | 12.0 / 9.2 s | | third program | 847,392 B | 539,260 B | 64 % | 22.1 / 20.2 s | - With the nest off, the DXIL of all three is byte-identical to #1448 at `b370923`. These DXIL numbers were measured at `00f10ee`, the same patch before the rebase onto #1448's select bound. The bound changes the text of `ActivateRays` in both forms (#1448: 2.85 → 2.89 MB flat), so the table is not this head's; it was not rerun. - `compact_sample_big_cs_nested_dxil` on two of these programs (the test's options differ from the precompiler's) gave 874,064 → 566,372 B (65 %) and 811,152 → 516,816 B (64 %). Both pass. - Driver: in a throwaway build with the same emission, `ActivateRays` at P = 32 built cold in 37.7–38.2 s with a 1.5 GB peak, against 163–169 s and 8.2 GB flat, on this GPU ([#1269 result](https://github.com/xcl-dev/xcl/issues/1269#issuecomment-7141317244)). That was not rerun on this commit. **Regression run** The same retail title for 60 s on both sides, `scripts/smoke.ps1` on clean trees, release builds, `XCL_PREPARE=0` and `XCL_PRESS_AT=16:A` on both sides, RTX 4090 (driver 621.40). main (`6bfb5c51`): ``` xcl-smoke v1 commit: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1611 (PresentX 1611) presents per 2 s (last 3): 60 60 61 device removals: 0 crashes: 0 peak commit: 17826 MB ``` This PR's head (`5d9d3209`, rebased onto main d52ff48c): ``` xcl-smoke v1 commit: 5d9d3209825e80f8b9f1000e0b9db71d47f4b7c0 gpu: NVIDIA GeForce RTX 4090 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1610 (PresentX 1610) presents per 2 s (last 3): 60 61 60 device removals: 0 crashes: 0 peak commit: 21730 MB ``` The PR's run got 99.9 % of `main`'s frames and 121.9 % of its peak commit, higher than `main`'s but within 125 %. **Not tested** - The nested form in a title run by me: the smoke runs above have it off, so they check only that the change breaks nothing. - AMD timing and Intel. On NVIDIA Linux, @0naku measured it (45 s against 350 s). On an RTX 3050 8 GB, @brothernog built `ActivateRays` in the heap form in 31.8 s against 312 s flat. On Linux / RADV (RX 9070 XT), @St5sz2Jk [found](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7145390902) the nested form slower in the driver: 244 s and a 45.5 GB peak, against 70 s for the flat form with @0naku's switch-tree patch. On an RTX 4060 8 GB, @einfachama [built](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7145260837) `ActivateRays` nested in a title run in 24.9 s from cold. On AMD and RTX 5090, @nnonno91 ran the GPU tests, including the packed table. - The nested form with a packed (dense) table runs on the GPU only on @nnonno91's AMD and RTX 5090; here it is checked for HLSL shape. - Results on the retail programs are compared only through the synthetic programs: their own dispatch does not finish within the test runner's 10 s with zero inputs. `5d9d3209`'s check compares their nested and flat HLSL when `XCL_SAMPLE_BIG_CS` is set; I did not run it with the variable set on this head. - #1548 (`9c26337`, stacked on #1448's old head `42b2f11`): it builds the dispatch from the decoded instructions, not from the HLSL (@t4l03's correction). Both PRs change `compact.rs` and `pso.rs` and conflict there (`git merge-tree` of `9c26337` and `7123faa`), so whichever merges second has to reconcile the dispatch emission and the cache names. The two have not been run together. - 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. - A Claude Sonnet 5.5 subagent wrote the code, the tests and the commit message. It also ran the suite, the sample tests and the smoke run. - A Claude Fable 5.2 subagent planned the merge-phi measurement. - Claude Opus 5.5 (the main session) set the design, ran the DXIL size checks, made the tests read the nested form, wrote the second commit's check, did the rebases onto #1448's heads (now `51f9a05a`), ran the suite on the previous head, read the diff and wrote this description. A second Opus 5.5 agent reviewed the diff, and another reviewed the second commit (now `5d9d3209`). - A Claude Sonnet 5.5 subagent ran the smoke pair on the previous head. - 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). - 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 - The review fix on `5d9d3209` (the test's value): Claude Code, Claude Opus 5.5 (main session) orchestrated it, restacked #2018 and #2025 and updated this description; a Claude Sonnet 5.5 subagent made the change; subagents ran the suite and the smoke pair.
nnonno91 commented 2026-11-24 21:08:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-24T19:35:01Z.


Independent Windows GPU check of commit 00f10eeceb4b58738610a2138c4361d5f5a69582. Nested dispatch with a densely packed table matched the reference on both AMD and NVIDIA.

Tested

  • Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), and NVIDIA GeForce RTX 5090 (32.0.16.1742). Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11, debug/test profiles.
  • On the unmodified PR head with XCL_ADAPTER=AMD Radeon and the default compact settings, cargo build --workspace --locked succeeded. cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output reported 888 passed, 0 failed, 42 ignored. One of the reported passes logged an explicit skip, heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows.
  • For the targeted check, I temporarily extended tests_compact.rs and ran cargo test --locked -p xcl --lib -- gpu_compact_dense_nested_dispatch --test-threads=1 --nocapture once per adapter. Each run reported 2 passed, 0 failed, 0 ignored and no skips. Both used wave32, plus native wave64 on AMD or split wave64 on NVIDIA.
  • I adapted the four fixtures from gpu_compact_nested_dispatch to call compact_with with heavy=0, dense_above=0 and groups of 2 or 4. The generated HLSL used both word-spanning extraction and nested switches. Its table data matched the flat dense form (nest=0). Each adapter ran 32 nested kernel configurations across the default and unstructured translation options, matching 4,235,392 result bytes against translate and the flat dense form. The fixture tables contained 28 word-straddling entries across program/form pairs.
  • I also applied the same settings to the existing gpu_compact_compute_dispatch fixture. All four nested compute configurations per adapter matched a CPU calculation for all 256 thread stores and preserved 16 sentinel dwords. Both GPU controls matched the same calculation. The worktree was restored after the targeted checks.

Not tested

Retail output, cold compile timing, Intel, or Linux. The combined check forced the packing and grouping through compact_with.

AI use

OpenAI Codex (GPT-6 family, exact variant unavailable) adapted and ran the temporary tests, verified the logs, and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7142304830 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7142304830). Originally posted by [nnonno91](https://github.com/nnonno91) on 2026-11-24T19:35:01Z. --- Independent Windows GPU check of commit `00f10eeceb4b58738610a2138c4361d5f5a69582`. Nested dispatch with a densely packed table matched the reference on both AMD and NVIDIA. **Tested** - Windows 11 25H2 build 26200.9974, Ryzen 7 9800X3D, AMD Radeon(TM) Graphics (32.0.21042.62), and NVIDIA GeForce RTX 5090 (32.0.16.1742). Rust 1.100.0 MSVC, Windows SDK DXC 1.8.2502.11, debug/test profiles. - On the unmodified PR head with `XCL_ADAPTER=AMD Radeon` and the default compact settings, `cargo build --workspace --locked` succeeded. `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --show-output` reported 888 passed, 0 failed, 42 ignored. One of the reported passes logged an explicit skip, `heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows`. - For the targeted check, I temporarily extended `tests_compact.rs` and ran `cargo test --locked -p xcl --lib -- gpu_compact_dense_nested_dispatch --test-threads=1 --nocapture` once per adapter. Each run reported 2 passed, 0 failed, 0 ignored and no skips. Both used wave32, plus native wave64 on AMD or split wave64 on NVIDIA. - I adapted the four fixtures from `gpu_compact_nested_dispatch` to call `compact_with` with `heavy=0`, `dense_above=0` and groups of 2 or 4. The generated HLSL used both word-spanning extraction and nested switches. Its table data matched the flat dense form (`nest=0`). Each adapter ran 32 nested kernel configurations across the default and unstructured translation options, matching 4,235,392 result bytes against `translate` and the flat dense form. The fixture tables contained 28 word-straddling entries across program/form pairs. - I also applied the same settings to the existing `gpu_compact_compute_dispatch` fixture. All four nested compute configurations per adapter matched a CPU calculation for all 256 thread stores and preserved 16 sentinel dwords. Both GPU controls matched the same calculation. The worktree was restored after the targeted checks. **Not tested** Retail output, cold compile timing, Intel, or Linux. The combined check forced the packing and grouping through `compact_with`. **AI use** OpenAI Codex (GPT-6 family, exact variant unavailable) adapted and ran the temporary tests, verified the logs, and wrote this report.
Pipodi commented 2026-11-24 21:08:58 +00:00 (Migrated from github.com)

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


@nnonno91 thanks. Your report covers one of the PR's Not tested points: the nested form with a packed table. You ran it on the GPU and it matched the flat dense form on AMD and NVIDIA, in wave32 and in native wave64 on AMD. That's a check the 4090 here can't make (no wave64). The other points are still open: retail programs on the GPU, AMD timing, and the merge order with #1548.

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

<!-- greyfinch-sync:ivall/xcl:comment:7142337901 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7142337901). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T19:36:27Z. --- @nnonno91 thanks. Your report covers one of the PR's **Not tested** points: the nested form with a packed table. You ran it on the GPU and it matched the flat dense form on AMD and NVIDIA, in wave32 and in native wave64 on AMD. That's a check the 4090 here can't make (no wave64). The other points are still open: retail programs on the GPU, AMD timing, and the merge order with #1548. **AI use:** Claude Code (Claude Opus 5.5) wrote this reply.
brothernog commented 2026-11-24 21:09:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by brothernog on 2026-11-24T20:02:29Z.


Tested 00f10ee on an RTX 3050 8 GB (desktop, Ryzen 7 5800XT) (NVIDIA 610.88, Windows 11 build 26300, DXC 1.9.2602.17, release), with a retail program. This covers part of the Not tested point "retail programs on the GPU", on a smaller card than the 4090.

ActivateRays (95cc13288a27a96e), translated as the runtime does with XCL_COMPACT_CS=1 XCL_HEAP_WINDOWS=1 and the translation cache off. Then a cold CreateComputePipelineState with the runtime's root signature and samplers, one PSO per process, one run each:

Form DXIL DXC Driver (cold) Driver peak commit Accepted
flat (XCL_COMPACT_NEST unset) 2,560,316 B 39.6 s 312.0 s 3,962 MB yes
XCL_COMPACT_NEST=32 906,364 B 19.0 s 31.8 s 850 MB yes
  • On this card the nested form is about 10× faster in the driver (on the 4090 it was about 4.4×), and it uses about 4.7× less commit.
  • "Peak commit" is the process's PeakPagefileUsage from K32GetProcessMemoryInfo, read right after the PSO call (66 MB before it). It may count differently from your 8.2 GB / 1.5 GB figures.
  • The sizes differ from yours because of heap windows (XCL_HEAP_WINDOWS=1); the nested-to-flat ratio is close (0.35 here, 0.36 on the 4090).

Not tested: main (kole's 8 GB run ran out of commit in DXC), other values of P, and a title run.

This comment was AI-assisted.

<!-- greyfinch-sync:ivall/xcl:comment:7142956912 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7142956912). Originally posted by [brothernog](https://github.com/brothernog) on 2026-11-24T20:02:29Z. --- Tested `00f10ee` on an RTX 3050 8 GB (desktop, Ryzen 7 5800XT) (NVIDIA 610.88, Windows 11 build 26300, DXC 1.9.2602.17, release), with a retail program. This covers part of the **Not tested** point "retail programs on the GPU", on a smaller card than the 4090. ActivateRays (`95cc13288a27a96e`), translated as the runtime does with `XCL_COMPACT_CS=1 XCL_HEAP_WINDOWS=1` and the translation cache off. Then a cold `CreateComputePipelineState` with the runtime's root signature and samplers, one PSO per process, one run each: | Form | DXIL | DXC | Driver (cold) | Driver peak commit | Accepted | |---|---|---|---|---|---| | flat (`XCL_COMPACT_NEST` unset) | 2,560,316 B | 39.6 s | 312.0 s | 3,962 MB | yes | | `XCL_COMPACT_NEST=32` | 906,364 B | 19.0 s | 31.8 s | 850 MB | yes | - On this card the nested form is about 10× faster in the driver (on the 4090 it was about 4.4×), and it uses about 4.7× less commit. - "Peak commit" is the process's `PeakPagefileUsage` from `K32GetProcessMemoryInfo`, read right after the PSO call (66 MB before it). It may count differently from your 8.2 GB / 1.5 GB figures. - The sizes differ from yours because of heap windows (`XCL_HEAP_WINDOWS=1`); the nested-to-flat ratio is close (0.35 here, 0.36 on the 4090). Not tested: `main` (kole's 8 GB run ran out of commit in DXC), other values of `P`, and a title run. This comment was AI-assisted.
Pipodi commented 2026-11-24 21:09:15 +00:00 (Migrated from github.com)

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


@brothernog thanks, that's the first run of #1692 on a retail program on a small card. In the heap form, the driver went from 312 s to 31.8 s and its peak from 3,962 to 850 MB, and both pipelines were accepted. That is about 10× here against 4.4× on the 4090, so the small cards gain the most. On the 4090, the grid in #1269 (7142472413) puts the driver's time at about merge operands^0.8 × blocks. Yours looks steeper than that on this card. I'll use your table as the 8 GB data point when PR 2 (on by default above a case count) is measured.

Note: #1692 is now in conflict with main through #1316 (#1524 changed console_translation in pso.rs). I'll rebase it after #1316's next head.

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

<!-- greyfinch-sync:ivall/xcl:comment:7142976959 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7142976959). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T20:03:19Z. --- @brothernog thanks, that's the first run of #1692 on a retail program on a small card. In the heap form, the driver went from 312 s to 31.8 s and its peak from 3,962 to 850 MB, and both pipelines were accepted. That is about 10× here against 4.4× on the 4090, so the small cards gain the most. On the 4090, the grid in #1269 (7142472413) puts the driver's time at about merge operands^0.8 × blocks. Yours looks steeper than that on this card. I'll use your table as the 8 GB data point when PR 2 (on by default above a case count) is measured. Note: #1692 is now in conflict with `main` through #1316 (#1524 changed `console_translation` in `pso.rs`). I'll rebase it after #1316's next 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:45Z.


Rebased onto #1448's new head 42b2f11 (on #1316 f207df1, on main 85e3826). The new head is 7123faa. The commit's patch is the same as 00f10ee's, so the tests and measurements made at 00f10ee (@0naku, @nnonno91, @brothernog) cover the same code.

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

The description has the new counts and both blocks.

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:7143401729 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7143401729). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T20:20:45Z. --- Rebased onto #1448's new head `42b2f11` (on #1316 `f207df1`, on `main` `85e3826`). The new head is `7123faa`. The commit's patch is the same as `00f10ee`'s, so the tests and measurements made at `00f10ee` (@0naku, @nnonno91, @brothernog) cover the same code. - On the RTX 4090, the whole suite gave 905 passed, 0 failed, 42 ignored. - The smoke run against `main` `85e3826` reached 102.7 % of `main`'s frames and 99.3 % of its peak commit, with no crash or device removal. The description has the new counts and both blocks. **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.
t4l03 commented 2026-11-24 21:09:32 +00:00 (Migrated from github.com)

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


@Pipodi a clarification for the compatibility note in the description: #1548 at 9c26337 collects operands from decoded instructions, groups the block bodies, and only then emits the dispatch switch. Reading the emitted switch was part of the earlier HLSL prototype. I checked the two public heads (9c26337 and 7123faa) with git merge-tree; they do conflict in compact.rs and pso.rs. Whichever lands second will need to reconcile dispatch emission and cache names. We have no measurements with both options enabled yet.

AI use

Codex (gpt-6.2-sol) checked the source and merge tree and drafted this note.

<!-- greyfinch-sync:ivall/xcl:comment:7143652852 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7143652852). Originally posted by [t4l03](https://github.com/t4l03) on 2026-11-24T20:30:31Z. --- @Pipodi a clarification for the compatibility note in the description: #1548 at `9c26337` collects operands from decoded instructions, groups the block bodies, and only then emits the dispatch switch. Reading the emitted switch was part of the earlier HLSL prototype. I checked the two public heads (`9c26337` and `7123faa`) with `git merge-tree`; they do conflict in `compact.rs` and `pso.rs`. Whichever lands second will need to reconcile dispatch emission and cache names. We have no measurements with both options enabled yet. **AI use** Codex (gpt-6.2-sol) checked the source and merge tree and drafted this note.
Pipodi commented 2026-11-24 21:09:32 +00:00 (Migrated from github.com)

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


@t4l03 thank you, you're right. #1548's own commits on top of #1448 (c934db6, 8891798, 9c26337) build the dispatch from the decoded instructions and don't parse the HLSL. I've corrected the line in the description. It now says that the two PRs conflict in compact.rs and pso.rs (I see the same with git merge-tree of 9c26337 and 7123faa), that whichever merges second reconciles the dispatch emission and the cache names, and that they haven't been run together.

AI use: Claude Code (Claude Opus 5.5) checked the merge tree and #1548's commits, and wrote this comment.

<!-- greyfinch-sync:ivall/xcl:comment:7143678676 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7143678676). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T20:31:31Z. --- @t4l03 thank you, you're right. #1548's own commits on top of #1448 (`c934db6`, `8891798`, `9c26337`) build the dispatch from the decoded instructions and don't parse the HLSL. I've corrected the line in the description. It now says that the two PRs conflict in `compact.rs` and `pso.rs` (I see the same with `git merge-tree` of `9c26337` and `7123faa`), that whichever merges second reconciles the dispatch emission and the cache names, and that they haven't been run together. **AI use:** Claude Code (Claude Opus 5.5) checked the merge tree and #1548's commits, and wrote this comment.
einfachama commented 2026-11-24 22:06:48 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by einfachama on 2026-11-24T21:41:24Z.


Test report for #1692 with XCL_COMPACT_NEST=32 and heap windows, in title runs of my retail title on an 8 GB NVIDIA card. It covers the "Not tested" item "a title run" for both big programs.

  • 15ec6daefb19a780: builds in the driver in 24.9 s from cold, where the other forms I tried on this card did not finish.
  • 56c0cd3b82a00c6e: builds in 10.5 s.
  • Both: loaded from their driver blobs in later runs.
  • The title: in 5 runs it still does not present again after its world load starts. With #1288 holding its watchdog, it is now held by first-time builds of other big compute programs, one after another.

Setup

  • Hardware: NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves only), Ryzen 7 5800X, 32 GB RAM (commit limit 63.9 GB), Windows 11 Pro 26300, Rust 1.100.0, DXC 1.9.2602.17, release builds.
  • Stack, local and not pushed: main b9b6ea6 (#1288 and #1524 are in it) + #899 f3b7dd6 + one local log line (what a bind waits for, logged at the start of the wait; not part of any PR) + #1315 / #1316 5749171 + #1321 69a892c + #1448 b370923 + #1692 00f10ee.
  • Three conflicts, all mechanical, none in #1448 or #1692:
    • #899 against #1288 in resolve_wait_for: both kept, _held set from #899's already.
    • #1316 against main's pub(crate) console_translation: #1316's version kept as pub(crate); the two main callers (console_hlsl, measure_pso) pass CompactCs::get(), as #1316 does for console_to_hlsl.
    • #1321 against #1315's prepare(): let program = code; at the top of translate.
  • Current heads: #1692's 7123faa and #1448's 42b2f11 have the same patch ids as 00f10ee and b370923.
  • Settings: XCL_HEAP_WINDOWS=1, XCL_COMPACT_NEST=32, XCL_COMPACT_CS unset (auto), XCL_NETWORK=0, XCL_RUN_SECONDS=420, thread dumps at 100, 130, 160, 200, 260, 340 s. A pressed at 26 s and 30 s; the world load starts by itself at ~66 s.
  • Runs: 5, each starting from the caches the run before left. Between runs 2 and 3, two runs of another configuration (direct DXIL, below) ran; their DXIL differs, and they added 3 lines to the earlier-run list. The first started from caches made by other builds, whose DXIL and blobs mostly did not apply to this one (661 DXC compiles in it). No restore, no A/B on this base.
  • Tests on this stack (debug), with the variable unset, all passed:
    • compact 30 (SKIPPED gpu_compact_native_wave64_form: no wave64), nested 5, shared_targets 1, dense_table 1;
    • oversized_structured 1, memory_windows 7, heap_window 2, pso_async 8, big_compile 8.
  • With XCL_COMPACT_NEST=32 set for the whole test run, 15 compact tests fail. All stop at the same step: they read the HLSL for the flat dispatch line switch ((XCL_BT[xcl_b / , which the nested form replaces, and the GPU tests among them panic there before they run.
    • This PR's own nested tests set the group size themselves and pass.
    • This may be expected for a switch that is off by default.
  • The whole suite was not run.

The two programs, nested, in the title

15ec6daefb19a780 (record 95cc13288a27a96e) 56c0cd3b82a00c6e (code hash d122faa48eb0afdc)
compact line, run 1 128.2 s: 76699 instructions, 2280459 B HLSL 128.8 s: 88863 instructions, 737038 B HLSL
DXIL 904 932 B 561 008 B
DXC (compact line to driver start, less the wait at the huge-compile gate) ~13 s ~10 s
driver, run 1 (cold, on a preload worker) 24 934 ms (after 7 270 ms at the gate) 10 488 ms
blob kept; runs 2–5 load it in 8 ms (run 2) at ~5 s kept; 5 ms (run 2)
  • In 5 runs there were no driver refusals, refused blobs, heap-window fallbacks, device removals or crashes.
  • For comparison, the same programs on this card with other forms, earlier the same night on other bases:
    • 15ec6daefb19a780 in the pc-block form (#1316 + #1321, compact refused at 9 975 table words): 13 297 372 B of DXIL, ~80 s of DXC. Not finished in the driver after 244–327 s, in 3 runs. Base c160d86 with #1288.
    • 56c0cd3b82a00c6e in #1316's flat compact form: 983 404 B, 23.9 s in the driver. Same base.
    • Direct DXIL (main b9b6ea6 with #1316 / #1321, no #1448 / #1692; XCL_DIRECT_DXIL=1 with XCL_COMPACT_CS=0 forced, which is not the default routing; without it neither program goes to the direct translator):
      • 15ec6daefb19a780: 8 360 348 B. 56c0cd3b82a00c6e: 13 166 716 B.
      • Neither finished in the driver: 65–79 s in when the runs ended (in one run 15ec6daefb19a780 had not reached the driver).
      • Both runs were ended by my memory guard (36 GB for the process) at 214 s and 162 s, with available physical memory down to 0.05 GB and 0.01 GB. Up to nine threads were in the NVIDIA compiler at once.
      • No validator errors or direct-DXIL fallbacks.

The title: 5 runs

run 1 run 2 run 3 run 4 run 5
last 2 s window with a present 112 s 100 s 102 s 94 s 96 s
presents after it (to 420 s) 0 0 0 0 0
compute waits ≥ 250 ms: n / total / longest 147 / 550 s / 22 s 40 / 628 s / 82 s 41 / 596 s / 90 s 49 / 582 s / 43 s 20 / 593 s / 40 s
compute builds after 94 s (from blobs) 261 (32) 252 (87) 119 (31) 59 (0) 10 (0)
of these ≥ 500 KB DXIL, compiled (driver s) 16 (280 s) 19 (387 s) 18 (317 s) 13 (225 s) 10 (148 s)
≥ 500 KB programs from blobs before 94 s 1 18 40 63 77
longest single build (DXIL, driver) 370 KB, 7.2 s 1 394 KB, 40.6 s 1 555 KB, 44.8 s 1 054 KB, 21.4 s 1 074 KB, 19.9 s
peak commit / lowest available physical memory 30.8 GB / 1.02 GB 32.6 GB / 0.54 GB 32.2 GB / 0.25 GB 30.9 GB / 0.55 GB 30.3 GB / 0.88 GB
  • All 5 ran to the 420 s limit (exit 0). The title's watchdog did not fire (#1288).
  • What holds it now, in the thread dumps at 260 s and 340 s:
    • one or two title threads in their own build of a compute pipeline, in DXC or the NVIDIA compiler, one program after another, ~30 s each (about half DXC, half driver);
    • the other title threads idle; #1288 holding only the watchdog's sleep.
    • None of these programs is 15ec6daefb19a780 or 56c0cd3b82a00c6e.
  • Over the runs:
    • Each run loads more big programs from earlier runs' blobs before the stall (1 → 77).
    • The small programs leave the stall (261 → 10 compute builds after 94 s).
    • The time spent waiting does not shrink: run 5 spends ~300 s on 10 new programs of 733–1 074 KB.

Not tested

  • An A/B on this base (with and without #1692, or other values of XCL_COMPACT_NEST), and the flat #1448 form of 15ec6daefb19a780 on this card.
  • Cold caches for every run; heap windows off; more than 5 runs; whether the chain of new programs ends.
  • Whether the nested programs compute the right results in the title: no world frame was drawn in any run.
  • AMD, other NVIDIA cards, Linux / Wine. The whole test suite.

AI use

  • Claude Code (Claude Opus 5.5) merged the stack, resolved the conflicts, added the local log line, ran the tests and the runs, counted the results from the logs and thread dumps, and wrote this report. Claude Fable 5.2 (in the Claude app) planned the tests and reviewed the report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7145260837 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7145260837). Originally posted by [einfachama](https://github.com/einfachama) on 2026-11-24T21:41:24Z. --- Test report for #1692 with `XCL_COMPACT_NEST=32` and heap windows, in title runs of my retail title on an 8 GB NVIDIA card. It covers the "Not tested" item "a title run" for both big programs. - **`15ec6daefb19a780`:** builds in the driver in 24.9 s from cold, where the other forms I tried on this card did not finish. - **`56c0cd3b82a00c6e`:** builds in 10.5 s. - **Both:** loaded from their driver blobs in later runs. - **The title:** in 5 runs it still does not present again after its world load starts. With #1288 holding its watchdog, it is now held by first-time builds of other big compute programs, one after another. **Setup** - **Hardware:** NVIDIA GeForce RTX 4060 8 GB (driver 621.24, 32-lane waves only), Ryzen 7 5800X, 32 GB RAM (commit limit 63.9 GB), Windows 11 Pro 26300, Rust 1.100.0, DXC 1.9.2602.17, release builds. - **Stack, local and not pushed:** `main` `b9b6ea6` (#1288 and #1524 are in it) + #899 `f3b7dd6` + one local log line (what a bind waits for, logged at the start of the wait; not part of any PR) + #1315 / #1316 `5749171` + #1321 `69a892c` + #1448 `b370923` + #1692 `00f10ee`. - **Three conflicts, all mechanical, none in #1448 or #1692:** - #899 against #1288 in `resolve_wait_for`: both kept, `_held` set from #899's `already`. - #1316 against `main`'s `pub(crate) console_translation`: #1316's version kept as `pub(crate)`; the two `main` callers (`console_hlsl`, `measure_pso`) pass `CompactCs::get()`, as #1316 does for `console_to_hlsl`. - #1321 against #1315's `prepare()`: `let program = code;` at the top of `translate`. - **Current heads:** #1692's `7123faa` and #1448's `42b2f11` have the same patch ids as `00f10ee` and `b370923`. - **Settings:** `XCL_HEAP_WINDOWS=1`, `XCL_COMPACT_NEST=32`, `XCL_COMPACT_CS` unset (auto), `XCL_NETWORK=0`, `XCL_RUN_SECONDS=420`, thread dumps at 100, 130, 160, 200, 260, 340 s. A pressed at 26 s and 30 s; the world load starts by itself at ~66 s. - **Runs:** 5, each starting from the caches the run before left. Between runs 2 and 3, two runs of another configuration (direct DXIL, below) ran; their DXIL differs, and they added 3 lines to the earlier-run list. The first started from caches made by other builds, whose DXIL and blobs mostly did not apply to this one (661 DXC compiles in it). No restore, no A/B on this base. - **Tests on this stack (debug), with the variable unset, all passed:** - `compact` 30 (SKIPPED `gpu_compact_native_wave64_form`: no wave64), `nested` 5, `shared_targets` 1, `dense_table` 1; - `oversized_structured` 1, `memory_windows` 7, `heap_window` 2, `pso_async` 8, `big_compile` 8. - **With `XCL_COMPACT_NEST=32` set for the whole test run, 15 `compact` tests fail.** All stop at the same step: they read the HLSL for the flat dispatch line `switch ((XCL_BT[xcl_b / `, which the nested form replaces, and the GPU tests among them panic there before they run. - This PR's own nested tests set the group size themselves and pass. - This may be expected for a switch that is off by default. - The whole suite was not run. **The two programs, nested, in the title** | | `15ec6daefb19a780` (record `95cc13288a27a96e`) | `56c0cd3b82a00c6e` (code hash `d122faa48eb0afdc`) | |---|---|---| | compact line, run 1 | 128.2 s: `76699 instructions, 2280459 B HLSL` | 128.8 s: `88863 instructions, 737038 B HLSL` | | DXIL | **904 932 B** | **561 008 B** | | DXC (compact line to driver start, less the wait at the huge-compile gate) | ~13 s | ~10 s | | driver, run 1 (cold, on a preload worker) | **24 934 ms** (after 7 270 ms at the gate) | **10 488 ms** | | blob | kept; runs 2–5 load it in 8 ms (run 2) at ~5 s | kept; 5 ms (run 2) | - In 5 runs there were no driver refusals, refused blobs, heap-window fallbacks, device removals or crashes. - **For comparison, the same programs on this card with other forms**, earlier the same night on other bases: - **`15ec6daefb19a780` in the `pc`-block form (#1316 + #1321, compact refused at 9 975 table words):** 13 297 372 B of DXIL, ~80 s of DXC. Not finished in the driver after 244–327 s, in 3 runs. Base `c160d86` with #1288. - **`56c0cd3b82a00c6e` in #1316's flat compact form:** 983 404 B, 23.9 s in the driver. Same base. - **Direct DXIL** (`main` `b9b6ea6` with #1316 / #1321, no #1448 / #1692; `XCL_DIRECT_DXIL=1` with **`XCL_COMPACT_CS=0` forced**, which is not the default routing; without it neither program goes to the direct translator): - `15ec6daefb19a780`: 8 360 348 B. `56c0cd3b82a00c6e`: 13 166 716 B. - Neither finished in the driver: 65–79 s in when the runs ended (in one run `15ec6daefb19a780` had not reached the driver). - Both runs were ended by my memory guard (36 GB for the process) at 214 s and 162 s, with available physical memory down to 0.05 GB and 0.01 GB. Up to nine threads were in the NVIDIA compiler at once. - No validator errors or direct-DXIL fallbacks. **The title: 5 runs** | | run 1 | run 2 | run 3 | run 4 | run 5 | |---|---|---|---|---|---| | last 2 s window with a present | 112 s | 100 s | 102 s | 94 s | 96 s | | presents after it (to 420 s) | 0 | 0 | 0 | 0 | 0 | | compute waits ≥ 250 ms: n / total / longest | 147 / 550 s / 22 s | 40 / 628 s / 82 s | 41 / 596 s / 90 s | 49 / 582 s / 43 s | 20 / 593 s / 40 s | | compute builds after 94 s (from blobs) | 261 (32) | 252 (87) | 119 (31) | 59 (0) | 10 (0) | | of these ≥ 500 KB DXIL, compiled (driver s) | 16 (280 s) | 19 (387 s) | 18 (317 s) | 13 (225 s) | 10 (148 s) | | ≥ 500 KB programs from blobs before 94 s | 1 | 18 | 40 | 63 | 77 | | longest single build (DXIL, driver) | 370 KB, 7.2 s | 1 394 KB, 40.6 s | 1 555 KB, 44.8 s | 1 054 KB, 21.4 s | 1 074 KB, 19.9 s | | peak commit / lowest available physical memory | 30.8 GB / 1.02 GB | 32.6 GB / 0.54 GB | 32.2 GB / 0.25 GB | 30.9 GB / 0.55 GB | 30.3 GB / 0.88 GB | - All 5 ran to the 420 s limit (exit 0). The title's watchdog did not fire (#1288). - **What holds it now, in the thread dumps at 260 s and 340 s:** - one or two title threads in their own build of a compute pipeline, in DXC or the NVIDIA compiler, one program after another, ~30 s each (about half DXC, half driver); - the other title threads idle; #1288 holding only the watchdog's sleep. - None of these programs is `15ec6daefb19a780` or `56c0cd3b82a00c6e`. - **Over the runs:** - Each run loads more big programs from earlier runs' blobs before the stall (1 → 77). - The small programs leave the stall (261 → 10 compute builds after 94 s). - The time spent waiting does not shrink: run 5 spends ~300 s on 10 new programs of 733–1 074 KB. **Not tested** - An A/B on this base (with and without #1692, or other values of `XCL_COMPACT_NEST`), and the flat #1448 form of `15ec6daefb19a780` on this card. - Cold caches for every run; heap windows off; more than 5 runs; whether the chain of new programs ends. - Whether the nested programs compute the right results in the title: no world frame was drawn in any run. - AMD, other NVIDIA cards, Linux / Wine. The whole test suite. **AI use** - Claude Code (Claude Opus 5.5) merged the stack, resolved the conflicts, added the local log line, ran the tests and the runs, counted the results from the logs and thread dumps, and wrote this report. Claude Fable 5.2 (in the Claude app) planned the tests and reviewed the report. I checked it before posting.
St5sz2Jk commented 2026-11-24 22:06:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by St5sz2Jk on 2026-11-24T21:47:25Z.


Test report for #1692 7123faa on Linux / RADV (RDNA4), with XCL_COMPACT_NEST=32. It covers part of the Not tested item "AMD, Intel and dxil-spirv". ActivateRays builds in the title, but RADV takes 244 s and the process peaks at 45.5 GB, against 70 s for the flat form with @0naku's switch-tree patch on the same card.

Tested

  • RX 9070 XT 16 GB (RDNA4, native wave64), Mesa RADV 26.3.1, Ryzen 9 5950X, 128 GB, CachyOS (kernel 7.3.5-2-cachyos), Wine 11.22.
  • vkd3d-proton ec207194 (dxil-spirv 7c048638), -Db_ndebug=true, with @0naku's fast_dominates and recursion-fix patches and a LoopMergeTracer fix (#1269, 7144483258). No switch tree: it makes invalid SPIR-V on some graphics shaders (same comment).
  • XCL main 4178e88 + #871 b66a150 + #684 e56dbc3 + #1448 42b2f11 + #640 5d6fac8 + this PR's 7123faa (cherry-picked), release, cross-built for x86_64-pc-windows-msvc. XCL_COMPACT_NEST=32, XCL_DIRECT_DXIL=1, XCL_PAGE_BUDGET_MB=4096, XCL_PSO_TRACE=1.
  • One title run of the retail title (1.0.2.1), warm DXIL cache, menus driven by my human API.

ActivateRays (95cc13288a27a96e)

this PR, NEST=32 flat form + switch tree (my earlier run)
DXIL 1,036,712 B 2,848,780 B
dxil-spirv, native CLI 0.6 s, 0.17 GB, 3.7 MB of SPIR-V, spirv-val passes at default limits 14.8 s, 0.46 GB
RADV in the title (driver compile finish) 244.0 s (after 23.9 s waiting for the gate) 69.8 s
process memory 12.7 GB → 45.5 GB peak while it built 36.7 GB at the end of that run
  • The nesting problem is gone in this form, and dxil-spirv's default structurizer handles it without the switch tree. The cost moves into RADV: dxil-spirv finishes in under a second, so the 244 s are the driver's.
  • @0naku measured this form at 45 s on NVIDIA Linux (7142130114). So on RADV the two-level form is the slower option, at least at P = 32.

The rest of the run

  • 2,154 s with 2,332 driver compiles. There were no driver faults, and Mesa rejected no SPIR-V (MESA_SPIRV_FAIL_DUMP_PATH stayed empty).
  • It ended on the title's watchdog (+0x23cf683) with 56,524 pipelines queued and none compiling (window overlay at about 1,840 s). That is the scheduling stall described in #1269, not something this PR causes.

Not tested: other P values; NEST with the switch tree; a cold driver cache for the other programs; repeat runs; RDNA2/3.

AI use: Claude Code (Claude Opus 5.5) built the trees and vkd3d-proton, ran the offline conversion, read the logs and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7145390902 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7145390902). Originally posted by [St5sz2Jk](https://github.com/St5sz2Jk) on 2026-11-24T21:47:25Z. --- Test report for #1692 `7123faa` on **Linux / RADV (RDNA4)**, with `XCL_COMPACT_NEST=32`. It covers part of the **Not tested** item "AMD, Intel and dxil-spirv". **ActivateRays builds in the title, but RADV takes 244 s and the process peaks at 45.5 GB, against 70 s for the flat form with @0naku's switch-tree patch on the same card.** **Tested** - RX 9070 XT 16 GB (RDNA4, native wave64), Mesa RADV 26.3.1, Ryzen 9 5950X, 128 GB, CachyOS (kernel `7.3.5-2-cachyos`), Wine 11.22. - vkd3d-proton `ec207194` (dxil-spirv `7c048638`), `-Db_ndebug=true`, with @0naku's `fast_dominates` and recursion-fix patches and a `LoopMergeTracer` fix (#1269, 7144483258). **No switch tree:** it makes invalid SPIR-V on some graphics shaders (same comment). - XCL `main` `4178e88` + #871 `b66a150` + #684 `e56dbc3` + #1448 `42b2f11` + #640 `5d6fac8` + this PR's `7123faa` (cherry-picked), release, cross-built for `x86_64-pc-windows-msvc`. `XCL_COMPACT_NEST=32`, `XCL_DIRECT_DXIL=1`, `XCL_PAGE_BUDGET_MB=4096`, `XCL_PSO_TRACE=1`. - One title run of the retail title (1.0.2.1), warm DXIL cache, menus driven by my human API. **`ActivateRays` (`95cc13288a27a96e`)** | | this PR, `NEST=32` | flat form + switch tree (my earlier run) | |---|---|---| | DXIL | 1,036,712 B | 2,848,780 B | | dxil-spirv, native CLI | 0.6 s, 0.17 GB, 3.7 MB of SPIR-V, `spirv-val` passes at default limits | 14.8 s, 0.46 GB | | RADV in the title (`driver compile finish`) | **244.0 s** (after 23.9 s waiting for the gate) | 69.8 s | | process memory | 12.7 GB → **45.5 GB** peak while it built | 36.7 GB at the end of that run | - The nesting problem is gone in this form, and dxil-spirv's default structurizer handles it without the switch tree. The cost moves into RADV: dxil-spirv finishes in under a second, so the 244 s are the driver's. - @0naku measured this form at 45 s on NVIDIA Linux (7142130114). So on RADV the two-level form is the slower option, at least at P = 32. **The rest of the run** - 2,154 s with 2,332 driver compiles. There were no driver faults, and Mesa rejected no SPIR-V (`MESA_SPIRV_FAIL_DUMP_PATH` stayed empty). - It ended on the title's watchdog (`+0x23cf683`) with 56,524 pipelines queued and none compiling (window overlay at about 1,840 s). That is the scheduling stall described in #1269, not something this PR causes. **Not tested:** other `P` values; `NEST` with the switch tree; a cold driver cache for the other programs; repeat runs; RDNA2/3. **AI use:** Claude Code (Claude Opus 5.5) built the trees and vkd3d-proton, ran the offline conversion, read the logs and wrote this report.
DavidM1911 commented 2026-11-24 22:06:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T22:02:39Z.


Verification on RTX 3060 Ti (Windows 11): merge conflict with current main in crates/xcl/src/gpu/recomp/mod.rs — needs a rebase before it can be tested.

<!-- greyfinch-sync:ivall/xcl:comment:7145726188 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7145726188). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-24T22:02:39Z. --- Verification on RTX 3060 Ti (Windows 11): **merge conflict with current `main`** in `crates/xcl/src/gpu/recomp/mod.rs` — needs a rebase before it can be tested.
Pipodi commented 2026-11-25 00:08:51 +00:00 (Migrated from github.com)

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


New head 9c09c8f, rebased onto #1448's new head 57d7574, which bounds the select list. The nested emission itself is unchanged. Two test changes are in the same commit:

  • @einfachama's finding: with XCL_COMPACT_NEST set for the whole run, 15 compact tests stopped at the flat switch line. The tests' HLSL reader (Dispatch::of) now reads the nested form too. With the variable unset, =32 and =2, cargo test -p xcl --lib compact gives 33 passed, 0 failed each, so setting it now runs those tests on the nested form.
  • gpu_compact_nested_dispatch now also runs #1448's many_targets. Without it, the nested dispatch combined with the select tree was only compared with translate when the variable was set.

Whole suite on 9c09c8f: 990 passed, 0 failed, 42 ignored. The smoke pair against main 689f2db is in the description (89.6 % of main's frames, no device removal, no crash). The description also links the three test reports: @brothernog (RTX 3050, 31.8 s against 312 s), @einfachama (RTX 4060, 24.9 s in a title run) and @St5sz2Jk (RADV, slower nested: 244 s against 70 s flat with the switch-tree patch). Thanks to all three.

Turning the nest on by default is a separate step, claimed on #1269, after measurements on the ~700-case programs.

AI use: Claude Code with Claude Opus 5.5.

<!-- greyfinch-sync:ivall/xcl:comment:7147298142 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7147298142). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-24T23:20:55Z. --- New head `9c09c8f`, rebased onto #1448's new head `57d7574`, which bounds the select list. The nested emission itself is unchanged. Two test changes are in the same commit: - @einfachama's finding: with `XCL_COMPACT_NEST` set for the whole run, 15 compact tests stopped at the flat switch line. The tests' HLSL reader (`Dispatch::of`) now reads the nested form too. With the variable unset, `=32` and `=2`, `cargo test -p xcl --lib compact` gives 33 passed, 0 failed each, so setting it now runs those tests on the nested form. - `gpu_compact_nested_dispatch` now also runs #1448's `many_targets`. Without it, the nested dispatch combined with the select tree was only compared with `translate` when the variable was set. Whole suite on `9c09c8f`: 990 passed, 0 failed, 42 ignored. The smoke pair against `main` `689f2db` is in the description (89.6 % of `main`'s frames, no device removal, no crash). The description also links the three test reports: @brothernog (RTX 3050, 31.8 s against 312 s), @einfachama (RTX 4060, 24.9 s in a title run) and @St5sz2Jk (RADV, slower nested: 244 s against 70 s flat with the switch-tree patch). Thanks to all three. Turning the nest on by default is a separate step, [claimed on #1269](https://github.com/xcl-dev/xcl/issues/1269#issuecomment-7147119069), after measurements on the ~700-case programs. AI use: Claude Code with Claude Opus 5.5.
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:41Z.


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:7148131538 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7148131538). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-25T00:05:41Z. --- 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.
Swagi-REDACTED commented 2026-11-25 06:06:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Swagi-REDACTED on 2026-11-25T05:52:26Z.


Targeted RTX 3060 result for the exact compute record 95cc13288a27a96e from A newer retail game. This follows the table-cap fallback seen during world loading with #1316.

Hardware: Ryzen 7 9800X3D, RTX 3060 12 GB (driver 621.14), approximately 16 GB RAM, Windows 11 Home 26200. Rust 1.95.0 MSVC; DXC/DXIL 1.9.2602.17.

Tested local integration: main cbc296ab65a2661a61e3e2da109134bcd5319f60 plus #1315/#1316, then only the top commits 57d7574 (#1448) and 9c09c8f (#1692), preserving their authors. Local head 2ab922a. This is not an unmodified PR-head test: the integration retains main's shared shader cache and direct-DXIL cached-only deferral, has a one-line current mesh-cache signature adjustment, and an optional private live-input harness.

With XCL_COMPACT_CS=auto and XCL_COMPACT_NEST=32:

xcl shaders <private-single-record-folder> --precompile --only cs --pipelines --limit 1
compact backend, compute program 15ec6daefb19a780: 76699 instructions, 2392596 B HLSL
compiled 1, already cached 0, errors 0, skipped (GS – paired at pipeline creation) 0, time 45.8 s
pipelines made on the GPU 1, refused 0
pipelines loaded from the driver cache 0

The serialized _c_n32 cache payload contains 1,068,976 bytes of DXIL. In the preceding #1316-based title run, this record's compact translation exceeded the 8,192-word cap (9,979 words), fell back, and entered driver compilation with 10,896,240 bytes of DXIL. It had not finished when that run was intentionally stopped. This is not a completed before/after timing comparison, or an A/B isolating #1692 from #1448.

Validation of this integration:

  • cargo test --locked -p xcl --lib compact -- --test-threads=4: 38 passed, 0 failed, 0 ignored; 1 explicit native-wave64 skip.
  • cargo test --locked -p xcl --lib gpu::recomp::pso::shader_cache_tests -- --test-threads=4: 19 passed, 0 failed, 0 ignored; no explicit skips.
  • cargo test --locked --workspace -- --test-threads=4: 1,190 passed, 0 failed, 46 ignored, across 21 result blocks; 26 explicit skip events included among passes (21 unavailable native-wave64 paths, 3 unsupported per-lane f16 cases, 1 heap-window-disabled case, 1 PSO measurement requiring Windows Developer Mode). Optional game-sample environment variables were unset.
  • cargo build --locked --release --workspace passed (46.52 s).

Not tested: clean main/head smoke pair; completed gameplay/prologue; other GPUs. A new live world-load test is running separately. No game data is attached.

AI use: Codex, GPT-6 (exact serving variant not exposed), integrated the existing patches and ran/wrote this report. This report claims no authorship of the upstream compact-backend changes.

<!-- greyfinch-sync:ivall/xcl:comment:7154220120 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7154220120). Originally posted by [Swagi-REDACTED](https://github.com/Swagi-REDACTED) on 2026-11-25T05:52:26Z. --- Targeted RTX 3060 result for the exact compute record `95cc13288a27a96e` from **A newer retail game**. This follows the table-cap fallback seen during world loading with #1316. Hardware: Ryzen 7 9800X3D, RTX 3060 12 GB (driver 621.14), approximately 16 GB RAM, Windows 11 Home 26200. Rust 1.95.0 MSVC; DXC/DXIL 1.9.2602.17. Tested local integration: main `cbc296ab65a2661a61e3e2da109134bcd5319f60` plus #1315/#1316, then only the top commits `57d7574` (#1448) and `9c09c8f` (#1692), preserving their authors. Local head `2ab922a`. This is **not an unmodified PR-head test**: the integration retains main's shared shader cache and direct-DXIL cached-only deferral, has a one-line current mesh-cache signature adjustment, and an optional private live-input harness. With `XCL_COMPACT_CS=auto` and `XCL_COMPACT_NEST=32`: ```text xcl shaders <private-single-record-folder> --precompile --only cs --pipelines --limit 1 compact backend, compute program 15ec6daefb19a780: 76699 instructions, 2392596 B HLSL compiled 1, already cached 0, errors 0, skipped (GS – paired at pipeline creation) 0, time 45.8 s pipelines made on the GPU 1, refused 0 pipelines loaded from the driver cache 0 ``` The serialized `_c_n32` cache payload contains **1,068,976 bytes of DXIL**. In the preceding #1316-based title run, this record's compact translation exceeded the 8,192-word cap (9,979 words), fell back, and entered driver compilation with **10,896,240 bytes of DXIL**. It had not finished when that run was intentionally stopped. This is not a completed before/after timing comparison, or an A/B isolating #1692 from #1448. Validation of this integration: - `cargo test --locked -p xcl --lib compact -- --test-threads=4`: 38 passed, 0 failed, 0 ignored; 1 explicit native-wave64 skip. - `cargo test --locked -p xcl --lib gpu::recomp::pso::shader_cache_tests -- --test-threads=4`: 19 passed, 0 failed, 0 ignored; no explicit skips. - `cargo test --locked --workspace -- --test-threads=4`: **1,190 passed, 0 failed, 46 ignored**, across 21 result blocks; **26 explicit skip events** included among passes (21 unavailable native-wave64 paths, 3 unsupported per-lane f16 cases, 1 heap-window-disabled case, 1 PSO measurement requiring Windows Developer Mode). Optional game-sample environment variables were unset. - `cargo build --locked --release --workspace` passed (46.52 s). Not tested: clean main/head smoke pair; completed gameplay/prologue; other GPUs. A new live world-load test is running separately. No game data is attached. AI use: Codex, GPT-6 (exact serving variant not exposed), integrated the existing patches and ran/wrote this report. This report claims no authorship of the upstream compact-backend changes.
Pipodi commented 2026-11-25 06:06:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-11-25T06:03:27Z.


@Swagi-REDACTED, thank you. This is the first RTX 3060 data point for this record, and it is useful for #1448 as well as this PR.

  • On #1316 alone, the compact table of this record needed 9,979 words, over the 8,192-word cap. The program then fell back to the normal form, which here is 10.9 MB of DXIL.
  • #1448 packs the table under the cap, so the compact form is kept. #1692's nest at 32 then gives the 1.07 MB of DXIL and the 45.8 s you measured.
  • On an RTX 4090 we measured 1,037,876 B for this record at P = 32. Your build has other options and other patches in it, so the two sizes are close but not expected to be equal.

As you say, this is not an A/B of #1692 against #1448. If your live world-load run finishes, a second report is welcome. I'll rebase the whole stack once #1316 is rebased and post the new heads.

AI use: Claude Code with Claude Opus 5.5.

<!-- greyfinch-sync:ivall/xcl:comment:7154396770 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7154396770). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-25T06:03:27Z. --- @Swagi-REDACTED, thank you. This is the first RTX 3060 data point for this record, and it is useful for #1448 as well as this PR. - On #1316 alone, the compact table of this record needed 9,979 words, over the 8,192-word cap. The program then fell back to the normal form, which here is 10.9 MB of DXIL. - #1448 packs the table under the cap, so the compact form is kept. #1692's nest at 32 then gives the 1.07 MB of DXIL and the 45.8 s you measured. - On an RTX 4090 we measured 1,037,876 B for this record at P = 32. Your build has other options and other patches in it, so the two sizes are close but not expected to be equal. As you say, this is not an A/B of #1692 against #1448. If your live world-load run finishes, a second report is welcome. I'll rebase the whole stack once #1316 is rebased and post the new heads. AI use: Claude Code with Claude Opus 5.5.
itsSio commented 2026-11-25 10:10:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by itsSio on 2026-11-25T09:59:03Z.


Tested

Independent check requested in #1269, on clean PR head 95e8abcfd8eb2da975255e5ea2c85ed2d812f37f, no local patches or merge. Windows 11 Pro 26200 on both systems, x64 MSVC, unoptimized dev/test with debug info off. cargo build --workspace --locked and cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture both exited 0 on each system.

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 1189 / 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 1189 / 0 / 46 28

Both runs 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).

Focused cargo test -p xcl --lib --locked gpu::recomp::tests_compact -- --test-threads=1 --nocapture: 25 / 0 / 0 on the Radeon RDNA2 iGPU (32.0.21043.5001, same Ryzen 7 system), with no runtime skips, and 25 / 0 / 0 on the RTX 2080 SUPER with one native-wave64 skip. This includes gpu_compact_nested_dispatch and nested_dispatch_runs_the_flat_cases; environment settings were left at defaults except for adapter and DXC selection.

Not tested

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

AI use

Ran via Samaritan:

  • OpenCode with OpenAI GPT-6.2 Sol (openai/gpt-6.2-sol): ran both Windows checks, verified the raw results and wrote this report.
<!-- greyfinch-sync:ivall/xcl:comment:7159064944 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7159064944). Originally posted by [itsSio](https://github.com/itsSio) on 2026-11-25T09:59:03Z. --- **Tested** Independent check requested in #1269, on clean PR head `95e8abcfd8eb2da975255e5ea2c85ed2d812f37f`, no local patches or merge. Windows 11 Pro 26200 on both systems, x64 MSVC, unoptimized dev/test with debug info off. `cargo build --workspace --locked` and `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture` both exited 0 on each system. | 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 | **1189 / 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 | **1189 / 0 / 46** | 28 | Both runs 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`). Focused `cargo test -p xcl --lib --locked gpu::recomp::tests_compact -- --test-threads=1 --nocapture`: **25 / 0 / 0** on the Radeon RDNA2 iGPU (`32.0.21043.5001`, same Ryzen 7 system), with no runtime skips, and **25 / 0 / 0** on the RTX 2080 SUPER with one native-wave64 skip. This includes `gpu_compact_nested_dispatch` and `nested_dispatch_runs_the_flat_cases`; environment settings were left at defaults except for adapter and DXC selection. **Not tested** Retail smoke or shader samples, full AMD workspace, RADV, Intel, or compile and gameplay performance. **AI use** Ran via Samaritan: - OpenCode with OpenAI GPT-6.2 Sol (`openai/gpt-6.2-sol`): ran both Windows checks, verified the raw results 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:29:07Z.


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:7178805431 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7178805431). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:29:07Z. --- 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:43:00 +00:00 (Migrated from github.com)

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


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:7222394905 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7222394905). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-27T15:43:00Z. --- 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:33 +00:00 (Migrated from github.com)

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


@DavidM1911 rebased onto current main (6089122a); new head f5c0edd5. 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:7226281046 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7226281046). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-11-27T19:11:33Z. --- @DavidM1911 rebased onto current main (6089122a); new head `f5c0edd5`. 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)
Foniass commented 2026-12-01 06:30:26 +00:00 (Migrated from github.com)

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


Triage (#1607) – head cf6d415

Stacked on #1448, which itself carries #1316's compact-backend commits rebased; only the top two commits (XCL_COMPACT_NEST and its test) belong here. #2018 and #2025 are stacked on this PR, and #1315, #1316 and #1548 share the lower compact commits, not the nested dispatch. None of it is on main.
No problems found in the nested dispatch in compact.rs::compact_with: an inner default still ends the loop through min(xcl_nb, n), and the cache name _c_n<P> keeps flat and nested entries apart.
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:7302952374 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7302952374). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T06:30:26Z. --- **Triage (#1607)** – head cf6d415 Stacked on #1448, which itself carries #1316's compact-backend commits rebased; only the top two commits (`XCL_COMPACT_NEST` and its test) belong here. #2018 and #2025 are stacked on this PR, and #1315, #1316 and #1548 share the lower compact commits, not the nested dispatch. None of it is on main. No problems found in the nested dispatch in `compact.rs::compact_with`: an inner `default` still ends the loop through `min(xcl_nb, n)`, and the cache name `_c_n<P>` keeps flat and nested entries apart. 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:21:52 +00:00 (Migrated from github.com)

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


Rerun on the new head (5d9d3209; the only change is the warm-settings test now using 32). The earlier report, on cf6d4158, is below.

merge-check
base: 6bfb5c5153
head: 5d9d320982
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2941 passed, 1 failed, 51 ignored (base: 2904 passed); SKIPPED: 26 (23 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime. Not this PR: it is the shared-counter race #3551 fixes, and it passed alone 3 of 3 on this merge.
review: git range-diff against cf6d4158: the only change is warm_settings_keep_compact_nest_switch, now comparing unset / 32 / 0, all values this PR's parse_nest accepts. My earlier note about auto is resolved. The rest is as reviewed below. shaders::warm_settings_keep_compact_nest_switch: 3 of 3 passed.
performance: as below (opt-in; the default path is unchanged against #1448).
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)

Earlier report on cf6d4158 (base b2b1f109)
merge-check
base: b2b1f109d27e746a62ec95b04dd1f9924452e682
head: cf6d415843984e9c86eef29220fa2f188bfbcb60
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2940 passed, 0 failed, 51 ignored (second run; #1448's head merged alone: 2933 passed; base: 2902 passed); SKIPPED: 26 (23 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), the same set as #1448 merged alone; failing: none reproduced. The first suite run's lib binary ended with 0xc0000005 (STATUS_ACCESS_VIOLATION) with no test named; the dump showed one unnamed thread deep in recursion. It did not come back in the second suite or in 3 more lib runs (3 of 3 ok, ~80 s each); cause not found. This PR's two commits add no unsafe code, threads or recursion (they only build HLSL text and a file name). Base's lib binary in 3 runs: 1 abort, the known #3493 (`0x4332` on an `xcl-pso-ahead` thread).
review: read this PR's two commits on top of #1448 (4 files, +327 -15; my #1448 merge-check covers the rest of the stack). No correctness problem found. `XCL_COMPACT_NEST` is off unless set to a power of two up to 65536, so the default is #1448's flat form. Nested: an outer switch on `case >> log2(P)`, an inner switch per group, a default in each and outside, and `min(xcl_nb, n)` per group, which keeps the end-of-program and loop-budget checks as in the flat form. Nested disk entries are named `_c_n<P>`; `XCL_COMPACT_NEST` is a semantic pipeline setting.
- Mutation: the outer switch shifted one bit too far fails `nested_dispatch_groups_the_cases`, `nested_dispatch_runs_the_flat_cases` and the GPU test `gpu_compact_nested_dispatch` on this wave32 GPU. Good.
- Minor: `warm_settings_keep_compact_nest_switch` uses `XCL_COMPACT_NEST=auto`, which this PR's `parse_nest` refuses (warns, off); it passes because warm keys compare raw values. `auto` arrives with #2018, so the test reads as belonging there, or `32` would fit here.
- No retail title on this machine: the nested form of a real program was not compiled or run here.
performance: not measured here. Default path unchanged against #1448 (the nest is opt-in).
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:7314129519 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7314129519). Originally posted by [fromthemoonx](https://github.com/fromthemoonx) on 2026-12-01T14:21:52Z. --- Rerun on the new head (`5d9d3209`; the only change is the warm-settings test now using `32`). The earlier report, on `cf6d4158`, is below. merge-check base: 6bfb5c5153ccc23517daf30aa1071ddb0fadb53c head: 5d9d3209825e80f8b9f1000e0b9db71d47f4b7c0 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2941 passed, 1 failed, 51 ignored (base: 2904 passed); SKIPPED: 26 (23 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps); failing: `hle::xaudio2::tests::xma2_source_voice_decodes_and_manages_lifetime`. Not this PR: it is the shared-counter race #3551 fixes, and it passed alone 3 of 3 on this merge. review: `git range-diff` against `cf6d4158`: the only change is `warm_settings_keep_compact_nest_switch`, now comparing unset / `32` / `0`, all values this PR's `parse_nest` accepts. My earlier note about `auto` is resolved. The rest is as reviewed below. `shaders::warm_settings_keep_compact_nest_switch`: 3 of 3 passed. performance: as below (opt-in; the default path is unchanged against #1448). 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) <details><summary>Earlier report on cf6d4158 (base b2b1f109)</summary> ```text merge-check base: b2b1f109d27e746a62ec95b04dd1f9924452e682 head: cf6d415843984e9c86eef29220fa2f188bfbcb60 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2940 passed, 0 failed, 51 ignored (second run; #1448's head merged alone: 2933 passed; base: 2902 passed); SKIPPED: 26 (23 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), the same set as #1448 merged alone; failing: none reproduced. The first suite run's lib binary ended with 0xc0000005 (STATUS_ACCESS_VIOLATION) with no test named; the dump showed one unnamed thread deep in recursion. It did not come back in the second suite or in 3 more lib runs (3 of 3 ok, ~80 s each); cause not found. This PR's two commits add no unsafe code, threads or recursion (they only build HLSL text and a file name). Base's lib binary in 3 runs: 1 abort, the known #3493 (`0x4332` on an `xcl-pso-ahead` thread). review: read this PR's two commits on top of #1448 (4 files, +327 -15; my #1448 merge-check covers the rest of the stack). No correctness problem found. `XCL_COMPACT_NEST` is off unless set to a power of two up to 65536, so the default is #1448's flat form. Nested: an outer switch on `case >> log2(P)`, an inner switch per group, a default in each and outside, and `min(xcl_nb, n)` per group, which keeps the end-of-program and loop-budget checks as in the flat form. Nested disk entries are named `_c_n<P>`; `XCL_COMPACT_NEST` is a semantic pipeline setting. - Mutation: the outer switch shifted one bit too far fails `nested_dispatch_groups_the_cases`, `nested_dispatch_runs_the_flat_cases` and the GPU test `gpu_compact_nested_dispatch` on this wave32 GPU. Good. - Minor: `warm_settings_keep_compact_nest_switch` uses `XCL_COMPACT_NEST=auto`, which this PR's `parse_nest` refuses (warns, off); it passes because warm keys compare raw values. `auto` arrives with #2018, so the test reads as belonging there, or `32` would fit here. - No retail title on this machine: the nested form of a real program was not compiled or run here. performance: not measured here. Default path unchanged against #1448 (the nest is opt-in). 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) ``` </details>
Pipodi commented 2026-12-01 19:18:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Pipodi on 2026-12-01T19:18:12Z.


Good catch, thanks. On this PR XCL_COMPACT_NEST takes only 0 or a power of two up to 65536 (auto is added later, in the stacked nest-auto PR), so parse_nest refuses auto here and the test only passed because the raw values are compared.

warm_settings_keep_compact_nest_switch now uses 32 (a value parse_nest accepts) against unset and against 0. The fix is squashed into "Recompiler: compact dispatch can switch in two levels (XCL_COMPACT_NEST)", and the PRs stacked on this one are rebased onto it.

Tests: the full workspace run on the new head is in the PR description.

Written with Claude Code (Claude Sonnet 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7322574453 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7322574453). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-12-01T19:18:12Z. --- Good catch, thanks. On this PR `XCL_COMPACT_NEST` takes only `0` or a power of two up to 65536 (`auto` is added later, in the stacked nest-auto PR), so `parse_nest` refuses `auto` here and the test only passed because the raw values are compared. `warm_settings_keep_compact_nest_switch` now uses `32` (a value `parse_nest` accepts) against unset and against `0`. The fix is squashed into "Recompiler: compact dispatch can switch in two levels (XCL_COMPACT_NEST)", and the PRs stacked on this one are rebased onto it. Tests: the full workspace run on the new head is in the PR description. Written with Claude Code (Claude Sonnet 5.5).
Foniass commented 2026-12-01 21:09:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T21:09:21Z.


Follow-up review (head 5d9d3209, since cf6d415, diff read, not a merge-check):

  • Triage (stacked on #1448, keep open): still holds. Since cf6d415 the branch was rebased onto main d52ff48c; the only change in this PR's own commits is warm_settings_keep_compact_nest_switch (shaders.rs ~118-123) now using XCL_COMPACT_NEST=32 instead of auto, which is right because parse_nest (compact.rs ~182) does not accept auto until #2018. With #1316 closed, the stack is #1448 (b662d124, efc54bda, 6a3c753a, 7c52d4f6, 51f9a05a) ← this PR (421109bb, 5d9d3209, 327+/15-) ← #2018 ← #2025. The 2,645-line total is the stack, so no split is needed.

New: none.

Fine: the two-level switch in compact_with (compact.rs ~290-300) runs the same cases as the flat one, with an inner default and break/continue keeping their flat meaning; the nest is off when XCL_COMPACT_NEST is unset; the _c_n<P> cache name (pso.rs ~402-423) and the warm-settings key keep flat and nested entries apart; nested_matches_flat checks the nested text against the flat text for every group size and both table packings. Main already nests the direct-DXIL compact backend (XCL_DIRECT_COMPACT_NEST, gpu/dxil/compact.rs ~696-740) with an auto default, so this stack is the HLSL-path counterpart.

AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.

<!-- greyfinch-sync:ivall/xcl:comment:7325827882 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7325827882). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T21:09:21Z. --- Follow-up review (head 5d9d3209, since cf6d415, diff read, not a merge-check): - **Triage (stacked on #1448, keep open):** still holds. Since `cf6d415` the branch was rebased onto `main` `d52ff48c`; the only change in this PR's own commits is `warm_settings_keep_compact_nest_switch` (`shaders.rs` ~118-123) now using `XCL_COMPACT_NEST=32` instead of `auto`, which is right because `parse_nest` (`compact.rs` ~182) does not accept `auto` until #2018. With #1316 closed, the stack is #1448 (`b662d124`, `efc54bda`, `6a3c753a`, `7c52d4f6`, `51f9a05a`) ← this PR (`421109bb`, `5d9d3209`, 327+/15-) ← #2018 ← #2025. The 2,645-line total is the stack, so no split is needed. New: none. Fine: the two-level switch in `compact_with` (`compact.rs` ~290-300) runs the same cases as the flat one, with an inner `default` and `break`/`continue` keeping their flat meaning; the nest is off when `XCL_COMPACT_NEST` is unset; the `_c_n<P>` cache name (`pso.rs` ~402-423) and the warm-settings key keep flat and nested entries apart; `nested_matches_flat` checks the nested text against the flat text for every group size and both table packings. Main already nests the direct-DXIL compact backend (`XCL_DIRECT_COMPACT_NEST`, `gpu/dxil/compact.rs` ~696-740) with an auto default, so this stack is the HLSL-path counterpart. AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
Pipodi commented 2026-12-02 15:59:22 +00:00 (Migrated from github.com)

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


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:7351264239 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1692#issuecomment-7351264239). Originally posted by [Pipodi](https://github.com/Pipodi) on 2026-12-02T15:59:22Z. --- 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!1682
No description provided.