Scripts: cold driver benchmark of compute pipelines over thread counts (#2088) #2129
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!2129
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2129"
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?
@Creaa on GitHub · 2026-11-25 05:32 UTC · original
Creaa:scripts/cold-pso-bench→main· +307 −6 · 3 files · 1 commits · openA 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). Every measured run turns off the 8 MiB DXIL cap of--pipelines(XCL_PIPELINE_MAX_KB=0): a capped program writes no timing line, so the summary would leave out the biggest programs (found by @bmjask in review); the fixture checks the variable for each run. With-ClearNvCachethe runs setXCL_PIPELINE_CACHE_OFF=0, so a caller's=1does not come back through the inherited environment. Wall time is taken from the process's start and exit times and peak commit fromPeakPagefileUsageon its handle, so short runs are not under-reported (@RavenCurseBurg's change, co-authored). The fixture runs with its ownLOCALAPPDATAand no inheritedXCL_PIPELINE_TIMES/XCL_PIPELINE_CACHE_OFF, so its-ClearNvCachecase cannot empty a real NVIDIA cache or add rows to a real timing file (found and fixed by @itsSio in review, co-author of the commit). Every measured run starts a copy of-Xclunder a name of its own, next to the original (so it finds the same DXC and Agility SDK folders), and removes it afterwards: the AMD driver keys its shader cache on the exe's file name, so with-ClearNvCacheon AMD every run after the first was warm but reported as cold (found and measured on RDNA4 by @bielfreedom in review, co-author of the commit); the fixture checks that each run gets a new name and that no copy is left.-Threadsis read as text and split on commas: from cmd or bash,powershell -File ... -Threads 4,8passes one string, which the[int[]]parameter silently read as 48 threads; the fixture runs that form through-Fileand checks it gives two runs, and that-Threads 4,xis refused.Tested
cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1424 passed, 0 failed, 46 ignored (rebased ontomaine1d84b7). SKIPPED: the wave64 GPU tests (no wave64), the direct-DXIL f16/f32 cases refused per #1426,heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows),pso_measurement_compiles_an_exact_synthetic_record(Developer Mode is off) and the D3D12 debug-layer tests.powershell -File scripts\cold-pso-bench.tests.ps1: ok; also run from a caller with a cache folder holding a sentinel, a timing CSV with rows andXCL_PIPELINE_CACHE_OFF=1set: all three unchanged afterwards (without the fix the run fails on the inherited timing file). With the per-run exe name: the fixture test fails on the previous script (xclinstead ofxcl-cold-4-<id>) and passes now, as does the-File -Threads 3,5case (one run of 35 threads before); a real run on the RTX 4070 (-Limit 12 -ClearNvCache, release build of this head) made 12 of 12 pipelines through the copy and left no copy behind.-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
@DavidM1911 on GitHub · 2026-11-25 06:32 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
@bielfreedom on GitHub · 2026-11-25 07:07 UTC · original
AMD RDNA4 run of
cold-pso-bench.ps1: on AMD Windows the script's two modes either refuse to run or give warm numbers labelled cold. A per-run exe name keeps every run cold.Setup
386e3d4, release.-Limit 22300(143 compute pipelines).1. Default mode (
XCL_PIPELINE_CACHE_OFF=1) without Developer Mode: the script stops on the first thread count withno pipelines can be made: cannot disable the driver cache (Windows Developer Mode is required): ... (0x887A002D).That is the intended refusal, and it works.
2.
-ClearNvCacheon AMD: the second run at the same thread count is warm but reported as cold.-Threads 4,4 -ClearNvCache:made, notreused, so nothing in the table shows that run 2 hit a cache.-ClearNvCachedoesn't touch. As I measured for A26, it is keyed on the exe's file name (not the path, not the binary). Every run here uses the samexcl.exe.-ClearNvCachegives one cold row and warm rows after it.3. A fresh exe name per run keeps AMD cold. I copied
xcl.exeto a new name for each run and passed it with-Xcl; still-ClearNvCache, 4 threads:xcl_bench_amd_1.exexcl_bench_amd_2.exeBoth match the first cold run above (471.6 s) within 1 %.
Suggestion
-Xclto a unique name per run (for examplexcl-cold-<threads>-<n>.exein$Out, with its DLLs). Run that copy. That covers AMD without Developer Mode, and it costs nothing on NVIDIA.-ClearAmdCacheswitch that empties%LOCALAPPDATA%\AMD\DxcCachewould work, but it drops other applications' entries, just like-ClearNvCachedoes. I haven't tested whether deleting that folder alone is enough.ShaderCacheControl(DISABLE)actually turns the AMD driver's cache off when Developer Mode is on. I couldn't test that here.Not tested
AI use: Claude Code (Claude Opus 5.5) ran the script and drafted this. Counts and timings only, no game data.
@Creaa on GitHub · 2026-11-25 10:37 UTC · original
@itsSio thank you, that was a real hazard: the fixture's
-ClearNvCachecase could empty the caller's NVIDIA cache, and an inheritedXCL_PIPELINE_TIMESgot rows. Your patch is in, squashed into the PR's commit with you as co-author (b3b962c). I checked it from a caller that has a cache folder with a sentinel, a timing CSV with rows andXCL_PIPELINE_CACHE_OFF=1: all three unchanged afterwards; without the patch the same run fails on the timing file. Smoke rerun on the new head, description updated.On your cache observation (driver 610.88: a repeat of the same exe ~0.03 s, a new exe name cold again): the RTX 4070 table here was not from a warm cache. Its eight runs used the same exe, the same DXIL and the same compute programs one after another, with the NVIDIA
DXCachefolder emptied before each, and every run spent 2 115–5 596 s inCreateComputePipelineState(the 1–4 MiB programs 100–430 s each). A run served from the driver's cache would have taken milliseconds, as in your repeat. So on 617.14 the folder held that cache. Whether a driver keeps it elsewhere too is driver-specific;XCL_PIPELINE_CACHE_OFF=1(Developer Mode) avoids the question.AI use: Claude Code (Claude Opus 5.5) applied and checked the patch and drafted this reply.
@raylitebull on GitHub · 2026-11-25 11:07 UTC · original
Updated review on \3b962c:\n\n- Folding the \LOCALAPPDATA\ / \XCL_PIPELINE_TIMES\ / \XCL_PIPELINE_CACHE_OFF\ sandbox isolation into \scripts/cold-pso-bench.tests.ps1\ prevents the test fixture from touching the user's live \DXCache\ or timing files; CI (\Build and test\ + \PR description) is green and \CLEAN.\n\nRemaining before merge:\n1. Fresh independent AMD + NVIDIA verification on \3b962c\ (prior runs were on \386e3d4).\n2. Follow-up or documentation note on @bielfreedom's AMD finding (-ClearNvCache\ reuses \xcl.exe\ without Developer Mode / per-run exe name on AMD).
@Creaa on GitHub · 2026-11-25 11:27 UTC · original
@bielfreedom thank you, that was a real hole: with
-ClearNvCacheon AMD every row after the first was a warm run labelled cold, and nothing in the table showed it. Your first suggestion is in, squashed into the PR's commit with you as co-author (8b69014): every measured run starts a copy of-Xclnamed<name>-cold-<threads>-<random>.exeand removes it afterwards. The copy sits next to the original rather than in-Out, so it finds the same DXC and Agility SDK folders that XCL looks for beside its exe. It runs whether or not the cache switch is on, since it costs nothing.Checked here: the fixture test now records the exe name of each run, fails on the previous script and passes now (a new name per run, no copy left). A real
-Limit 12 -ClearNvCacherun on the RTX 4070 made 12 of 12 pipelines through the copy and left nothing behind. I can't run it on AMD, so the description lists AMD under Not tested and cites your measurement. Smoke and the full suite were rerun on the new head. Also in the same commit:-Threads 4,8given throughpowershell -File(cmd, bash) arrived as one string that the[int[]]parameter silently read as 48; it is now split on commas and anything else is refused.@tiagonleal thanks for the RTX 5070 Ti run: a repeat under the same exe name being mostly warm on NVIDIA too (22 of 32 under 0.1 s, all rows
made) is the same hole on the other vendor, and your new-name run matching the first within 1 % is what the per-run copy now does on its own.-ClearAmdCache, and whetherShaderCacheControl(DISABLE)turns the AMD cache off under Developer Mode, are left out: with a fresh exe name neither is needed for cold numbers.AI use: Claude Code (Claude Opus 5.5) made the change, ran the checks and drafted this reply.
@itsSio on GitHub · 2026-11-25 09:35 UTC · original · edited 2026-11-25 12:14 UTC
As a small follow-up to the two-GPU check, I prepared and verified the fixture-only patch below: route the
-ClearNvCachecase to a temporary cache with a sentinel and keep inherited timing variables from contaminating fixture output. I won't change the benchmark or open a competing PR.Tested: At
386e3d479fba8c5f2e543d738b03eb237c97e17a, the isolated fixture passed on Windows 11 build 26200 on both PCs (RTX 5080 16 GB, Ryzen 7 9800X3D, 32 GiB, Rust 1.97.0, DXC 1.9.2609.5; RTX 2080 SUPER 8 GB, Ryzen 5 5600X, 16 GiB, Rust 1.99.1, DXC 1.8.2502.11; driver 610.88). The original inherited-environment run failed on the 2080 SUPER because preparation also wrote to the timing file. The linked report has exact workspace counts and commands.With this patch applied to the exact head above,
powershell -NoProfile -File <caller-check> -Fixture scripts/cold-pso-bench.tests.ps1passed on both PCs (1 passed, 0 failed, 0 ignored or skipped per PC). The caller check preloads a timing file and cache flag, points the caller at a fake cache with a sentinel, runs the fixture in the same PowerShell process, then checks the caller file, sentinel and environment are unchanged. The fixture checks its own sandbox sentinel was removed.Not tested: No runtime files changed. No retail smoke or new driver timings; this is a test-script-only patch.
AI use
Ran via Samaritan:
Verified patch for this PR
Follow-up on the revised script (
8b69014)Tested: Clean
8b690141096f61a663500c4dc5e0f47240529d70, Windows 11 Pro build 26200, debug MSVC.cargo build --workspace --locked -j 4andcargo test --workspace --locked -j 4 --no-fail-fast -- --test-threads=4 --nocaptureboth exited 0 on each Windows PC.The PowerShell fixture passed on both PCs. Then ran the unmodified
scripts/cold-pso-bench.ps1 -Shaders <synthetic-records> -Threads 2,4 -Xcl <debug-xcl> -Out <isolated-output> -ClearNvCache -TimeoutMinutes 3with a disposableLOCALAPPDATA,XCL_DATA_ROOT, and explicitXCL_ADAPTER. Only the disposable NVIDIA cache path was targeted. Each worker count made 12 pipelines, 0 refused, 0 XCL driver-blob reuses, and no per-run executable copies remained.Not tested: Actual implicit driver-cache misses, full AMD workspace, retail smoke, and repeated or larger samples. Fresh executable names and
maderows alone do not prove cold cache status; the table is an end-to-end check, not a scaling recommendation.AI use
Ran via Samaritan:
Peak commit for runs shorter than the sampling interval
The current once-per-second sampler leaves peak commit at zero if the process exits before the first sample. The script-only patch below reads Windows' lifetime
PeakPagefileUsagefrom the retained process handle after exit, without changing the benchmark's timeout, cache options, or CSV schema.Tested: Base
8b690141096f61a663500c4dc5e0f47240529d70; candidate is that head plus the diff below. Same Windows, GPU, CPU, RAM, driver, Rust and DXC configurations as above. Ranpowershell -NoProfile -File scripts/cold-pso-bench.tests.ps1: strengthened fast-exit assertion failed on the RTX 5080 before the fix and passed on both PCs after it (one fixture run passed per PC, no skips). On each PC ranscripts/cold-pso-bench.ps1 -Shaders <one-record directory> -Threads 2 -Xcl <debug-xcl> -Out <isolated output> -ClearNvCache -TimeoutMinutes 2, with the same synthetic shader, disposableLOCALAPPDATAand XCL data directory. Each baseline and candidate run exited 0 with one pipeline made, zero refused and zero XCL blob reuses. RTX 5080: 0 MB reported → 110 MB; RTX 2080 SUPER: 0 MB reported → 96 MB. These are corrected measurements, not a memory increase or reduction.Not tested: Retail titles, confirmed cold driver-cache status, or PowerShell 7. No Rust code changed; workspace results above are from the unchanged pinned binary.
AI use
Ran via Samaritan:
Verified peak-commit patch
@adriadam10 on GitHub · 2026-11-25 13:16 UTC · original
Pascal data point for #2129 (GTX 1050 Ti), script at
8b690141096f61a663500c4dc5e0f47240529d70.Setup: GTX 1050 Ti 4 GB, driver 32.0.15.8266, Core i5-8400 (6 cores), 16 GB RAM, Windows 11 Pro 26100, Developer Mode off. Release
xcl.exebuilt fromb3b962c(b3b962c..8b69014changes onlyscripts/cold-pso-bench.ps1and its test, no Rust file).Run:
cold-pso-bench.ps1 -Shaders <retail shaders pack> -Threads 2,4 -Limit 22300 -ClearNvCache -TimeoutMinutes 60(143 compute pipelines, the same sample as above), one run per thread count:What it shows on this card: going from 2 to 4 threads cuts the wall time by 24 % but every compile gets about 35 % slower (driver sum 700 → 944 s) and peak commit grows by 0.8 GB. The 3 programs of 1-4 MiB take 83-114 s each and are 31-38 % of all driver time, so on Pascal they alone set the floor for a cold start.
Not tested: thread counts other than 2 and 4; the full pack (the first DXIL pass over all 2 689 compute programs ran at a few per minute on the largest ones, so I stopped it); Developer Mode on; more than one run per cell.
Run and written with Claude Code (Claude Opus 5.5).
@tiagonleal on GitHub · 2026-11-25 11:16 UTC · original · edited 2026-11-25 13:25 UTC
NVIDIA verification of #2129 at
8b690141096f61a663500c4dc5e0f47240529d70, now with Developer Mode on. This replaces my earlier comment on this PR.Setup: RTX 5070 Ti 16 GB, driver 32.0.16.1742, Ryzen 7 9800X3D, 32 GB RAM, Windows 11 Pro 10.0.26300, Developer Mode on. Release build of
8b69014(the checkout is clean and at that exact commit).Tested on
8b69014cargo test --release -p xcl --lib shaders::: 10 passed, 0 failed, 0 ignored, 0 SKIPPED.shaders::tests::pso_measurement_compiles_an_exact_synthetic_recordran and passed (it was SKIPPED in my earlier comment, with Developer Mode off).scripts/cold-pso-bench.ps1in its default mode, end to end:-Shaders <32 small compute records> -Threads 2,8 -Xcl target\release\xcl.exe, no-ClearNvCache, soXCL_PIPELINE_CACHE_OFF=1was in effect. It printed "implicit D3D and driver caches disabled (XCL_PIPELINE_CACHE_OFF); XCL driver blobs off" and finished with the full table. One run per cell:Per bucket, the same in both runs: 12 programs under 64 KiB (driver sum 2.1 s at 2 threads, 2.7 s at 8) and 20 programs of 64-256 KiB (47.6 s and 63.2 s). All 32 rows were
madein both runs, 0reused, 0refused. Only my originalxcl.exewas left in its folder afterwards (the per-run copy is removed).b3b962c, which has the same Rust code as8b69014.b3b962c: it was mostly warm (22 of 32 pipelines under 0.1 s, driver sum 21.1 s, no new driver cache files) with all 32 rows stillmade. I did not repeat that on8b69014.-ClearNvCache, and I did not delete or change anything in the NVIDIADXCacheorD3DSCachefolders. I only listed their files (name, size, write time) around the runs: a 45 s idle window and then a run of the script, twice. In the first pair the idle window changed 0 files and the run window added or changed 12 (10 new files, 2 existing ones changed), all with write times inside the run; the only other processes alive were cargo and rustc. In the second pair another process using the GPU was alive in both windows and files changed in both (5 in the idle one, 14 in the run one), so that pair is inconclusive. So withXCL_PIPELINE_CACHE_OFF=1I still saw the driver cache folders gain files during a run. I did not find out which file belongs to which pipeline, and I do not know whether it comes from the script, the D3D12 runtime or the driver.Not tested
scripts/cold-pso-bench.tests.ps1(the fixture) on this run: I did not rerun it with Developer Mode on. My earlier run of it (Developer Mode off,LOCALAPPDATApointed at a temp folder) passed.XCL_PIPELINE_CACHE_OFF=1alone gives the same numbers as a new exe name here. The table above is the first run. A second run of the same input gave 28.8 s / 10.3 s wall at 2 / 8 threads, and a third, with another GPU process alive, 39.4 s / 15.4 s.cargo test -p xcl --lib(only theshaders::tests were run); thread counts other than 2 and 8; the large DXIL buckets (this input has only the two smallest); the full pack; AMD; more than one run per cell.Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
@jeroenhaentjens on GitHub · 2026-11-25 14:15 UTC · original
CPU fixture report and a script-only follow-up for this PR: dcd14b8, based on exact head
8b690141096f61a663500c4dc5e0f47240529d70.An exit-zero fixture with missing or malformed timing data can still produce a successful benchmark summary on the current script. The patch validates the five CSV fields, rejects missing/empty files and nonfinite/negative durations, and identifies the file and physical line in row errors. Actual zero durations and refused-only/reused-only measurements remain valid. Timing cleanup/read and summary export use literal paths; an append-mode repeat fixture also checks that an output directory containing
[]cannot retain the previous run's rows.Tested
Windows 11 Pro, build 26200, Intel Core i7-9750H; CPU-only
.cmdprocess fixture. Final code and tests are identical to the files tested before committing.The 37 cases comprise 30 invalid inputs and 7 valid/repeated-run cases; none ignored or skipped. Original environment, percentile/bucket, thread-argument, temporary cache and executable-cleanup checks also pass. Of the 30 invalid inputs, the original script accepted and wrote a summary for 24 on 5.1 and 26 on 7; the remaining cases already threw but lacked file/line diagnostics. Two literal-path cases account for the other baseline failures.
Commands run with both
powershell.exeandpwsh.exe:For the baseline, the final fixture was run beside an untouched copy of
cold-pso-bench.ps1extracted from8b690141; both commands exited 1. With the patch, both exited 0. The fixture's cache deletion stays inside its temporary directory.Not tested
No new GPU/cold-cache measurement, retail smoke or full Rust-suite run for this script-only follow-up. This does not refresh the runtime PR's merge-validation evidence or prove that a timing file includes every expected pipeline.
AI use
Codex (exact model identifier unavailable), with subagents, wrote the patch, regression fixture and this report and checked the measured results.
@Creaa on GitHub · 2026-11-25 14:23 UTC · original
@jeroenhaentjens thank you, the cases are real: an
xclthat exits 0 with a missing or malformed timing file gets a summary today, and a path with[]breaks the reads without-LiteralPath. I'd rather keep this PR as it is, though: it is a runtime PR, every push needs a new smoke pair and test reports on the new head, and it already has several reports on8b69014. Could you opendcd14b8as its own PR once this one is merged (or stacked on it now,Stacked on #2129)? It reads well as a separate change, and it stays yours. I'll test it on the RTX 4070 when it is up.AI use: Claude Code (Claude Opus 5.5) drafted this reply.
@IvovdBruggen on GitHub · 2026-11-25 17:59 UTC · original
Ampere data point for #2129 (RTX 3080 10 GB), script at
8b690141096f61a663500c4dc5e0f47240529d70, with Developer Mode on.Setup: NVIDIA GeForce RTX 3080 10 GB, driver 617.42 (32-lane waves only); AMD Ryzen 5 5600 (6 cores, 12 threads); 32 GB RAM; Windows 11 IoT Enterprise LTSC 26100, Developer Mode on. Release build of
8b69014(clean checkout at that commit), Rust 1.100.0 MSVC, DXC 1.8.2502.11 (Windows SDK 10.0.26100.0).Tested on
8b69014cargo test --workspace --no-fail-fast -- --test-threads=4(debug): 1155 passed, 0 failed, 46 ignored (lib tests 1099 / 0 / 26). SKIPPED: the wave64 GPU tests (no wave64), the direct-DXIL f16 / f32 per-lane cases refused per #1426, andheap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).shaders::tests::pso_measurement_compiles_an_exact_synthetic_recordran and passed.Run: the unmodified
scripts/cold-pso-bench.ps1 -Shaders <retail shaders pack> -Limit 22300 -TimeoutMinutes 60, default mode, soXCL_PIPELINE_CACHE_OFF=1(implicit D3D and driver caches off, XCL driver blobs off). Same sample as @adriadam10's GTX 1050 Ti run: 143 compute pipelines, bucket counts 71 / 44 / 25 / 3. One invocation with-Threads 4,6,8,12,4, and the 2-thread row from a second invocation with-Threads 2right after it:What it shows on this machine:
DXCacheandD3DSCachefolders still gained or changed files withXCL_PIPELINE_CACHE_OFF=1: 32 files over the4,6,8,12,4invocation. I only listed them (name, size, write time); I did not find out which run or pipeline wrote them.Not tested:
-ClearNvCache;scripts/cold-pso-bench.tests.ps1; thread counts 10, 16, 20 and 24; the 67-record corpus of the PR description and the full pack; more than one run per cell except 4 threads; AMD.Run and written with Claude Code (Claude Opus 5.5).
@jeroenhaentjens on GitHub · 2026-11-25 20:19 UTC · original
@Creaa @RavenCurseBurg published the separate follow-up as draft #2495, stacked on this PR as requested. Only top commit f4ac6cd belongs to the follow-up.
I reproduced the stale-summary case on dcd14b8 plus the supplied regression: 37 passed / 1 failed in both Windows PowerShell 5.1 and PowerShell 7. Incorporated the fix with RavenCurseBurg credited as co-author, and added valid-retry and byte-for-byte preparation-failure preservation checks. Final result in both shells: 39 timing cases passed, 0 failed, plus the preparation check.
Full workspace build passes; tests on the exact final head: 1154 passed, 1 failed, 46 ignored, 25 explicit skips. The sole failure is the adapter-selection test fixed by #2318, absent from this parent. The draft documents the inherited shaders.rs conflict and smoke requirement while #2129 remains pending. No real shader-pack or performance result is claimed.
AI use: OpenAI Codex (GPT-6; exact deployment variant unavailable), including an independent subagent diff review.
@Creaa on GitHub · 2026-11-25 22:15 UTC · original
@bmjask thanks, right: with the default cap a program over 8 MiB returned before its timing line, so the summary dropped exactly the biggest ones without a word. Fixed in
510f768(squashed into the PR's commit): every measured run setsXCL_PIPELINE_MAX_KB=0, and the fixture now records that variable for each run and fails on the previous script (its value was empty there). The branch is also rebased ontomaine1d84b7(the conflict inshaders.rswas main's newcache_dirfield and counters next totimes); smoke pair and full suite rerun on the new head, numbers in the description.AI use: Claude Code (Claude Opus 5.5) made the change, ran the checks and drafted this reply.
@Creaa on GitHub · 2026-11-25 22:23 UTC · original
@bmjask the other two points are in now too (my previous reply only covered the cap, sorry):
-ClearNvCacheevery run setsXCL_PIPELINE_CACHE_OFF=0instead of leaving it out, so a caller's=1no longer turns the switch back on. The fixture now runs-ClearNvCachewithXCL_PIPELINE_CACHE_OFF=1in the caller's environment, checks that the child saw0and that the caller's value is unchanged; it fails on the previous script.PeakPagefileUsageon its handle, so a child shorter than the one-second sampling no longer shows 0 MB. This is @RavenCurseBurg's change from their comment above, taken as it is with credit (Co-Authored-By); the fixture checks that every row has a peak.Squashed into the PR's commit, now
30a3ef1; smoke pair and full suite rerun on it, numbers in the description.AI use: Claude Code (Claude Opus 5.5) made the P2 change, took in the P3 commit, ran the checks and drafted this reply.
@RavenCurseBurg on GitHub · 2026-11-25 19:35 UTC · original · edited 2026-11-25 22:44 UTC
Retested the incorporated change on
30a3ef1055ed5da9d04a6ca667996112756486c1.scripts/cold-pso-bench.tests.ps1passed on Windows PowerShell 5.1 and PowerShell 7.6.9, including the child environment checks. I also reran the same three stand-in workloads as below in each shell. All six CSV rows reported 25 MiB, including the children that exited before one second. All six peak and wall-time readings covered the child's own measurements within CSV rounding. Windows 11 26100.9711, i7-13700, synthetic workloads. OpenAI Codex (GPT-6) ran the checks. Author’s adoption note.Short-process measurement on
8b690141096f61a663500c4dc5e0f47240529d70. I reproduced the remaining review observation. A small stand-in process committed 12 MiB, touched it, released it, and wrote its own peak and elapsed time. I ranscripts/cold-pso-bench.ps1 -Shaders synthetic -Threads 1,2,3 -Xcl <stand-in.exe> -Out <private-directory>with a short hold, an early release followed by a one-second wait, and an immediate release.scripts/cold-pso-bench.tests.ps1passed in Windows PowerShell 5.1 and PowerShell 7.6.9. The new short-child assertion failed on the original script in each shell. I also combined this commit with the earlier child-environment candidate (1af753b); they merged cleanly and the combined fixture passed in both shells.Windows 11 26100.9711, Core i7-13700. Synthetic process only; no GPU workload or real shader timings. OpenAI Codex (GPT-6) implemented the candidate and ran these checks.
Earlier checks on the child environment and on the CSV follow-up
I independently tested @jeroenhaentjens's script-only follow-up on top of
8b69014. Reusing an output directory exposed one more case: after a successful run I supplied a malformed line for the second thread count. The script correctly rejected line 3 of the replacementtimes-3.csv, but the previous run'ssummary.csvwas still there, byte-for-byte unchanged.Five-line follow-up and regression, based directly on the linked CSV patch for its author to use separately. After preparation succeeds, the script removes the superseded summary before replacing timing files. If preparation fails, the previous summary remains available. A valid retry writes a new summary.
made, onerefusedand onereusedrecord per thread setting (1 and 3). The 20 durations were 1–20 seconds in reverse order. The reported sum/p50/p95/max were 210/10/19/20 seconds. All five size buckets matched at the 64 KiB, 256 KiB, 1 MiB and 4 MiB boundaries. These numbers validate the calculation; they are fixture data.scripts/cold-pso-bench.tests.ps1with the added valid-then-invalid case gave 37 passes and that one failure ondcd14b8; the new commit passed all 38 cases in both Windows PowerShell 5.1.26100.9711 and PowerShell 7.6.9. I also verified the failed preparation, malformed measurement and valid retry in both shells. Driver cache testing in the existing suite used its private fixture directory.Windows 11 build 26100.9711, i7-13700. No real shader pack, GPU workload or driver timings. OpenAI Codex (GPT-6) ran the checks and prepared the incremental change.
Follow-up on the benchmark environment review. On
8b690141096f61a663500c4dc5e0f47240529d70a synthetic child honoring the 8192 KiB cap omitted its 9 MiB row. With only the cap corrected, the-ClearNvCachechild still saw the caller’sXCL_PIPELINE_CACHE_OFF=1in both shells. Candidate for the two child settings.I ran
scripts/cold-pso-bench.tests.ps1in Windows PowerShell 5.1 and PowerShell 7.6.9. Both modes included the fourth made row with the fix. The default-mode table showed 5.6 s summed and 0.2 s p50 from synthetic timings. The cache-folder mode selectedCACHE_OFF=0; both caller settings survived. All cache operations used a private fixture directory. No driver timing or memory measurement was taken.I also tried the candidate together with #2495 at
bbcfc381. The production script merged cleanly. In the fixture I kept the checked cache and cleanup paths from #2495 and the environment setup and restoration from this candidate. Both shells then passed the 39 CSV cases, preparation preservation and both replacement/retry checks. Windows 11 26100.9711, i7-13700. OpenAI Codex (GPT-6) prepared the candidate and ran these checks.@DavidM1911 on GitHub · 2026-11-26 07:28 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
@bmjask on GitHub · 2026-11-25 21:22 UTC · original · reviewed
P1 benchmark validity: cold-pso-bench.ps1 never sets XCL_PIPELINE_MAX_KB=0, so the default 8 MiB cap makes make_with_cache_path return before emitting XCL_PIPELINE_TIMES. The script can claim every compute pipeline while omitting all >8 MiB programs from summaries. Disable the cap and test capped fixture. P2: -ClearNvCache inherits XCL_PIPELINE_CACHE_OFF=1 because child environment is unsanitized, potentially disabling caches/refusing Developer Mode; remove/sanitize it and test inherited state. Short runs can also under-report wall/peak memory due stopwatch/sampling placement.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.