D3D12.X: a huge compute program the driver refuses is logged with its verdict #1918

Manually merged
github merged 1 commit from gh-pr/1918/head into gh-pr/1918/base 2026-11-26 05:09:36 +00:00
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 23:06 UTC · original
Rednaxeh:huge-compile-verdict-logged → main · +17 −1 · 2 files · 1 commits · merged 2026-11-25 02:15 UTC

When the driver refuses a translated compute pipeline, the only trace was note_translation_error: the report's translation_errors, or the notes of a cached-only attempt, which are dropped when a shader was still missing. On an RX 7800 XT a retail title's 13.8 MB compute program (#1332 in the form of #1321) takes the driver 15–23 s and ~15 GB of commit in every run and is refused with E_OUTOFMEMORY; xcl.log showed its driver compile finish line and, a millisecond later, the title's dispatch with that pipeline skipped, with nothing in between. The same with the 3.9 MB form of the direct DXIL backend (#1748). The verdict had to be taken from xcl shaders --measure-pso. Part of #232 / #505.

What is in it

  • crates/xcl/src/hle/d3d12x/real.rs: a huge compute program (huge_pso_bytes and up) the driver refuses is logged with its record hash, DXIL size, driver-cache file name (<fnv64(DXIL)>-<len>-<flags>.pso, so the line matches the blob cache too), HRESULT and the time the driver took, next to the driver compile start/finish lines it already has. Logging only; no behaviour changes, no test (AGENTS.md: logging needs none).
  • README.md: one sentence under the huge-pipeline paragraph.

Tested

  • AMD Radeon RX 7800 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 26300, Rust 1.100.0 stable-x86_64-pc-windows-msvc, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug for the tests, release for the title
  • cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4 on 79fde18 (--no-fail-fast, 20 test binaries): 974 passed, 1 failed, 45 ignored. The failure, gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 (seed 722: res[30] = 0x1, CPU 0x7fffffff), fails identically on main 689f2db on this card: the direct DXIL backend, not this PR.
  • SKIPPED: gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu and f32_programs_on_the_gpu (the per-lane form refuses V_MUL_F16 / V_PK_MUL_F16 / V_CVT_F16_F32), heap_window_out_of_memory_falls_back_to_the_switch_form.
  • Retail title, 150 s run of 79fde18 with no input: the two programs the preload builds at start are now answered in xcl.log:
    [33.176] D3D12.X: driver compile finish #947: compute PSO, 13823000 B DXIL, 28913 ms, gated (waited 0 ms)
    [33.197] D3D12.X: the driver refused the compute PSO of record 95cc13288a27a96e (13823000 B DXIL, driver cache 660b0bb6c4e00c2e-d2ec18-0.pso) with 0x8007000e after 28913 ms in the driver: its dispatches are skipped
    [66.324] D3D12.X: driver compile finish #1025: compute PSO, 22835548 B DXIL, 33148 ms, gated (waited 28891 ms)
    [66.359] D3D12.X: the driver refused the compute PSO of record 56c0cd3b82a00c6e (22835548 B DXIL, driver cache a399cc18acaef5bb-15c715c-0.pso) with 0x8007000e after 33148 ms in the driver: its dispatches are skipped
    
  • The smoke pair below: A at ~13 s in both runs.

Regression run

xcl-smoke v1
commit: 689f2db477c3c062cf162649781640ef8a977c18
gpu: AMD  Radeon RX 7800 XT
title: 0da1204f
seconds: 60
exit: 0x0
frames shown: 1413 (PresentX 1413)
presents per 2 s (last 3): 54 44 15
device removals: 0
crashes: 0
peak commit: 84433 MB
xcl-smoke v1
commit: 79fde18030c29f70235f780f28ae0d64fc23cc46
gpu: AMD  Radeon RX 7800 XT
title: 0da1204f
seconds: 60
exit: 0x0
frames shown: 1359 (PresentX 1359)
presents per 2 s (last 3): 6 2 0
device removals: 0
crashes: 0
peak commit: 86300 MB

Not tested

  • NVIDIA / Intel; wave32-only GPUs (the line is driver-independent).

AI use

  • Claude Code (Claude Fable 5.1) wrote the change, the commit message and this description from the runs' logs; the runs and the tests were mine.

🤖 Generated with Claude Code

**@⁠Rednaxeh** on GitHub · 2026-11-24 23:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/1918) `Rednaxeh:huge-compile-verdict-logged` → `main` · +17 −1 · 2 files · 1 commits · merged 2026-11-25 02:15 UTC When the driver refuses a translated compute pipeline, the only trace was `note_translation_error`: the report's `translation_errors`, or the notes of a cached-only attempt, which are dropped when a shader was still missing. On an RX 7800 XT a retail title's 13.8 MB compute program (#1332 in the form of #1321) takes the driver 15–23 s and ~15 GB of commit in every run and is refused with E_OUTOFMEMORY; `xcl.log` showed its `driver compile finish` line and, a millisecond later, the title's dispatch with that pipeline skipped, with nothing in between. The same with the 3.9 MB form of the direct DXIL backend (#1748). The verdict had to be taken from `xcl shaders --measure-pso`. Part of #232 / #505. **What is in it** - `crates/xcl/src/hle/d3d12x/real.rs`: a huge compute program (`huge_pso_bytes` and up) the driver refuses is logged with its record hash, DXIL size, driver-cache file name (`<fnv64(DXIL)>-<len>-<flags>.pso`, so the line matches the blob cache too), HRESULT and the time the driver took, next to the `driver compile start/finish` lines it already has. Logging only; no behaviour changes, no test (AGENTS.md: logging needs none). - `README.md`: one sentence under the huge-pipeline paragraph. **Tested** - AMD Radeon RX 7800 XT 16 GB (driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 Pro 26300, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug for the tests, release for the title - `cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4` on `79fde18` (`--no-fail-fast`, 20 test binaries): 974 passed, 1 failed, 45 ignored. The failure, `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` (`seed 722: res[30] = 0x1, CPU 0x7fffffff`), fails identically on `main` `689f2db` on this card: the direct DXIL backend, not this PR. - SKIPPED: `gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu` and `f32_programs_on_the_gpu` (the per-lane form refuses `V_MUL_F16` / `V_PK_MUL_F16` / `V_CVT_F16_F32`), `heap_window_out_of_memory_falls_back_to_the_switch_form`. - Retail title, 150 s run of `79fde18` with no input: the two programs the preload builds at start are now answered in `xcl.log`: ``` [33.176] D3D12.X: driver compile finish #947: compute PSO, 13823000 B DXIL, 28913 ms, gated (waited 0 ms) [33.197] D3D12.X: the driver refused the compute PSO of record 95cc13288a27a96e (13823000 B DXIL, driver cache 660b0bb6c4e00c2e-d2ec18-0.pso) with 0x8007000e after 28913 ms in the driver: its dispatches are skipped [66.324] D3D12.X: driver compile finish #1025: compute PSO, 22835548 B DXIL, 33148 ms, gated (waited 28891 ms) [66.359] D3D12.X: the driver refused the compute PSO of record 56c0cd3b82a00c6e (22835548 B DXIL, driver cache a399cc18acaef5bb-15c715c-0.pso) with 0x8007000e after 33148 ms in the driver: its dispatches are skipped ``` - The smoke pair below: A at ~13 s in both runs. **Regression run** ``` xcl-smoke v1 commit: 689f2db477c3c062cf162649781640ef8a977c18 gpu: AMD Radeon RX 7800 XT title: 0da1204f seconds: 60 exit: 0x0 frames shown: 1413 (PresentX 1413) presents per 2 s (last 3): 54 44 15 device removals: 0 crashes: 0 peak commit: 84433 MB ``` ``` xcl-smoke v1 commit: 79fde18030c29f70235f780f28ae0d64fc23cc46 gpu: AMD Radeon RX 7800 XT title: 0da1204f seconds: 60 exit: 0x0 frames shown: 1359 (PresentX 1359) presents per 2 s (last 3): 6 2 0 device removals: 0 crashes: 0 peak commit: 86300 MB ``` **Not tested** - NVIDIA / Intel; wave32-only GPUs (the line is driver-independent). **AI use** - Claude Code (Claude Fable 5.1) wrote the change, the commit message and this description from the runs' logs; the runs and the tests were mine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The driver's refusal of a translated compute pipeline reached only
note_translation_error: the report's translation_errors, or the notes of a
cached-only attempt, which are dropped when a shader was missing. On an RX
7800 XT a retail title's 13.8 MB compute program (#1332 in the form of #1321)
took the driver 15 - 23 s and ~15 GB of commit in every run and was refused
with E_OUTOFMEMORY; xcl.log showed its `driver compile finish` and, a
millisecond later, the title's dispatch with that pipeline skipped - and
nothing in between. The same with the 3.9 MB form of the direct DXIL backend
(#1748). The verdict had to be taken from `xcl shaders --measure-pso`.

A huge program (`huge_pso_bytes` and up) the driver refuses is now logged with
its record hash, DXIL size, HRESULT and the time the driver took, next to the
compile lines it already has. Logging only; no behaviour changes.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:09:33 +00:00
github manually merged commit 79fde18030 into gh-pr/1918/base 2026-11-26 05:09:36 +00:00
Author
Owner

@⁠Rednaxeh on GitHub · 2026-11-24 23:32 UTC · original

Thanks. The line had the console record's hash (the one in driver compile start and xcl shaders --measure-pso); the driver-blob cache is keyed by the translated DXIL instead (<fnv64(DXIL)>-<len>-<flags>.pso), so I added that file name next to it in 79fde18:

D3D12.X: the driver refused the compute PSO of record 95cc13288a27a96e (13823000 B DXIL, driver cache 660b0bb6c4e00c2e-d2ec18-0.pso) with 0x8007000e after 28913 ms in the driver: its dispatches are skipped

Suite and smoke rerun on the new head are in the description.

**@⁠Rednaxeh** on GitHub · 2026-11-24 23:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7147525379) Thanks. The line had the console record's hash (the one in `driver compile start` and `xcl shaders --measure-pso`); the driver-blob cache is keyed by the translated DXIL instead (`<fnv64(DXIL)>-<len>-<flags>.pso`), so I added that file name next to it in 79fde18: ``` D3D12.X: the driver refused the compute PSO of record 95cc13288a27a96e (13823000 B DXIL, driver cache 660b0bb6c4e00c2e-d2ec18-0.pso) with 0x8007000e after 28913 ms in the driver: its dispatches are skipped ``` Suite and smoke rerun on the new head are in the description.
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 23:55 UTC · original · edited 2026-11-25 00:02 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 79fde18 (on its base 689f2db).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests: 965 passed, 0 failed, 43 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • No new #[test] functions in the diff.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 974 passed, 0 failed, 45 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), 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))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), 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))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 62265d3 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651) and the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 23:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7147943191) · edited 2026-11-25 00:02 UTC Full-suite run, since this PR has no test report yet. Tested exact head `79fde18` (on its base `689f2db`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::dxil::fuzz_tests`: **965 passed, 0 failed, 43 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - No new `#[test]` functions in the diff. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **974 passed, 0 failed, 45 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `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))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `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))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `62265d3` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651) and the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests ([follow-up on #1651](https://git.gtahub.st/github/xcl-dev--xcl/issues/1651)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠raylitebull on GitHub · 2026-11-25 01:54 UTC · original

Code review on 79fde18:

  • Logging record hash, DXIL byte size, driver_cache::name(&dxil, copy.Flags.0), HRESULT verdict, and driver time when dxil.len() >= huge_pso_bytes() fails in translated_compute_pso_once (crates/xcl/src/hle/d3d12x/real.rs) makes rejected huge compute PSOs immediately diagnosable in xcl.log.
  • Diff audited and CI workflow approved (running).

Remaining before merge: Build and test finishing green plus AMD verification on 79fde18.

**@⁠raylitebull** on GitHub · 2026-11-25 01:54 UTC · [original](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7150096821) Code review on `79fde18`: - Logging `record` hash, DXIL byte size, `driver_cache::name(&dxil, copy.Flags.0)`, HRESULT verdict, and driver time when `dxil.len() >= huge_pso_bytes()` fails in `translated_compute_pso_once` (`crates/xcl/src/hle/d3d12x/real.rs`) makes rejected huge compute PSOs immediately diagnosable in `xcl.log`. - Diff audited and `CI` workflow approved (running). **Remaining before merge:** `Build and test` finishing green plus **AMD** verification on `79fde18`.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 02:26 UTC · original

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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 02:26 UTC · [original](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7150714818) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
This discussion has been locked. Commenting is limited to contributors.
No description provided.