Repository navigation
Shaders: scheduling and diagnostic switches leave the warm pipeline key alone - #3308
Conversation
…ey alone warm_settings hashes every XCL_* variable but an exclusion list into the key of the driver-blob / pipeline-recipe cache, so changing a runtime knob between runs made every saved blob miss and forced a full pipeline re-preparation (about 10 min on an RTX 3080, seen several times). Now also left out, each checked where it is read: the bind wait budgets (XCL_PSO_WAIT_MS, XCL_GFX_PSO_WAIT_MS: how long a bind waits before the stand-in), the huge-compile gate (XCL_HUGE_PSO_CONCURRENCY, XCL_HUGE_PSO_WANTED_CONCURRENCY), which builds keep a disk file (XCL_PSO_DISK_CACHE_MIN_MS), the sync watchdogs (XCL_GPU_WAIT_TIMEOUT_MS, and XCL_WAIT_TIMEOUT_MS: the CPU wait for an unsatisfied Wait32/64BitValueX), target dumps (XCL_DUMP_TARGETS, XCL_DUMP_AFTER_S), XCL_THREAD_DUMP_AT, XCL_NETWORK, XCL_DRED (device-removal reporting), XCL_PLACE_RETIRE (resource placement), XCL_PLACE_CHECK (logs and counts placements over live textures only), and the logging-only XCL_TRACE_* family. None of them changes a pipeline description, its DXIL or root signature. Translation, heap/UMA, device and page-alias switches stay in the key. shaders.rs is not a translation cache input. Test: warm_settings_ignore_waits_watchdogs_and_traces_but_keep_pipeline_switches (each of the 14 names and two XCL_TRACE_ ones on its own and all together; fails before this change). Assisted-by: Claude Code (Claude Opus 5.5)
|
Six fresh Windows processes checked receipt reuse on ef599bc using the production warm_settings_key, Verified disk reader and stamp, with a previously generated RTX 5070 compute blob (1,358 bytes). I held the build/device/translation/path components of the native identity fixed in the harness. A cold process wrote a receipt. With XCL_PSO_WAIT_MS and XCL_TRACE_SHADERS changed, the next process hit that receipt. Changing one byte supplied to stamp under the same settings missed. Adding XCL_PS_EXPORT_PATCH=0 or XCL_DIRECT_DXIL=1 gave separate identities and misses; clearing the semantic override restored the hit. This also narrows what “saved blob miss” means in the description. warm_settings_key feeds the validation/replay identity and completed library receipt. The raw compute .pso filename is selected from the DXIL, root/samplers, flags and node mask separately. An unmatched receipt can lead to revalidation of an existing blob; it doesn't by itself show a cold driver compile. #3209's translated-pixel cache still needs its own mode suffix to select the right DXIL before these preparation keys are used. The controls exercised receipt selection on disk, using ordinary file writes for the harness's single-writer save. No new driver compilation or timing measurement. OpenAI Codex prepared and ran the controls and drafted this comment. |
|
Current-main audit (2026-11-29): rebase/retest, then merge candidate. I read the full one-file diff at Two blockers before merge: the required Windows build is currently red (four pipeline-library/warm-library tests in that run), so this needs a current-main rebase and rerun; and the blanket Cache impact: safe for existing PSO blobs/libraries; this PR is specifically a cache-bust prevention change. Review assisted by Codex; exact model name was not exposed in this session. I did not run a game or full PSO sweep. |
warm_settingshashes everyXCL_*variable except an exclusion list into the key of the driver-blob / pipeline-recipe cache. Changing a runtime knob between runs (a wait budget, the huge-compile slots, the disk-cache threshold, a dump switch) therefore made every saved blob miss and forced a full pipeline re-preparation: about 10 minutes on an RTX 3080, seen several times. With these switches out of the key, a run after such a change prepared in 15 s and 12 s from disk.Now also left out, each checked where it is read on main: the bind wait budgets (
XCL_PSO_WAIT_MS,XCL_GFX_PSO_WAIT_MS), the huge-compile gate (XCL_HUGE_PSO_CONCURRENCY,XCL_HUGE_PSO_WANTED_CONCURRENCY), which builds keep a disk file (XCL_PSO_DISK_CACHE_MIN_MS), the sync watchdogs (XCL_GPU_WAIT_TIMEOUT_MS, andXCL_WAIT_TIMEOUT_MS: how long the CPU waits for aWait32BitValueX/Wait64BitValueXnothing satisfies, read only bylist_x::wait_timeout), target dumps (XCL_DUMP_TARGETS,XCL_DUMP_AFTER_S),XCL_THREAD_DUMP_AT,XCL_NETWORK,XCL_DRED(device-removal reporting),XCL_PLACE_RETIRE(resource placement),XCL_PLACE_CHECK(only logs and counts placements over live textures:placements::check), and the logging-onlyXCL_TRACE_*family. None of them changes a pipeline description, its DXIL or its root signature. Translation, heap/UMA, device and page-alias switches stay in the key. Switches that other open PRs add (e.g.XCL_HUGE_PSO_HANDOFFS,XCL_HELD_WAIT_CAP_MS) are not listed here; each can add its own name.No issue.
What is in it
crates/xcl/src/shaders.rs: the longer exclusion list inwarm_settings, and testwarm_settings_ignore_waits_watchdogs_and_traces_but_keep_pipeline_switches. It checks each of the 14 newly excluded names and twoXCL_TRACE_ones on its own and all together, thatXCL_PAGE_ALIASstays in the key, and that only theXCL_TRACE_family is matched as a prefix. It fails without the change (checked by putting back main's list).Tested
cargo build --release -p xcl)ef599bcb3dbfb9d6833fc33184cb2fe3f350ed0f:cargo build --workspaceok;cargo test --workspace -- --test-threads=4: 2609 passed, 0 failed, 49 ignoredSKIPPEDlines on this adapter (no wave64 on NVIDIA, no heap windows, no D3D12 debug layer):SKIPPED gpu::dxil::kernel::dispatch_chain_native_wave64_builds_whole: no wave64SKIPPED gpu::recomp::lower::tests::a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu: no wave64SKIPPED gpu::recomp::lower::tests::coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu: no wave64SKIPPED gpu::recomp::lower::tests::cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu: no wave64SKIPPED gpu::recomp::lower::tests::the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu: no wave64SKIPPED gpu::recomp::lower_dxil::tests::a_per_lane_2d_or_3d_group_runs_on_the_gpu: no wave64SKIPPED gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu: const_mask, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 arithmetic, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::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))SKIPPED gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu: f16 packed, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 arithmetic, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 compares, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::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))SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 conversions, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 rounding, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 three-source, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu: f32 transcendentals, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu: f64, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer arithmetic, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu: integer carries, wave64: no wave64SKIPPED gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu: mask_ff0_flbit, wave64: no wave64SKIPPED gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask: no wave64SKIPPED gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware: no wave64SKIPPED heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windowsSKIPPED hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap: no heap windows (opt-in: XCL_HEAP_WINDOWS=1)SKIPPED the title under the debug layer (dred: false): no d3d12SDKLayers.dllSKIPPED the title under the debug layer (dred: true): no d3d12SDKLayers.dllSKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer (The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D))Regression run
scripts/smoke.ps1 -Game <title folder> -Seconds 60 -StartupTimeoutSeconds 900withXCL_DEVICE_TYPE=lockhart XCL_PREPARE=0(Series S mode as in the contributor's runs; no startup shader preparation, so pipelines are built in game) (smoke.ps1 setsXCL_NETWORK=0); same retail title, same settings for both runs. Both stay on the title's first screens (about 660 draws per 2 s) for the 60 s.main:
this PR's head:
Not tested
AI use