D3D12.X: a split program's failed whole build is not tried again #2629

Open
github-bot wants to merge 2 commits from github-bot/gh-2629 into main AGit
Owner

@⁠Royalflamejlh on GitHub · 2026-11-26 03:14 UTC · original
Royalflamejlh:arch/split-whole-failure → main · +78 −13 · 2 files · 2 commits · open

A split compute program whose whole form fails to build is no longer built again at every call that needs it. Chain::whole kept the whole pipeline once built, and returned a failure without keeping it. So every later call that needs that form ran the whole compile again, on the title's thread and under the chain's lock. On main that is every ExecuteIndirect of a split program (bind.rs, dispatch_chain::whole) and every dispatch that gets no scratch: a list with no tracked allocator, a bundle, a scratch allocation that failed. The program is large by construction, since splitting is for large programs, so each try can take the driver seconds and fail again.

Part of #2088. A failure is now final for that program, as a failed build is in pso_async (complete, 0 = failed): its later calls skip their dispatch instead of trying again. The exception is E_OUTOFMEMORY, which can pass: such a build is tried once more, 10 s later, and a second failure stays final (a driver can also refuse a program with out of memory every time).

What is in it

  • crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs: the outcome of the whole build, a failure too, is kept in the chain's OnceLock; a first out-of-memory failure is not kept, and retry_at holds the time of its one more try. PipelineBuilder::pipeline returns the HRESULT. retry_at's lock lets one caller build while the others wait, in place of build_whole.
  • crates/xcl/src/hle/d3d12x/bind.rs: the ExecuteIndirect warning for a failed whole form is capped at 4, as the Dispatch one is: a kept failure now comes at the call rate, not once a compile.
  • Two tests: a_whole_form_that_fails_to_build_is_not_built_again (the chain's pipeline creation always fails and counts its calls; two calls of whole make it build once) and a_whole_form_that_ran_out_of_memory_is_tried_once_more_after_a_pause (it always runs out of memory: one build, none within the pause, one more after it, then none).

Other branches

  • The #2404 copy below carries the first commit only; the out-of-memory try goes onto it the same way.
  • #2404 conflicts with this in dispatch_chain.rs at its head 97a70a7 (both change Chain): it adds a background caller of Chain::whole (want_whole), uses build_whole to let a title thread go before that build's turn, and reads the OnceLock in execute_indirect. The same change for it keeps that lock and only keeps the failure (.flatten() at that read): our fork's arch/split-whole-failure-on-2404 (90f2c1f; its dispatch_chain:: tests, #2404's new one among them: 8 passed on the RTX 2070 SUPER). #2404 has since moved to 5b9d4ff, where this conflicts again; the copy for that head builds, and its tests are still to run.
  • nvidia-dev af2cecc (which now contains main b49be18) conflicts with this in bind.rs and dispatch_chain.rs: it puts pso_async::pc_call() around the build and logs a huge program the driver refuses. The same change rebased on it, both commits, is arch/split-whole-failure-nvidia-dev 6626347, which keeps both.
  • #2519 (stacked on #2404) and #2469 remove most dispatches that get no scratch. With them in, a failed whole build is still retried by an ExecuteIndirect #2404 cannot chain and by a dispatch whose scratch cannot be made. #2333 and #2526 merge into main but conflict with this in dispatch_chain.rs's tests: both add tests at the end of the module, and their tests build a Chain with build_whole. Whichever merges after this one drops that field, and #2333 wraps its pipeline as OnceLock::from(Some(..)).

Tested

  • Native Windows: NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.01), Ryzen 7 5700X3D, Windows 11 Pro 26200, rustc 1.100.0; tests in debug, the smoke runs from release builds. Head 8bfaa12 on main b49be18.
  • The new test on main with only the test added: failed, the pipeline was built twice (left: 2, right: 1). On this branch: cargo test --workspace --no-fail-fast -- --test-threads=4: 1,437 passed, 0 failed, 47 ignored, both new tests among them. 29 SKIPPED lines: 21 no wave64, 3 wave32 per-lane forms refused, 3 no D3D12 debug layer, 1 no heap windows, 1 pso_measurement_compiles_an_exact_synthetic_record (the driver cache cannot be turned off without Windows Developer Mode).

