Repository navigation
Scripts: reject invalid or stale cold PSO benchmark results - #2495
jeroenhaentjens wants to merge 2 commits into
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. The fixture test runs with its own LOCALAPPDATA and without inherited XCL_PIPELINE_TIMES / XCL_PIPELINE_CACHE_OFF, so -ClearNvCache never empties a real NVIDIA cache and no real timing file gets rows (found and fixed by itsSio in review). Every measured run starts a copy of the exe under a name of its own, next to the original, and removes it afterwards: the AMD driver keys its shader cache on the exe's file name, so with -ClearNvCache on AMD the second run of a sweep was served warm and reported as cold (found and measured on RDNA4 by bielfreedom in review). -Threads is read as text and split on commas: from cmd or bash, `powershell -File ... -Threads 4,8` passes one string "4,8", which an [int[]] parameter silently read as 48 threads; anything that is not a thread count is refused. Co-Authored-By: itsSio <31954644+itsSio@users.noreply.github.com> Co-Authored-By: bielfreedom <341226708+bielfreedom@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Windows script check on exact head Tested
Not tested
AI use
|
|
Follow-up to the merge-conflict report. Against main I extracted the benchmark and its fixture from that clean merge tree and ran I tested this draft (
Earlier timing-file checks on the draftTested on I seeded The candidate fix and regression stop before starting the measurement when an existing timing file cannot be removed. Across the four file/shell combinations the original timing stayed byte-identical and no summary was published. After releasing the file, all four retries published only the new row. In both shells Not tested — Real PSO builds, shader packs, GPU performance, or the Rust workspace. OpenAI Codex (GPT-6) prepared the fixtures, implemented and tested the candidate, and wrote this report. Rechecked on |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Validate timing rows and report file/line errors instead of publishing misleading zero-cost results. Use literal output paths. After preparation succeeds, remove the old summary before replacing timings; a failed preparation preserves the previous complete result. Stop before measuring if a locked or read-only timing file cannot be removed. Otherwise an exit-zero producer can leave old readable rows and publish them as a fresh measurement. Adopt RavenCurseBurg's two fixes and extend their regressions with no-start, byte preservation and fresh-retry checks. Windows PowerShell 5.1 and PowerShell 7 each pass all 39 timing cases, preparation preservation and both replacement/retry cases. With the prior production script, both new replacement cases fail in each shell. Stacked on xcl-dev#2129. Part of xcl-dev#2088. Source: RavenCurseBurg@4b190ba Source: RavenCurseBurg@91e1e60 Co-authored-by: RavenCurseBurg <360931527+RavenCurseBurg@users.noreply.github.com> Assisted-by: OpenAI Codex (GPT-6; exact deployment variant unavailable)
f4ac6cd to
bbcfc38
Compare
|
@RavenCurseBurg reproduced both locked and read-only cases in Windows PowerShell 5.1 and PowerShell 7: the old script published the old timing and started the measurement. Incorporated your fix into The regression now covers both blockers, byte-identical old data, no measurement-start marker, no summary, and successful retries containing only a different fresh row. Each shell passes all 39 timing-validation cases, preparation preservation and both replacement/retry cases (0 failures/skips). The same tests with the previous production script fail both new cases in each shell. No real PSO measurement or retail run; the Rust tree is unchanged and the parent/merge restrictions remain as documented. Thanks for catching it. AI use: OpenAI Codex (GPT-6; exact variant unavailable) incorporated the fix, extended and ran the regressions, reviewed with subagents and wrote this reply. |
|
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current |
luckyteagirl
left a comment
There was a problem hiding this comment.
Could the script reject an empty normalized -Threads list before preparation or touching the previous output? Passing -Threads ',' produces one nonempty argument, but splitting and removing blanks leaves $Threads empty, so the validation loop accepts it. The DXIL pass then runs, the new summary.csv removal deletes the previous benchmark result, and the measurement loop runs zero times. An existing summary sentinel in the mock fixture would make this visible: the invocation should fail early and preserve its bytes. Source review only at head bbcfc381; I did not run the benchmark. AI-assisted with Codex (GPT-6.2 Sol).
Reject missing, empty or malformed timing files instead of publishing misleading benchmark results. When reusing an output directory, discard its superseded summary only after preparation succeeds. Stop before measuring if old timings cannot be removed: readable locked/read-only files must not supply a new run's results.
Stacked on #2129 at the author's request. Only top commit
bbcfc38181689b9f4949ef22adbc8ee9fe364589belongs here (199 additions / 7 deletions, three files). Part of #2088. Remains draft: the parent conflicts with main and its runtime changes still require paired retail smoke runs.What is in it
cratestree equals parent8b69014.Tested
XCL_ADAPTER=nvidia, incremental/debug info disabled.powershell.exe -NoProfile -ExecutionPolicy Bypass -File scripts/cold-pso-bench.tests.ps1(5.1.26100.9818), alsopwsh.exe(7.6.9): each 39 timing cases plus preparation-preservation and both locked/read-only replacement-and-retry cases passed, 0 failed / skipped. Tests check unchanged old bytes, no measurement start or summary on failure, and only fresh rows after release.f4ac6cdfail both replacement cases in each shell; old timings are published and the measurement starts. The earlier stale-summary regression failed before its fix too.f4ac6cd:cargo build --workspace --lockedpassed;cargo test --workspace --locked --no-fail-fast -- --test-threads=4reported 1,154 passed / 1 failed / 46 ignored, 25 explicit skips (20 native-wave64, 3 unsupported f16, driver-cache control, heap windows). The sole failure wasexecute_indirect_reads_the_arguments_written_before_it, addressed by Tests: honor the selected adapter in the indirect argument test #2318 but absent from this parent. Not rerun for this script-only revision; Rust tree unchanged.git diff --checkpassed; independent subagent review found no blockers.Regression run
No retail run. The top commit changes scripts/docs only; the comparison with main includes #2129's runtime changes. No smoke exemption claimed.
Not tested
Real shader-pack measurements, GPU performance, retail smoke, or integration onto current main. Rebase after #2129 is merged/refreshed.
AI use
OpenAI Codex (GPT-6; exact variant unavailable) implemented, reviewed with subagents and ran the stated checks. Both linked RavenCurseBurg contributions disclose Codex (GPT-6).