Repository navigation
Conversation
xcl-dev#2088) xcl-dev#2088 asks for reliable cold NVIDIA measurements of the compute-pipeline pass at 4 to 24 workers. scripts/cold-pso-bench.ps1 fills a DXIL cache once (DXC, not timed), then makes every compute pipeline of the same input again for each thread count with XCL's driver blobs off and either the implicit D3D and driver shader caches off (XCL_PIPELINE_CACHE_OFF=1, Developer Mode) or the NVIDIA DXCache folder emptied (-ClearNvCache), and tabulates wall and CPU time, peak commit, summed driver time and p50/p95/max per pipeline, also per DXIL size bucket. xcl shaders --pipelines gets the two switches it needs: - XCL_PIPELINE_TIMES=<file>: one CSV line per pipeline (DXIL hash and bytes, made/reused/refused, slot wait and time in CreateComputePipelineState); - XCL_PIPELINE_CACHE_OFF=1: the pass turns the implicit caches off through the helper --measure-pso already used (now shared), or refuses to run. On an RTX 4070 (617.14, i7-13700F), 67 compute programs (every 40th of a retail pack), cold: wall time 558 s at 4 threads, 430 s at 6 and 415-432 s from 8 to 24, CPU time ~2100-2400 s throughout, while summed driver time grew 2.6x and peak commit 5.5 -> 13.6 GB. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
AMD RDNA4 run of Setup
1. Default mode ( 2.
3. A fresh exe name per run keeps AMD cold. I copied
Both match the first cold run above (471.6 s) within 1 %. Suggestion
Not tested
AI use: Claude Code (Claude Opus 5.5) ran the script and drafted this. Counts and timings only, no game data. |
A reproducible cold benchmark of the compute-pipeline pass, for workstream 6 of #2088: every compute pipeline of a fixed input made again at each thread count with no warm cache, and a table of what each thread count costs. Part of #2088.
scripts/cold-pso-bench.ps1fills a DXIL cache once (DXC, not timed), then for each thread count runsxcl shaders <input> --precompile --only cs --pipelineswith XCL's driver blobs off (XCL_PSO_DISK_CACHE=0) and either the implicit D3D and driver shader caches off (XCL_PIPELINE_CACHE_OFF=1, needs Developer Mode) or the NVIDIA DXCache folder emptied (-ClearNvCache). It prints wall and CPU time, peak commit, pipelines made/refused, summed driver time and p50/p95/max per pipeline, the same per DXIL size bucket, and writessummary.csv.What is in it
crates/xcl/src/shaders.rs:XCL_PIPELINE_TIMES=<file>writes one CSV line per pipeline of--pipelines(DXIL hash and bytes,made/reused/refused, slot wait ms, ms insideCreateComputePipelineState);XCL_PIPELINE_CACHE_OFF=1turns the implicit caches off for the pass or refuses to run, through the helper--measure-psoalready used (taken out of it and shared); the setup error no longer says "no GPU device" when the cause is the cache switch. Test:pipeline_timing_lines_name_the_dxil_outcome_and_both_times.scripts/cold-pso-bench.ps1andscripts/cold-pso-bench.tests.ps1(fixturexcl.cmd: the environment and arguments of each run, the summary and bucket rows).Tested
cargo build --workspace && cargo test --workspace -- --test-threads=4: 1155 passed, 0 failed, 46 ignored. SKIPPED: the wave64 GPU tests (no wave64), the direct-DXIL f16/f32 cases refused per gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows) andpso_measurement_compiles_an_exact_synthetic_record(Developer Mode is off here).powershell -File scripts\cold-pso-bench.tests.ps1: ok.-ClearNvCache, one run per thread count:By DXIL size at 4 / 12 / 24 threads, summed driver s: < 64 KiB (23 programs) 2.4 / 5.1 / 5.9; 64–256 KiB (23) 65 / 160 / 323; 256 KiB–1 MiB (9) 461 / 888 / 1 403; 1–4 MiB (12) 1 586 / 2 933 / 3 865.
On this machine the wall time stops improving at about 6 threads and the CPU time stays at ~2 100–2 400 s whatever the thread count: one process gets about 5.5 cores' worth of driver work. More threads only stretch each compile (p50 ×5.5, max ×1.9 from 4 to 24) and raise peak commit 2.5×. One run per thread count; the 12 programs of 1–4 MiB are most of the time.
Regression run
main:
this PR:
The title run does not reach the changed code (
xcl shadersonly); it is the regression check the PR checks ask for.Not tested
XCL_PIPELINE_CACHE_OFF=1on hardware: Developer Mode is off here, so the numbers above use-ClearNvCache(NVIDIA's DXCache folder emptied before each run). Only its refusal path ran (the--measure-psotest's skip shows the same error).AI use
🤖 Generated with Claude Code