Regression run

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 691 (PresentX 691)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14716 MB

PR:

xcl-smoke v1
commit: 8bfaa12f1fdfcb7d4ca319ae5f365cedb7201a1c
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 5330474d
seconds: 60
exit: 0x0
frames shown: 1490 (PresentX 1490)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 13884 MB

Not tested

  • A failed whole build on a live device. One title run of ours with XCL_DIRECT_DXIL=1 (300 s, RTX 5070 Ti, a tree without this change) met failed whole builds, but only in the second after the device was removed: every pipeline creation then failed with 0x887a0005 in about 1 ms, so building again cost little. The case this is for, a driver that refuses or runs out of memory on a large split program's whole form while the device is alive, no run has shown.
  • The two 60 s smoke runs had no XCL_DIRECT_DXIL=1, the only path that splits programs, so they do not reach the changed code; they are a regression check only.
  • AMD GPUs.

AI use

  • Claude Code (Claude Opus 5.5) found the case by reading the code, wrote the change, the test and this text, and ran the tests and the smoke runs on the Windows machines through a script.
**@⁠Royalflamejlh** on GitHub · 2026-11-26 03:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2629) `Royalflamejlh:arch/split-whole-failure` → `main` · +78 −13 · 2 files · 2 commits · open A split compute program whose whole form fails to build is no longer built again at every call that needs it. `Chain::whole` kept the whole pipeline once built, and returned a failure without keeping it. So every later call that needs that form ran the whole compile again, on the title's thread and under the chain's lock. On `main` that is every `ExecuteIndirect` of a split program (`bind.rs`, `dispatch_chain::whole`) and every dispatch that gets no scratch: a list with no tracked allocator, a bundle, a scratch allocation that failed. The program is large by construction, since splitting is for large programs, so each try can take the driver seconds and fail again. Part of #2088. A failure is now final for that program, as a failed build is in `pso_async` (`complete`, 0 = failed): its later calls skip their dispatch instead of trying again. The exception is `E_OUTOFMEMORY`, which can pass: such a build is tried once more, 10 s later, and a second failure stays final (a driver can also refuse a program with out of memory every time). **What is in it** - `crates/xcl/src/hle/d3d12x/real/dispatch_chain.rs`: the outcome of the whole build, a failure too, is kept in the chain's `OnceLock`; a first out-of-memory failure is not kept, and `retry_at` holds the time of its one more try. `PipelineBuilder::pipeline` returns the HRESULT. `retry_at`'s lock lets one caller build while the others wait, in place of `build_whole`. - `crates/xcl/src/hle/d3d12x/bind.rs`: the `ExecuteIndirect` warning for a failed whole form is capped at 4, as the `Dispatch` one is: a kept failure now comes at the call rate, not once a compile. - Two tests: `a_whole_form_that_fails_to_build_is_not_built_again` (the chain's pipeline creation always fails and counts its calls; two calls of `whole` make it build once) and `a_whole_form_that_ran_out_of_memory_is_tried_once_more_after_a_pause` (it always runs out of memory: one build, none within the pause, one more after it, then none). **Other branches** - The #2404 copy below carries the first commit only; the out-of-memory try goes onto it the same way. - #2404 conflicts with this in `dispatch_chain.rs` at its head `97a70a7` (both change `Chain`): it adds a background caller of `Chain::whole` (`want_whole`), uses `build_whole` to let a title thread go before that build's turn, and reads the `OnceLock` in `execute_indirect`. The same change for it keeps that lock and only keeps the failure (`.flatten()` at that read): our fork's `arch/split-whole-failure-on-2404` (`90f2c1f`; its `dispatch_chain::` tests, #2404's new one among them: 8 passed on the RTX 2070 SUPER). #2404 has since moved to `5b9d4ff`, where this conflicts again; the copy for that head builds, and its tests are still to run. - `nvidia-dev` `af2cecc` (which now contains `main` `b49be18`) conflicts with this in `bind.rs` and `dispatch_chain.rs`: it puts `pso_async::pc_call()` around the build and logs a huge program the driver refuses. The same change rebased on it, both commits, is `arch/split-whole-failure-nvidia-dev` `6626347`, which keeps both. - #2519 (stacked on #2404) and #2469 remove most dispatches that get no scratch. With them in, a failed whole build is still retried by an `ExecuteIndirect` #2404 cannot chain and by a dispatch whose scratch cannot be made. #2333 and #2526 merge into `main` but conflict with this in `dispatch_chain.rs`'s tests: both add tests at the end of the module, and their tests build a `Chain` with `build_whole`. Whichever merges after this one drops that field, and #2333 wraps its pipeline as `OnceLock::from(Some(..))`. **Tested** - Native Windows: NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.01), Ryzen 7 5700X3D, Windows 11 Pro 26200, rustc 1.100.0; tests in debug, the smoke runs from release builds. Head `8bfaa12` on `main` `b49be18`. - The new test on `main` with only the test added: failed, the pipeline was built twice (`left: 2`, `right: 1`). On this branch: `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,437 passed, 0 failed, 47 ignored, both new tests among them. 29 SKIPPED lines: 21 no wave64, 3 wave32 per-lane forms refused, 3 no D3D12 debug layer, 1 no heap windows, 1 `pso_measurement_compiles_an_exact_synthetic_record` (the driver cache cannot be turned off without Windows Developer Mode). **Regression run** main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 2070 SUPER title: 5330474d seconds: 60 exit: 0x0 frames shown: 691 (PresentX 691) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14716 MB ``` PR: ``` xcl-smoke v1 commit: 8bfaa12f1fdfcb7d4ca319ae5f365cedb7201a1c gpu: NVIDIA GeForce RTX 2070 SUPER title: 5330474d seconds: 60 exit: 0x0 frames shown: 1490 (PresentX 1490) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 13884 MB ``` **Not tested** - A failed whole build on a live device. One title run of ours with `XCL_DIRECT_DXIL=1` (300 s, RTX 5070 Ti, a tree without this change) met failed whole builds, but only in the second after the device was removed: every pipeline creation then failed with 0x887a0005 in about 1 ms, so building again cost little. The case this is for, a driver that refuses or runs out of memory on a large split program's whole form while the device is alive, no run has shown. - The two 60 s smoke runs had no `XCL_DIRECT_DXIL=1`, the only path that splits programs, so they do not reach the changed code; they are a regression check only. - AMD GPUs. **AI use** - Claude Code (Claude Opus 5.5) found the case by reading the code, wrote the change, the test and this text, and ran the tests and the smoke runs on the Windows machines through a script.
`Chain::whole` kept the whole pipeline of a split compute program once
it was built, and returned a failure without keeping it. So every later
call that needs that form built it again: each `ExecuteIndirect` of the
pipeline and each dispatch that gets no scratch, on the title's thread
and under the chain's lock. The program is large by construction
(splitting is for large programs), so each try can take the driver
seconds or more and fail again.

