D3D12.X: no driver blobs on disk on AMD, whose blobs name a cache entry #2567

Closed
madaraXor wants to merge 1 commit from upstream-pr/2577 into main
madaraXor commented 2026-11-25 23:44:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by madaraXor on 2026-11-25T23:44:17Z.


On AMD, the driver blob XCL keeps on disk is a 954-byte reference into the driver's own per-application shader cache, whatever the program. RX 6700 XT (RDNA2) here; RX 9070 XT (RDNA4) measured by DarkPanda69 in #2512.

  • It carries no code: the driver's cache finds the pipeline by its DXIL without it.
  • A reference written by a process that later crashed or was killed can be stale. Handed back in CachedPSO, it removed the device instead of being refused (#2512).

This PR keeps no driver blob on disk on AMD. Every other vendor is unchanged: NVIDIA's blobs hold code, and are under 4 KiB for small programs, so a size rule would not do. Fixes #2512.

What is in it

  • hle/d3d12x/real.rs, driver_cache:
    • note_vendor(VendorId), called where the device is made, sets whether the driver's blobs are references (AMD, 0x1002);
    • enabled() then keeps none unless XCL_PSO_DISK_CACHE=1, a literal 1 (0 still turns them off everywhere; any other value is the default, which on other drivers keeps them as before);
    • the runtime's paths (path, path_for, graphics_path) are the ones affected; explicit paths are not (tests, path_override).
  • real::init and shaders.rs (Pipelines::new, xcl shaders --pipelines): call note_vendor.
  • README.md: the --pipelines line says it saves no blobs on AMD.
  • Tests: blobs_are_kept_on_disk_unless_they_are_references (vendors, and the switch's three settings); the_switch_is_read_as_0_1_or_the_default (unset, 0, 1, empty, false, off, 2 …).

Tested

  • AMD Radeon RX 6700 XT 12 GB (RDNA2), driver 32.0.21045; Ryzen 5 5600X, 16 GB; Windows 10 22H2 (19045); rustc 1.90.0; release.
  • cargo test -p xcl --lib driver_cache: 6 passed.
  • split_compute_program_prebuilds_and_caches_chain_pieces and stale_blob_cannot_bypass_the_offline_pipeline_cap (explicit paths, GPU): both pass on this AMD card.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 58bd3c9: 1420 passed, 5 failed, 46 ignored. The failures: gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1, hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory and the e2e tests test_title_runs_and_game_folder_is_untouched, test_title_draws_with_a_root_signature_under_the_debug_layer and test_title_runs_under_the_debug_layer_with_dred, which fail on main e1d84b7 on this machine too (its whole suite: 1416 passed, 7 failed, 46 ignored). SKIPPED: the six per-lane cases of f16_programs_on_the_gpu / f32_programs_on_the_gpu (refused), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows)
  • The bug, before this change, on a retail title's shader pack with xcl shaders --precompile --only cs --pipelines (details in #2512):
    • four runs in a row lost the device at the same pipelines, each made from a stub written in the last minutes of a run that crashed;
    • with those stubs moved away, the next run made the same 222 pipelines without a blob in 12 s in all, programs of 1.1–2.2 MB DXIL included;
    • a pass that only reuses blobs lost the device at the first stub of a run stopped 20 minutes after writing it.

Regression run
scripts/smoke.ps1, 60 s, release builds, the same title on the same day.

main:

xcl-smoke v1
commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea
gpu: AMD Radeon RX 6700 XT
title: 1778c2d9
seconds: 60
exit: 0x0
frames shown: 788 (PresentX 788)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15646 MB

PR:

xcl-smoke v1
commit: 58bd3c9dbf05f17d5b323034f28b046f700ac336
gpu: AMD Radeon RX 6700 XT
title: 1778c2d9
seconds: 60
exit: 0x0
frames shown: 943 (PresentX 944)
presents per 2 s (last 3): 60 58 60
device removals: 0
crashes: 0
peak commit: 19424 MB

Not tested

  • NVIDIA and Intel, where the change does nothing: stub_vendor is false.
  • RDNA3 / RDNA4 runs of a title with this change. RDNA4's blobs are the same 954-byte stubs (#2512).
  • Whether a stale stub from a crashed xcl run, rather than xcl shaders, removes the device the same way. It is the same call with the same kind of blob.

AI use

  • Claude Code with Claude Opus 5.5: found the stale-stub device removals with a local trace of the precompile, wrote the change, the test and this description, and ran the tests and runs above.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5501157079 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577). Originally posted by [madaraXor](https://github.com/madaraXor) on 2026-11-25T23:44:17Z. --- On AMD, the driver blob XCL keeps on disk is a 954-byte reference into the driver's own per-application shader cache, whatever the program. RX 6700 XT (RDNA2) here; RX 9070 XT (RDNA4) measured by DarkPanda69 in #2512. - It carries no code: the driver's cache finds the pipeline by its DXIL without it. - A reference written by a process that later crashed or was killed can be stale. Handed back in `CachedPSO`, it removed the device instead of being refused (#2512). This PR keeps no driver blob on disk on AMD. Every other vendor is unchanged: NVIDIA's blobs hold code, and are under 4 KiB for small programs, so a size rule would not do. Fixes #2512. **What is in it** - `hle/d3d12x/real.rs`, `driver_cache`: - `note_vendor(VendorId)`, called where the device is made, sets whether the driver's blobs are references (AMD, `0x1002`); - `enabled()` then keeps none unless `XCL_PSO_DISK_CACHE=1`, a literal `1` (`0` still turns them off everywhere; any other value is the default, which on other drivers keeps them as before); - the runtime's paths (`path`, `path_for`, `graphics_path`) are the ones affected; explicit paths are not (tests, `path_override`). - `real::init` and `shaders.rs` (`Pipelines::new`, `xcl shaders --pipelines`): call `note_vendor`. - `README.md`: the `--pipelines` line says it saves no blobs on AMD. - Tests: `blobs_are_kept_on_disk_unless_they_are_references` (vendors, and the switch's three settings); `the_switch_is_read_as_0_1_or_the_default` (unset, `0`, `1`, empty, `false`, `off`, `2` …). **Tested** - AMD Radeon RX 6700 XT 12 GB (RDNA2), driver 32.0.21045; Ryzen 5 5600X, 16 GB; Windows 10 22H2 (19045); rustc 1.90.0; release. - `cargo test -p xcl --lib driver_cache`: 6 passed. - `split_compute_program_prebuilds_and_caches_chain_pieces` and `stale_blob_cannot_bypass_the_offline_pipeline_cap` (explicit paths, GPU): both pass on this AMD card. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on `58bd3c9`: 1420 passed, 5 failed, 46 ignored. The failures: `gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`, `hle::kernelx::tests::xmem_virtual_query_marks_cpu_readable_memory` and the e2e tests `test_title_runs_and_game_folder_is_untouched`, `test_title_draws_with_a_root_signature_under_the_debug_layer` and `test_title_runs_under_the_debug_layer_with_dred`, which fail on `main` `e1d84b7` on this machine too (its whole suite: 1416 passed, 7 failed, 46 ignored). SKIPPED: the six per-lane cases of `f16_programs_on_the_gpu` / `f32_programs_on_the_gpu` (refused), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows) - The bug, before this change, on a retail title's shader pack with `xcl shaders --precompile --only cs --pipelines` (details in #2512): - four runs in a row lost the device at the same pipelines, each made from a stub written in the last minutes of a run that crashed; - with those stubs moved away, the next run made the same 222 pipelines without a blob in 12 s in all, programs of 1.1–2.2 MB DXIL included; - a pass that only reuses blobs lost the device at the first stub of a run stopped 20 minutes after writing it. **Regression run** `scripts/smoke.ps1`, 60 s, release builds, the same title on the same day. main: ``` xcl-smoke v1 commit: e1d84b7d9153f86a97d2ec5d209d196046fc0bea gpu: AMD Radeon RX 6700 XT title: 1778c2d9 seconds: 60 exit: 0x0 frames shown: 788 (PresentX 788) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15646 MB ``` PR: ``` xcl-smoke v1 commit: 58bd3c9dbf05f17d5b323034f28b046f700ac336 gpu: AMD Radeon RX 6700 XT title: 1778c2d9 seconds: 60 exit: 0x0 frames shown: 943 (PresentX 944) presents per 2 s (last 3): 60 58 60 device removals: 0 crashes: 0 peak commit: 19424 MB ``` **Not tested** - NVIDIA and Intel, where the change does nothing: `stub_vendor` is false. - RDNA3 / RDNA4 runs of a title with this change. RDNA4's blobs are the same 954-byte stubs (#2512). - Whether a stale stub from a crashed `xcl run`, rather than `xcl shaders`, removes the device the same way. It is the same call with the same kind of blob. **AI use** - Claude Code with Claude Opus 5.5: found the stale-stub device removals with a local trace of the precompile, wrote the change, the test and this description, and ran the tests and runs above. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DarkPanda69 commented 2026-11-26 00:05:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DarkPanda69 on 2026-11-25T23:55:47Z.


Update for head 58bd3c9: rerun on main b49be18, same cards, the same tests and the same local probe. On both the RX 9070 XT and the RTX 3060: driver_cache 6 passed, pipeline_cap_tests 3 passed, gpu_compute_e2e 7 passed with 1 SKIPPED (no heap windows, the same on main). With XCL_PSO_DISK_CACHE unset, the probe gives the same results as below. The RX 9070 XT keeps no .pso, and the 2nd run reports "loaded from the driver cache 0" while the pipeline is still made fine. The RTX 3060 keeps its 5 118-byte .pso, and the 2nd run reports "loaded from the driver cache 1".

RDNA4 and NVIDIA run (both listed as untested): the change does what it says on both cards, and the existing tests pass.

Head 97e1630 applied on main 08db802, debug, Windows 11 Pro 26200, card chosen with XCL_ADAPTER, everything run on main and with the PR:

with the PR RX 9070 XT (RDNA4, 32.0.32029.2010) RTX 3060 (32.0.16.1088)
cargo test -p xcl --lib -- driver_cache 5 passed 5 passed
-- pipeline_cap_tests (both explicit-path tests included) 3 passed 3 passed
--test gpu_compute_e2e 6 passed, 1 SKIPPED (heap_window_out_of_memory_falls_back_to_the_switch_form, no heap windows, same on main) same

The "none kept on disk" log line appears only on the RX 9070 XT.

The two offline-reuse tests in gpu_compute_e2e set XCL_PSO_DISK_CACHE to 0 or 1 explicitly, so they don't reach the new default. To check the default end to end, I ran a local copy of offline_compute_pipeline_is_reused_by_a_second_process (not part of this PR) with XCL_PSO_DISK_CACHE unset. It runs xcl shaders --precompile --pipelines twice and lists cache/driver:

XCL_PSO_DISK_CACHE unset RX 9070 XT RTX 3060
main one 954-byte .pso; 2nd run "loaded from the driver cache 1" one 5 118-byte .pso; 2nd run "loaded from the driver cache 1"
this PR no .pso; 2nd run "loaded from the driver cache 0", pipeline made fine one 5 118-byte .pso; 2nd run "loaded from the driver cache 1"

So on RDNA4 the stub is gone and the pipeline still builds. NVIDIA keeps its real blob, as intended. Such a per-vendor check isn't in the PR's tests, which cover the vendor rule as a unit (blobs_are_kept_on_disk_unless_they_are_references).

Not tested: a title run on RDNA4, the crashed-xcl run stale-stub case, Intel.
AI use: Claude Code (Claude Opus 5.5) ran the tests and the probe on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7178213088 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#issuecomment-7178213088). Originally posted by [DarkPanda69](https://github.com/DarkPanda69) on 2026-11-25T23:55:47Z. --- **Update for head `58bd3c9`:** rerun on `main` `b49be18`, same cards, the same tests and the same local probe. On both the RX 9070 XT and the RTX 3060: `driver_cache` 6 passed, `pipeline_cap_tests` 3 passed, `gpu_compute_e2e` 7 passed with 1 SKIPPED (no heap windows, the same on `main`). With `XCL_PSO_DISK_CACHE` unset, the probe gives the same results as below. The RX 9070 XT keeps no `.pso`, and the 2nd run reports "loaded from the driver cache 0" while the pipeline is still made fine. The RTX 3060 keeps its 5 118-byte `.pso`, and the 2nd run reports "loaded from the driver cache 1". RDNA4 and NVIDIA run (both listed as untested): the change does what it says on both cards, and the existing tests pass. Head `97e1630` applied on `main` `08db802`, debug, Windows 11 Pro 26200, card chosen with `XCL_ADAPTER`, everything run on `main` and with the PR: | with the PR | RX 9070 XT (RDNA4, 32.0.32029.2010) | RTX 3060 (32.0.16.1088) | |---|---|---| | `cargo test -p xcl --lib -- driver_cache` | 5 passed | 5 passed | | `-- pipeline_cap_tests` (both explicit-path tests included) | 3 passed | 3 passed | | `--test gpu_compute_e2e` | 6 passed, 1 SKIPPED (`heap_window_out_of_memory_falls_back_to_the_switch_form`, no heap windows, same on `main`) | same | The "none kept on disk" log line appears only on the RX 9070 XT. The two offline-reuse tests in `gpu_compute_e2e` set `XCL_PSO_DISK_CACHE` to `0` or `1` explicitly, so they don't reach the new default. To check the default end to end, I ran a local copy of `offline_compute_pipeline_is_reused_by_a_second_process` (not part of this PR) with `XCL_PSO_DISK_CACHE` unset. It runs `xcl shaders --precompile --pipelines` twice and lists `cache/driver`: | `XCL_PSO_DISK_CACHE` unset | RX 9070 XT | RTX 3060 | |---|---|---| | `main` | one 954-byte `.pso`; 2nd run "loaded from the driver cache 1" | one 5 118-byte `.pso`; 2nd run "loaded from the driver cache 1" | | this PR | no `.pso`; 2nd run "loaded from the driver cache 0", pipeline made fine | one 5 118-byte `.pso`; 2nd run "loaded from the driver cache 1" | So on RDNA4 the stub is gone and the pipeline still builds. NVIDIA keeps its real blob, as intended. Such a per-vendor check isn't in the PR's tests, which cover the vendor rule as a unit (`blobs_are_kept_on_disk_unless_they_are_references`). Not tested: a title run on RDNA4, the crashed-`xcl run` stale-stub case, Intel. AI use: Claude Code (Claude Opus 5.5) ran the tests and the probe on this machine and wrote this report.
DavidM1911 commented 2026-11-26 00:05:46 +00:00 (Migrated from github.com)

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


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

  • cargo test -p xcl --lib: all passed, 0 failed, 26 ignored.

Thanks!

— Devin

<!-- greyfinch-sync:ivall/xcl:comment:7178308924 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#issuecomment-7178308924). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-26T00:01:21Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 26 ignored. Thanks! — Devin
cindertheblue commented 2026-11-26 00:58:18 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by cindertheblue on 2026-11-26T00:58:18Z.


Update for head 58bd3c9: rerun on the same base e1d84b7, both GPUs, the same tests and the same local probe, plus the new switch reading. Everything behaves as the new head describes. On AMD, XCL_PSO_DISK_CACHE=false now gives the default (no blob), where e1d84b7 keeps the stub. Only 1 keeps it.

  • cargo test -p xcl --lib -- driver_cache: 6 passed on both GPUs, the_switch_is_read_as_0_1_or_the_default included (base: 4).
  • -- pipeline_cap_tests: 3 passed on both GPUs.
  • --test gpu_compute_e2e -- --test-threads=1: 6 passed on both GPUs and both trees. One of the six, heap_window_out_of_memory_falls_back_to_the_switch_form, prints SKIPPED (no heap windows).
  • Before running, both trees were rebuilt with cargo build --workspace; each was a clean detached worktree.

The probe (xcl shaders --precompile --pipelines twice, cache/driver listed after each run) gave the same result on the RX 7600 XT and the iGPU:

XCL_PSO_DISK_CACHE base e1d84b7 this PR 58bd3c9
unset 954-byte .pso; run 2 "loaded from the driver cache 1" no cache/driver, "none kept on disk" logged; run 2 "loaded from the driver cache 0", made 1, refused 0
false 954-byte .pso; run 2 "loaded from the driver cache 1" no cache/driver, "none kept on disk" logged; run 2 "loaded from the driver cache 0", made 1, refused 0
1 954-byte .pso; run 2 "loaded from the driver cache 1" 954-byte .pso; run 2 "loaded from the driver cache 1"

Earlier run, on head 97e1630:

RDNA3 and an RDNA2 APU iGPU (both listed as untested): on both, main writes the same 954-byte stub, and with this PR none is written and the pipeline still builds. The existing tests pass on both.

Head 97e1630 and its base e1d84b7, each a clean detached worktree with its own target dir, debug, Windows 11 Home 26200, Ryzen 5 9600X, Rust 1.99.1, card chosen with XCL_ADAPTER, XCL_PSO_DISK_CACHE unset:

RX 7600 XT (RDNA3, 32.0.31041.1004) Radeon Graphics iGPU (gfx1036, 32.0.21045.5002)
cargo test -p xcl --lib -- driver_cache 5 passed (base: 4) 5 passed (base: 4)
-- pipeline_cap_tests 3 passed (base: 3) 3 passed (base: 3)
--test gpu_compute_e2e -- --test-threads=1 6 passed, one of which (heap_window_out_of_memory_falls_back_to_the_switch_form) prints SKIPPED (no heap windows); the same on base same

To check the new default end to end, I ran a local copy of offline_compute_pipeline_is_reused_by_a_second_process (not part of this PR, removed afterwards) with XCL_PSO_DISK_CACHE unset: xcl shaders --precompile --pipelines twice, listing cache/driver after each run. Both GPUs gave the same result:

XCL_PSO_DISK_CACHE unset run 1 run 2
base e1d84b7 one 954-byte .pso; made 1, refused 0 "loaded from the driver cache 1"
this PR no cache/driver; "none kept on disk" logged; made 1, refused 0 no cache/driver; "loaded from the driver cache 0", made 1, refused 0

So the 954-byte size of the stub holds on RDNA3 and on the RDNA2 APU too, on two different driver branches. xcl shaders with an adapter name that matches nothing lists both cards, so XCL_ADAPTER does pick the card on this path.

Not tested

  • A title run (scripts/smoke.ps1) on either GPU.
  • The stale-stub device removal from #2512 itself, on main or with the PR.
  • A stale stub left by a crashed xcl run, and Intel.
  • The whole suite: only the tests above.

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and the probe on this machine, and wrote this report and its update.
<!-- greyfinch-sync:ivall/xcl:comment:7179296047 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#issuecomment-7179296047). Originally posted by [cindertheblue](https://github.com/cindertheblue) on 2026-11-26T00:58:18Z. --- **Update for head `58bd3c9`:** rerun on the same base `e1d84b7`, both GPUs, the same tests and the same local probe, plus the new switch reading. Everything behaves as the new head describes. On AMD, `XCL_PSO_DISK_CACHE=false` now gives the default (no blob), where `e1d84b7` keeps the stub. Only `1` keeps it. - `cargo test -p xcl --lib -- driver_cache`: 6 passed on both GPUs, `the_switch_is_read_as_0_1_or_the_default` included (base: 4). - `-- pipeline_cap_tests`: 3 passed on both GPUs. - `--test gpu_compute_e2e -- --test-threads=1`: 6 passed on both GPUs and both trees. One of the six, `heap_window_out_of_memory_falls_back_to_the_switch_form`, prints SKIPPED (no heap windows). - Before running, both trees were rebuilt with `cargo build --workspace`; each was a clean detached worktree. The probe (`xcl shaders --precompile --pipelines` twice, `cache/driver` listed after each run) gave the same result on the RX 7600 XT and the iGPU: | `XCL_PSO_DISK_CACHE` | base `e1d84b7` | this PR `58bd3c9` | |---|---|---| | unset | 954-byte `.pso`; run 2 "loaded from the driver cache 1" | no `cache/driver`, "none kept on disk" logged; run 2 "loaded from the driver cache 0", made 1, refused 0 | | `false` | 954-byte `.pso`; run 2 "loaded from the driver cache 1" | no `cache/driver`, "none kept on disk" logged; run 2 "loaded from the driver cache 0", made 1, refused 0 | | `1` | 954-byte `.pso`; run 2 "loaded from the driver cache 1" | 954-byte `.pso`; run 2 "loaded from the driver cache 1" | --- *Earlier run, on head `97e1630`:* RDNA3 and an RDNA2 APU iGPU (both listed as untested): on both, `main` writes the same 954-byte stub, and with this PR none is written and the pipeline still builds. The existing tests pass on both. Head `97e1630` and its base `e1d84b7`, each a clean detached worktree with its own target dir, debug, Windows 11 Home 26200, Ryzen 5 9600X, Rust 1.99.1, card chosen with `XCL_ADAPTER`, `XCL_PSO_DISK_CACHE` unset: | | RX 7600 XT (RDNA3, 32.0.31041.1004) | Radeon Graphics iGPU (gfx1036, 32.0.21045.5002) | |---|---|---| | `cargo test -p xcl --lib -- driver_cache` | 5 passed (base: 4) | 5 passed (base: 4) | | `-- pipeline_cap_tests` | 3 passed (base: 3) | 3 passed (base: 3) | | `--test gpu_compute_e2e -- --test-threads=1` | 6 passed, one of which (`heap_window_out_of_memory_falls_back_to_the_switch_form`) prints SKIPPED (no heap windows); the same on base | same | To check the new default end to end, I ran a local copy of `offline_compute_pipeline_is_reused_by_a_second_process` (not part of this PR, removed afterwards) with `XCL_PSO_DISK_CACHE` unset: `xcl shaders --precompile --pipelines` twice, listing `cache/driver` after each run. Both GPUs gave the same result: | `XCL_PSO_DISK_CACHE` unset | run 1 | run 2 | |---|---|---| | base `e1d84b7` | one 954-byte `.pso`; made 1, refused 0 | "loaded from the driver cache 1" | | this PR | no `cache/driver`; "none kept on disk" logged; made 1, refused 0 | no `cache/driver`; "loaded from the driver cache 0", made 1, refused 0 | So the 954-byte size of the stub holds on RDNA3 and on the RDNA2 APU too, on two different driver branches. `xcl shaders` with an adapter name that matches nothing lists both cards, so `XCL_ADAPTER` does pick the card on this path. **Not tested** - A title run (`scripts/smoke.ps1`) on either GPU. - The stale-stub device removal from #2512 itself, on `main` or with the PR. - A stale stub left by a crashed `xcl run`, and Intel. - The whole suite: only the tests above. **AI use** - Claude Code (Claude Opus 5.5) ran the tests and the probe on this machine, and wrote this report and its update.
luckyteagirl commented 2026-11-26 06:33:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T06:33:44Z.

Review: COMMENTED


The new AMD safeguard says stub blobs are kept only with XCL_PSO_DISK_CACHE=1, but env_setting() maps every present value except trimmed 0 to Some(true). An empty/whitespace value, false, off, or a typo therefore opts AMD back into loading disk stubs and suppresses the safeguard log. This truthiness existed on main, but it now leaves the stale-stub device-removal path reachable without the explicit =1 opt-in described here. Could AMD require the literal trimmed 1 to override its default, while preserving legacy non-AMD behavior if needed, or document that every non-0 value is an opt-in? The new test calls enabled_with() with already-parsed booleans and would not catch the string cases; an unset/0/1/empty/false parser table would.

Exact-head source review of 97e16303127d314013cfc9a063574cbad4cb5544; I did not run a GPU cache experiment or change driver settings. AI-assisted review with Codex.

<!-- greyfinch-sync:ivall/xcl:review:6069546320 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#pullrequestreview-6069546320). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T06:33:44Z. **Review:** COMMENTED --- The new AMD safeguard says stub blobs are kept only with `XCL_PSO_DISK_CACHE=1`, but `env_setting()` maps every present value except trimmed `0` to `Some(true)`. An empty/whitespace value, `false`, `off`, or a typo therefore opts AMD back into loading disk stubs and suppresses the safeguard log. This truthiness existed on main, but it now leaves the stale-stub device-removal path reachable without the explicit `=1` opt-in described here. Could AMD require the literal trimmed `1` to override its default, while preserving legacy non-AMD behavior if needed, or document that *every* non-`0` value is an opt-in? The new test calls `enabled_with()` with already-parsed booleans and would not catch the string cases; an unset/`0`/`1`/empty/`false` parser table would. Exact-head source review of `97e16303127d314013cfc9a063574cbad4cb5544`; I did not run a GPU cache experiment or change driver settings. AI-assisted review with Codex.
madaraXor commented 2026-11-26 11:05:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by madaraXor on 2026-11-26T10:26:30Z.


Thanks, fixed (force-pushed). XCL_PSO_DISK_CACHE is now read as 0, 1 or the default (parse_setting).

  • On AMD only a literal 1, trimmed, keeps the references.
  • 0 turns blobs off everywhere.
  • Unset, empty, false, off, 2 and any other value give the default: off on AMD, and on other drivers on as before, so their behaviour does not change.
  • Test: the_switch_is_read_as_0_1_or_the_default, a parser table and its effect with and without a stub driver.
<!-- greyfinch-sync:ivall/xcl:comment:7189370060 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#issuecomment-7189370060). Originally posted by [madaraXor](https://github.com/madaraXor) on 2026-11-26T10:26:30Z. --- Thanks, fixed (force-pushed). `XCL_PSO_DISK_CACHE` is now read as `0`, `1` or the default (`parse_setting`). - On AMD only a literal `1`, trimmed, keeps the references. - `0` turns blobs off everywhere. - Unset, empty, `false`, `off`, `2` and any other value give the default: off on AMD, and on other drivers on as before, so their behaviour does not change. - Test: `the_switch_is_read_as_0_1_or_the_default`, a parser table and its effect with and without a stub driver.
JJAutoCompare commented 2026-11-27 00:20:29 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-27T00:20:29Z.


Tested: Clean 58bd3c9dbf05f17d5b323034f28b046f700ac336, Windows 11 build 26200, Ryzen 7 3800X, Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. cargo test -j 2 -p xcl --test gpu_compute_e2e --no-run; ran offline_compute_pipeline_is_reused_by_a_second_process --exact --nocapture --test-threads=1 on the resulting binary: 1 passed, 0 failed, 0 ignored, 0 skipped. Also ran xcl.exe shaders <synthetic shader directory> --precompile --pipelines in two processes sharing a fresh XCL cache with XCL_PSO_DISK_CACHE unset. The cold process saved one 12,915-byte Intel driver blob. The warm process reported one driver-cache load. Both made one pipeline with zero refusals.

Not tested: AMD or NVIDIA hardware, the original AMD device removal, full workspace suite, and retail smoke.

AI use: T3 Code / Codex (gpt-6.2-sol) ran and reran the checks and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7206378961 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#issuecomment-7206378961). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-27T00:20:29Z. --- **Tested:** Clean `58bd3c9dbf05f17d5b323034f28b046f700ac336`, Windows 11 build 26200, Ryzen 7 3800X, Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC, DXC 1.9.2602.17, debug. `cargo test -j 2 -p xcl --test gpu_compute_e2e --no-run`; ran `offline_compute_pipeline_is_reused_by_a_second_process --exact --nocapture --test-threads=1` on the resulting binary: 1 passed, 0 failed, 0 ignored, 0 skipped. Also ran `xcl.exe shaders <synthetic shader directory> --precompile --pipelines` in two processes sharing a fresh XCL cache with `XCL_PSO_DISK_CACHE` unset. The cold process saved one 12,915-byte Intel driver blob. The warm process reported one driver-cache load. Both made one pipeline with zero refusals. **Not tested:** AMD or NVIDIA hardware, the original AMD device removal, full workspace suite, and retail smoke. **AI use:** T3 Code / Codex (`gpt-6.2-sol`) ran and reran the checks and wrote this report.
Foniass commented 2026-12-01 08:24:44 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:24:44Z.


Triage (#1607) – head 58bd3c9

This change is already on main: 3db4c3a ("D3D12.X: default AMD driver-blob persistence off", adapted from this PR) records the vendor at device creation and in the offline precompile, turns disk blobs off by default on 0x1002, keeps XCL_PSO_DISK_CACHE=1 as the override and =0 as off everywhere, and updates the README line.
Recommendation: close (superseded by main commit 3db4c3a).

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:7305281836 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#issuecomment-7305281836). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:24:44Z. --- **Triage (#1607)** – head 58bd3c9 This change is already on main: 3db4c3a ("D3D12.X: default AMD driver-blob persistence off", adapted from this PR) records the vendor at device creation and in the offline precompile, turns disk blobs off by default on 0x1002, keeps `XCL_PSO_DISK_CACHE=1` as the override and `=0` as off everywhere, and updates the README line. Recommendation: close (superseded by main commit 3db4c3a). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:54:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:54:22Z.


Closing as superseded: this change is already on main (3db4c3a). 3db4c3a (adapted from #2577): driver_cache::note_vendor at real.rs init and shaders.rs precompile, blobs not kept on disk on AMD unless XCL_PSO_DISK_CACHE=1; README updated

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311819630 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2577#issuecomment-7311819630). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:54:22Z. --- Closing as superseded: this change is already on `main` (3db4c3a). 3db4c3a (adapted from #2577): driver_cache::note_vendor at real.rs init and shaders.rs precompile, blobs not kept on disk on AMD unless XCL_PSO_DISK_CACHE=1; README updated Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

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