Repository navigation
Conversation
Resumed `xcl shaders --precompile --pipelines` runs previously fed every already-cached `.pso` blob back into `ID3D12Device::CreateComputePipelineState` on the long-lived device, and `precompile()` initialized `runner::GPU`'s static D3D12 device singleton just to query wave32/wave64 flags. - Verify the first existing `.pso` blob against the active device/driver as a canary (`CacheTrust`): once accepted, skip `CreateComputePipelineState` and disk reads for further non-empty cached blobs; if a cached blob is rejected (stale/corrupt), keep verifying and rebuilding blobs. - Drop cached bytes before any fallback uncached compile, and guard `RunningSlot` and `ComputePsoDesc` root signature cleanup with RAII Drop guards. - Query `graphics_wave32_for_device` / `wave32_only_for_device` directly from `Pipelines::dev` instead of initializing `runner::GPU`. Part of xcl-dev#1657, xcl-dev#1269.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumed
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 xcl-dev#1657 and xcl-dev#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.Mirror of xcl-dev#1804 (auto-synced, do not edit).