The outcome is kept in the `OnceLock`, a failure too. Its `get_or_init`
lets one caller build and the others wait, so the separate lock goes.
A failure is now final for the program, as a failed build is in
`pso_async`. The `ExecuteIndirect` warning for it is capped as the
`Dispatch` one is: it now comes at the call rate, not once a compile.

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

@⁠futurepro62 on GitHub · 2026-11-26 03:36 UTC · original · edited 2026-11-26 03:39 UTC

Full-suite run, since this PR has no test report yet. Tested exact head bf200e16 (on its base b49be18).

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::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1424 passed, 0 failed, 45 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, dispatch_chain_native_wave64_builds_whole, 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.
  • The new tests ran and passed: a_whole_form_that_fails_to_build_is_not_built_again.
  • 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: 1435 passed, 0 failed, 47 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 b49be183 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (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-26 03:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/2629#issuecomment-7181867567) · edited 2026-11-26 03:39 UTC Full-suite run, since this PR has no test report yet. Tested exact head `bf200e16` (on its base `b49be18`). **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::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1424 passed, 0 failed, 45 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`, `dispatch_chain_native_wave64_builds_whole`, `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`. - The new tests ran and passed: `a_whole_form_that_fails_to_build_is_not_built_again`. - 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`: **1435 passed, 0 failed, 47 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 `b49be183` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([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.
A failed whole build is kept so it is not compiled again at every call
that needs it. Out of memory can pass, though, and then a program that
failed once under memory pressure never got its whole form for the rest
of the run (luckyteagirl's review). Such a failure now waits 10 s and
is tried once more; a second failure, and any other, stays final. Once,
because a driver can also refuse a program with out of memory every
time (`translated_compute_pso_once` records an AMD one, 15 to 23 s a
try), and then each try would be seconds on the title's thread again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-26 06:14 UTC · original

@⁠luckyteagirl yes: an E_OUTOFMEMORY can pass, and with bf200e16 such a program's ExecuteIndirects and its dispatches without scratch skipped their work for the rest of the run, where main builds again. 8bfaa12 keeps every other failure final and tries an out-of-memory one once more, at its first call 10 s or more later; a second failure stays final. PipelineBuilder::pipeline now returns the HRESULT, and its other caller (the pieces) is unchanged.

Once, and not at every pause, because a driver can also refuse a program with out of memory every time: translated_compute_pso_once on main records an AMD driver doing so with a 13.8 MB program, 15 to 23 s a try. Such a program now costs one more try; retrying it every 10 s would put the cost this pull request removes back on the title's thread.

The new test is your case without the success: a builder that always runs out of memory builds once, not again within the pause, once more after it, and then not again. A success after a failure would need a real compute program in the test.

  • On an RTX 2070 SUPER (debug): cargo test --workspace --no-fail-fast -- --test-threads=4: 1,437 passed, 0 failed, 47 ignored, both of this pull request's tests among them.
  • The description's suite and the pull request's smoke block are those of 8bfaa12.

AI use: Claude Code (Claude Opus 5.5) wrote the change, the test and this reply, and ran the tests and the smoke run.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-26 06:14 UTC · [original](https://github.com/xcl-dev/xcl/pull/2629#issuecomment-7184240169) @⁠luckyteagirl yes: an `E_OUTOFMEMORY` can pass, and with `bf200e16` such a program's `ExecuteIndirect`s and its dispatches without scratch skipped their work for the rest of the run, where `main` builds again. `8bfaa12` keeps every other failure final and tries an out-of-memory one once more, at its first call 10 s or more later; a second failure stays final. `PipelineBuilder::pipeline` now returns the HRESULT, and its other caller (the pieces) is unchanged. Once, and not at every pause, because a driver can also refuse a program with out of memory every time: `translated_compute_pso_once` on `main` records an AMD driver doing so with a 13.8 MB program, 15 to 23 s a try. Such a program now costs one more try; retrying it every 10 s would put the cost this pull request removes back on the title's thread. The new test is your case without the success: a builder that always runs out of memory builds once, not again within the pause, once more after it, and then not again. A success after a failure would need a real compute program in the test. - On an RTX 2070 SUPER (debug): `cargo test --workspace --no-fail-fast -- --test-threads=4`: 1,437 passed, 0 failed, 47 ignored, both of this pull request's tests among them. - The description's suite and the pull request's smoke block are those of `8bfaa12`. **AI use:** Claude Code (Claude Opus 5.5) wrote the change, the test and this reply, and ran the tests and the smoke run. Posted without review by a person: the account owner was away and reads replies later.
Author
Owner

@⁠luckyteagirl on GitHub · 2026-11-26 05:21 UTC · original · reviewed

Could this avoid caching recoverable pipeline-creation failures as a permanent None? The new OnceLock<Option<_>> stores the result of the first whole build forever, while PipelineBuilder::pipeline drops the HRESULT. D3D12 can return E_OUTOFMEMORY when memory is insufficient. If the first whole build hits temporary pressure and memory later becomes available, subsequent chain dispatches still cannot retry; main would retry. Keeping the HRESULT and retrying or backing off for recoverable failures would retain the intended one-time cache for permanent refusals. A builder that fails once with OOM and then succeeds would cover this path. Source review only at head bf200e16; I did not reproduce live-device OOM. AI-assisted with Codex (GPT-6.2 Sol).

**@⁠luckyteagirl** on GitHub · 2026-11-26 05:21 UTC · [original](https://github.com/xcl-dev/xcl/pull/2629#pullrequestreview-6068941501) · **reviewed** Could this avoid caching recoverable pipeline-creation failures as a permanent `None`? The new `OnceLock<Option<_>>` stores the result of the first whole build forever, while `PipelineBuilder::pipeline` drops the HRESULT. [D3D12 can return `E_OUTOFMEMORY`](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-createcomputepipelinestate) when memory is insufficient. If the first whole build hits temporary pressure and memory later becomes available, subsequent chain dispatches still cannot retry; main would retry. Keeping the HRESULT and retrying or backing off for recoverable failures would retain the intended one-time cache for permanent refusals. A builder that fails once with OOM and then succeeds would cover this path. Source review only at head `bf200e16`; I did not reproduce live-device OOM. AI-assisted with Codex (GPT-6.2 Sol).
Author
Owner

@⁠thehollowedone on GitHub · 2026-11-26 13:06 UTC · original

Independent Windows check of #2629 head 8bfaa12 against main b49be18. This rechecks the OOM retry added after the earlier independent report.

Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti 12 GB (driver 621.35, active display adapter), rustc 1.99.1 MSVC, DXC 1.8.2502.11. XCL_D3D12_DIR pointed to signed D3D12 Agility 1.620.2 DLLs. The focused tests create a default D3D12 device without logging its adapter LUID, so I cannot assert which adapter they selected.

  • cargo build --offline --locked --workspace: passed.
  • cargo test --offline --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests -- --nocapture --test-threads=1: 4 passed, 0 failed, 0 ignored, no GPU skip, including the permanent-refusal and OOM-then-one-retry tests.
  • cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=1: 1,436 passed, 1 failed, 47 ignored across 37 targets; 25 SKIPPED diagnostic lines are included in Cargo's pass counts. The sole failure is console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk (cached_only console_mesh hit: "DXIL not compiled yet"), reproduced with the same error on untouched mainusingcargo test --offline --locked -p xcl --lib gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk -- --exact --test-threads=1`. This report does not claim a clean suite or merge readiness.

The tests use synthetic failed pipeline creation. I did not induce a failed whole build in a live title or run a paired retail smoke. Source review of this exact head found no new retry-lock or chain-lifetime issue; the documented second-OOM permanent failure remains a deliberate policy tradeoff, not a result established by a title run.

AI use: Codex (GPT-6.2 Sol) checked the exact-head code, ran the commands, and drafted this report. I verified the test counts before posting.

**@⁠thehollowedone** on GitHub · 2026-11-26 13:06 UTC · [original](https://github.com/xcl-dev/xcl/pull/2629#issuecomment-7192894456) Independent Windows check of [#2629 head `8bfaa12`](https://github.com/xcl-dev/xcl/commit/8bfaa12f1fdfcb7d4ca319ae5f365cedb7201a1c) against [`main` `b49be18`](https://github.com/xcl-dev/xcl/commit/b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). This rechecks the OOM retry added after the [earlier independent report](https://git.gtahub.st/github/xcl-dev--xcl/pulls/2629). Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti 12 GB (driver 621.35, active display adapter), rustc 1.99.1 MSVC, DXC 1.8.2502.11. `XCL_D3D12_DIR` pointed to signed D3D12 Agility 1.620.2 DLLs. The focused tests create a default D3D12 device without logging its adapter LUID, so I cannot assert which adapter they selected. - `cargo build --offline --locked --workspace`: passed. - `cargo test --offline --locked -p xcl --lib hle::d3d12x::real::dispatch_chain::tests -- --nocapture --test-threads=1`: **4 passed, 0 failed, 0 ignored, no GPU skip**, including the permanent-refusal and OOM-then-one-retry tests. - `cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=1`: **1,436 passed, 1 failed, 47 ignored** across 37 targets; 25 `SKIPPED` diagnostic lines are included in Cargo's pass counts. The sole failure is `console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk` (`cached_only console_mesh hit: "DXIL not compiled yet"), reproduced with the same error on untouched `main` using `cargo test --offline --locked -p xcl --lib gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk -- --exact --test-threads=1`. This report does not claim a clean suite or merge readiness. The tests use synthetic failed pipeline creation. I did not induce a failed whole build in a live title or run a paired retail smoke. Source review of this exact head found no new retry-lock or chain-lifetime issue; the documented second-OOM permanent failure remains a deliberate policy tradeoff, not a result established by a title run. AI use: Codex (GPT-6.2 Sol) checked the exact-head code, ran the commands, and drafted this report. I verified the test counts before posting.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

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

Merge

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