Shaders: --precompile --pipelines skips cached PSOs after canary check #1804
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1804
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1804"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@xADEL on GitHub · 2026-11-24 20:57 UTC · original
xADEL:shaders/precompile-skip-cached-pso→main· +282 −42 · 2 files · 1 commits · openResumed
xcl shaders --precompile --pipelinesruns previously fed every already-cached.psoblob back intoID3D12Device::CreateComputePipelineStateon a single long-lived device, andprecompile()initializedrunner::GPU's staticID3D12Devicesingleton just to query wave32/wave64 flags. Part of #1657 and #1269.What is in it
crates/xcl/src/shaders.rs:CacheTrustcanary check andhas_cached_blob: verify the first existing.psoblob against the active device/driver, then skipCreateComputePipelineState, root-signature lookup, and disk reads for further non-empty cached blobs (falling back to per-blob verification and rebuild if a cached blob is rejected after a driver/adapter change or corruption).RunningSlotandComputePsoDescroot-signature release with RAIIDropguards.resolve_split_flagsand querypso::graphics_wave32_for_device/pso::wave32_only_for_devicedirectly fromPipelines::devinstead of initializingrunner::GPU's static singleton.has_cached_blob_requires_non_empty_file,running_slot_releases_on_drop_and_unwind,resolve_split_flags_prefers_explicit_then_device_then_runner,cache_trust_skips_after_canary_hit_and_verifies_all_after_reject.crates/xcl/tests/gpu_compute_e2e.rs: updateoffline_compute_pipeline_is_reused_by_a_second_processfor the new cached-blob accounting while preserving stale/corrupt.psorebuild coverage.Tested
32.0.16.2124), Intel Core i5-12450HX, 24 GB RAM, Windows 11 Pro (10.0.26300),rustc 1.100.0, Windows SDK10.0.26100.0(dxcompiler.dll/dxil.dll1.9.2602.17), debug tests + release smoke.XCL_ADAPTER="rtx 3050" .\scripts\test.ps1(cargo test --workspace -- --test-threads=4): 867 passed, 0 failed, 42 ignored (all 4 new unit tests +offline_compute_pipeline_is_reused_by_a_second_processpassed).SKIPPEDGPU tests on this adapter (3):gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask(no wave64),gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).Regression run
(Note:
mainpopulated cold caches while the PR run had warm caches;smoke.ps1does not exercisexcl shaders --precompile --pipelines, which is covered byoffline_compute_pipeline_is_reused_by_a_second_processand the new unit tests.)Not tested
--precompile --only cs --pipelinesendurance run, AMD / Intel GPUs,XCL_HEAP_WINDOWS=1, andXCL_SAMPLE_*tests.AI use
smoke.ps1runs on this machine, and drafted this description.@futurepro62 on GitHub · 2026-11-24 21:33 UTC · original · edited 2026-11-24 21:53 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
97e501e(on its base6c89285).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 866 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.has_cached_blob_requires_non_empty_file,running_slot_releases_on_drop_and_unwind,resolve_split_flags_prefers_explicit_then_device_then_runner,cache_trust_skips_after_canary_hit_and_verifies_all_after_reject.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 867 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 00:04 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib -- --test-threads=1: 914 passed, 0 failed, 23 ignored.cargo test -p xcl --lib) hung for >13 min inside the test binary (killed manually); single-threaded and other parallel runs are fine. Could be the same parallel-scheduling flake seen on unmodifiedmain, but flagging in case the cached-PSO skip path has a concurrency edge.Thanks!
@thiagocalile on GitHub · 2026-11-25 00:12 UTC · original
Tested commit
97e501e0dee3cf6e696b0539feb6e00f546afc1con an AMD Radeon RX 6600 (RDNA2, native 64-lane waves) with unit/workspace tests and a 60 sscripts/smoke.ps1regression run (comparing againstmain62265d3).Tested
32.0.21045.29003;XCL_ADAPTER=radeon), AMD Ryzen 7 5700X3D, 47.9 GB RAM, Windows 11 (10.0.26200.0), Rust1.100.0(stable-x86_64-pc-windows-msvc), DXC1.8.2502.11.XCL_ADAPTER=radeon cargo test -p xcl --lib shaders::tests -- --test-threads=4: 6 passed, 0 failed, 0 ignored (53.98s).XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 864 passed, 3 failed, 42 ignored (64.24s).mainon this RX 6600 (placed_title_textures_share_vram_and_preserve_pixels: 3D mip subresource mismatch, plus 2 mutex-poison cascadestransitions_apply_when_their_list_is_submittedandd32s8_targets_take_their_own_size_of_video_memory; tracked by #1028).SKIPPED(not counted as coverage):heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows(plus D3D12 debug-layer tests skip becaused3d12SDKLayers.dllis not installed).Regression run (
scripts/smoke.ps1, 60 s, release build,XCL_ADAPTER=radeon)Base (
main62265d3):PR (
97e501e):Not tested
AI use
scripts/smoke.ps1runs on my RX 6600 and drafted this report; I checked the output before posting.@JJAutoCompare on GitHub · 2026-11-25 03:21 UTC · original
PR #1804 compatibility verification
Tested exact PR head
97e501e0dee3cf6e696b0539feb6e00f546afc1cforshaders --precompile --pipelineson STOR-WINLAB. All five PR-targeted tests passed. The workspace suite had 18 failures.Tested
DoublePrecisionFloatShaderOps=0. DXC and DXIL 1.9.2609.5. Rust 1.100.0 (0ef1bc386 2026-11-09), unoptimized builds with debug info and incremental compilation disabled.cargo build --workspaceandcargo test --workspace --no-runboth succeeded outside the GPU lock.shaders::testsunit tests passed for canary trust and rejection, nonempty cache file detection, permit release on unwind, and split-flag precedence.offline_compute_pipeline_is_reused_by_a_second_processpassed under the Arc lock with zero skips. Cache-off created one PSO and no driver cache. Cold cache created one PSO and a blob. Warm cache reported one cached PSO and zero new PSOs, with unchanged blob bytes. The corrupt canary was rejected and replaced with a fresh blob. Each run reported zero final PSO refusals.cargo test --workspace --no-fail-fast -- --test-threads=4ran once under the Arc lock and exited 101. Totals across 20 summaries inpr1804-suite.logwere 849 passed, 18 failed, 42 ignored. ThreeSKIPPEDlines are included in libtest's pass tally and excluded from coverage: two for no wave64 and one for no heap windows. All five targeted tests passed again.Workspace failures
CreateComputePipelineStateerror0x80070057. Twelve exercised double precision and one exercised groupshared barriers and atomics.Not tested
Multi-PSO skipping after the canary and warm-cache speedup, retail-title smoke and sample-dependent paths, an
origin/mainbaseline, other adapters, and D3D12 debug-layer coverage (d3d12SDKLayers.dllabsent).AI use
T3 Code / Codex (
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr1804-suite.logand published this report.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.