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

Merged
Rednaxeh merged 1 commit from upstream-pr/1918 into main 2026-11-25 02:15:06 +00:00
Rednaxeh commented 2026-11-24 23:06:38 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Rednaxeh on 2026-11-24T23:06:38Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:6593220978 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1918). Originally posted by [Rednaxeh](https://github.com/Rednaxeh) on 2026-11-24T23:06:38Z. --- 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)
Melow-code commented 2026-11-25 00:08:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Melow-code on 2026-11-24T23:10:49Z.

Review: COMMENTED


Logging the driver's rejection verdict for huge compute programs is useful for debugging. Make sure the log line includes the PSO hash or shader key so it can be matched to the cache.

<!-- greyfinch-sync:ivall/xcl:review:6048875572 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1918#pullrequestreview-6048875572). Originally posted by [Melow-code](https://github.com/Melow-code) on 2026-11-24T23:10:49Z. **Review:** COMMENTED --- Logging the driver's rejection verdict for huge compute programs is useful for debugging. Make sure the log line includes the PSO hash or shader key so it can be matched to the cache.
Rednaxeh commented 2026-11-25 00:08:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Rednaxeh on 2026-11-24T23:32:57Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7147525379 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7147525379). Originally posted by [Rednaxeh](https://github.com/Rednaxeh) on 2026-11-24T23:32:57Z. --- 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.
futurepro62 commented 2026-11-25 00:09:09 +00:00 (Migrated from github.com)

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


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.
<!-- greyfinch-sync:ivall/xcl:comment:7147943191 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7147943191). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-24T23:55:26Z. --- 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://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) 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.
raylitebull commented 2026-11-25 02:09:02 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T01:54:25Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7150096821 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7150096821). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T01:54:25Z. --- 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`.
upstream-sync closed this pull request 2026-11-25 03:04:45 +00:00
DavidM1911 commented 2026-11-25 03:05:41 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T02:26:04Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7150714818 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1918#issuecomment-7150714818). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T02:26:04Z. --- 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!
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!1908
No description provided.