Repository navigation
Scripts: measure NVIDIA PSOs with a temporary cache-off profile - #1849
Open
Daydream3r wants to merge 2 commits into
Open
Daydream3r wants to merge 2 commits into
Daydream3r wants to merge 2 commits into
Conversation
ShaderCacheControl succeeds on this RTX 5070 Ti but repeated PSO creation still reuses compiled results. Associate a unique sibling executable with a temporary NVIDIA cache-off profile, then remove both after success or failure. Part of xcl-dev#1269. Depends on the JSON/backend measurement support in xcl-dev#1802. Profile lifetime tests and real NVIDIA controls verify cleanup and eliminate the observed millisecond repeat timings. Assisted-by: Codex desktop (GPT-6; exact variant not exposed)
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Daydream3r
marked this pull request as ready for review
November 25, 2026 10:21
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.
Stacked on #1802; only the top commit
6019206belongs to this PR. Part of #1269. The parent commit is preserved unchanged and supplies the JSON/backend measurement command.On RTX 5070 Ti, successful
ShaderCacheControlcalls still let repeated PSO creation collapse from seconds to milliseconds. This wrapper associates a unique sibling exe with a temporary NVIDIA application profile whose shader disk cache is off, runs the measurement, and removes the profile and exe afterwards.What is in it
scripts/measure-nvidia-pso.ps1: isolated application profile, JSON/backend validation, cleanup on success/failure; no changes to other profiles or shared cache files.Tested
cargo build --release -p xcl: passed.cargo test --workspace -- --test-threads=4: 891 passed, 0 failed, 42 ignored. SKIPPED within the passed count:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).XCL_SAMPLE_*unset.scripts/test-measure-nvidia-pso.ps1: 4 checks passed in Windows PowerShell 5.1 and PowerShell 7. Real missing-record failure cleaned up; independent NVAPI lookups confirmed all six wrapper profiles absent. A real HLSL measurement also passed in PowerShell 5.1.1404420b38db8597, 4 windows, split wave64, interleaved direct/HLSL/direct/HLSL processes, 3 compiles each: driver medians 3.229 / 5.597 / 3.155 / 5.398 s. The same copied exe without the profile gave 2.5808741 / 0.0016611 / 0.0016399 s. No shader salt or code changes. Full timings and commands: shaders: benchmark direct DXIL PSO compilation #1802 (comment) .git diff --check: passed.Regression run
Earlier clean
main/parent-base run and new post-push exact-head run, same title and 60 s, isolated data/cache copies, no menu input. Startup/menu coverage only.main:
this PR:
Not tested
Other NVIDIA GPUs/drivers, AMD/Intel, Linux/Wine, full-pack throughput, world rendering or GPU execution performance. Forced termination of the PowerShell host cannot execute
finally; the printed unique profile name permits manual cleanup. Requires permission to save an NVIDIA application profile, and #1802's measurement support. Rebase/drop the parent after #1802 merges.AI use
Codex desktop, GPT-6 (exact variant not exposed): this commit's implementation, tests, local measurements and description. Parent #1802 is unchanged and retains its author's disclosure.