Scripts: compare two reproducible cold/warm performance runs #2888
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2888"
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?
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-26T21:36:59Z.
Stacked on #2887; only the top three commits (
Scripts: perf-compare requires the runs to agree on the startup timeout,Scripts: perf-compare compares recorded XCL settings case-sensitivelyandScripts: perf-run's fixture checks perf-compare refuses other pipeline threads) belong here.Fixes for
scripts/perf-compare.ps1, which compares twoperf-run.ps1output folders without changing them. It refuses runs that are not comparable: a different workload fingerprint or identity algorithm/version, run order, requested duration or startup timeout,XCL_*environment, system, GPU or GPU driver. For comparable runs it reports the raw cold and warm durations, their deltas and the exit/timeout state, as console lines and one JSON document. It does not compute percentages or significance.Part of #2787 (item 8). The comparator itself (
fd237b1bfrom #2778 by @bmjask) is now onmain, so after the rebase ontomain336fdddathe port's commit is reduced to whatmainlacks: the startup-timeout check.What is in it
Scripts: perf-compare requires the runs to agree on the startup timeout(8a331081): runs must also agree onstartup_timeout_seconds, whichperf-runrecords (#2887).Scripts: perf-compare compares recorded XCL settings case-sensitively(64712f5e): the environment check used PowerShell's case-insensitive-ne, soXCL_DIRECT_DXIL=alland=ALLwere accepted as comparable although only the lowercase value turns direct translation on. It uses-cnenow, with the pair in the fixture.Scripts: perf-run's fixture checks perf-compare refuses other pipeline threads(UncommonDLL,cb776d3b, from their review):perf-run.tests.ps1makes three mock runs withXCL_PIPELINE_THREADS1, 1 and 8;perf-compareaccepts the matching pair, refuses the other withruntime environment differs, and leaves the manifests unchanged.XCL_PIPELINE_THREADS) are now compared too: #2887 records every inheritedXCL_*setting.compare-perf.ps1does on two logs, and it can be run on thexcl.logfiles aperf-runfolder keeps.Tested
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\perf-compare.tests.ps1: all assertions passed on701a7b79(synthetic manifests).perf-run.tests.ps1also passes there.main336fddda, oncb776d3b:perf-run.tests.ps1andperf-compare.tests.ps1: all assertions passed, Windows PowerShell 5.1 (UncommonDLL ran the new fixture on PowerShell 7.6.10 too).perf-run.ps1from #2887 wrote with its mock XCL, and refused a pair from different workloads.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4oncb776d3b(debug): 2122 passed, 9 failed, 48 ignored. The 9 failures are the ones in #3093 (3 e2e title tests, 6 split / wave64 GPU tests);main336fdddafails the same 9 tests with the same counts on this machine. This PR changes no Rust code. SKIPPED on this adapter: 21 ×no wave64, 3 f16/f32 per-lane forms refused per #1426, 1 ×no heap windows.Not tested
perf-runfolders from a retail game. No complete cold/warm pair exists yet (see #2887, which asks for one).AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by ettehn on 2026-11-27T02:51:04Z.
Windows cross-check of
5fefeb15and its parent runner128ee21f: the comparator accepts a pair made withXCL_PIPELINE_THREADS=1vs8. I generated both cold/warm folders with the actualperf-run.ps1, real Cargo, and a tiny syntheticxcl.exethat writes the inherited setting to its log. The child saw the two distinct values, while neither manifest contained that key, soperf-compareemitted a comparison. That setting changes the number of driver PSO builds allowed in flight inshaders.rs.I tried adding
XCL_PIPELINE_THREADS,XCL_PIPELINE_MAX_KB,XCL_DIRECT_SPLIT_INSTRUCTIONSandXCL_PSO_DISK_CACHEto the producer’s existing allowlist. All four appeared in the new manifests. The unchanged comparator rejected the 1 vs 8 pair and accepted a 1 vs 1 repeat on PowerShell 5.1 and 7. The existing comparator fixture passed on both. This tests the comparison guard, with no retail title or performance claim.OpenAI Codex (6.2sol) assisted with verification.
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-27T05:42:52Z.
Review: COMMENTED
The environment guard uses PowerShell's case-insensitive
-neon serialized JSON, so it accepts comparisons across case-sensitive XCL settings. Two synthetic manifests that differed only in the recordedXCL_DIRECT_DXILvalue (allversusALL) passed the exact-head comparator and produced anxcl-perf-comparisondocument. XCL enables direct graphics translation for lowercaseall, and the uppercase spelling leaves it disabled. Can the environment comparison use-cneand cover this pair in the existing fixture? Comparator · Runtime settingAI use: OpenAI Codex (GPT-6.2 Sol) reviewed the exact source, ran the PowerShell fixture, and drafted this comment. No benchmark or GPU workload was run.
Imported from ivall/xcl. Originally posted by LocranKing on 2026-11-27T12:23:02Z.
Tested PR #2888 (
65e1a209) on Windows 11.Verification
Ran
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\scripts\perf-compare.tests.ps1:0(verified on Windows 11 Build 26300, covering case-sensitiveXCL_*comparison via-cne).perf-compare.tests.ps1) only.Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-27T15:48:12Z.
Thanks, both are fixed on the branch (head
701a7b79, rebased onto #2887's99acc436):@ettehn,
XCL_PIPELINE_THREADS=1vs8accepted: fixed on the producer side in #2887 (72d80c95). Instead of a longer allowlist,perf-run.ps1now records every inheritedXCL_*variable, except the per-runXCL_DATA_ROOT/XCL_DXIL_CACHE.perf-compare.ps1compares the wholeenvironmentobject, so any setting that differs makes the pair incomparable. The runner fixture checks thatXCL_PIPELINE_THREADSandXCL_PREPARE_ALLare recorded. I did not rerun your exact 1 vs 8 pair through both scripts.@luckyteagirl,
allvsALL:701a7b79uses-cnefor the environment comparison, and the comparator fixture now refuses manifests that differ only inXCL_DIRECT_DXIL=allvsALL.Tested at
701a7b79on Windows PowerShell 5.1:perf-compare.tests.ps1andperf-run.tests.ps1pass, andcargo test --workspace -- --test-threads=4gives 1446 passed, 0 failed, 47 ignored. Not tested: PowerShell 7.AI use: Claude Code (Claude Opus 5.5) wrote both fixes, ran the tests and wrote this comment.
Imported from ivall/xcl. Originally posted by UncommonDLL on 2026-11-27T16:32:53Z.
@KOLESNiii We ran the
XCL_PIPELINE_THREADScase through both scripts on Windows PowerShell 5.1 and PowerShell 7.6.10. On each shell,perf-run.ps1generated three manifests with the same workload ID and thread settings of1,1and8.perf-compare.ps1accepted1versus1and rejected1versus8withruntime environment differs; runs are incomparable. The manifests stayed byte-for-byte unchanged, and the test restored the caller’s thread setting.The attached test-only commit
c7fb2b1c653e96800591ca2e9233131afc9d5f46adds this regression on701a7b79. Both focused fixtures exited 0 on both shells. OpenAI Codex assisted with the Windows test.Perf-environment-c7fb2b1c.patch
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T00:23:21Z.
@UncommonDLL thanks. I applied your commit to this PR with your authorship kept, as
552a1908. I only reworded the subject to the repo'sScripts:style: Scripts: perf-run's fixture checks perf-compare refuses other pipeline threads.Here, on Windows PowerShell 5.1 (Windows 11 26300),
perf-run.tests.ps1passes, including yourthreads 1/1 accepted, 1/8 refusedline, and so doesperf-compare.tests.ps1. The description now lists the commit and your PowerShell 7.6.10 run.AI use: Claude Code (Claude Opus 5.5) applied the commit, ran both fixtures and wrote this reply.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T09:08:06Z.
Triage (#1607) – head
cb776d3Stacked on #2887: its first seven commits are #2887's. Only the top three belong here: the
startup_timeout_secondscheck,-cnefor the environment JSON, and the combined perf-run/perf-compare fixture. This is not a duplicate.#943's
compare-perf.ps1compares log metrics, not manifests, so it does not overlap.I found no problems in
scripts/perf-compare.ps1or the two fixtures.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-12-02T14:14:50Z.
Thanks for the triage. Rebased onto #2887's new head, on
maindf0cfef6, with no conflicts. New head213da8b6; the suite is queued again.— Claude Code (Claude Opus 5.5), on behalf of the PR author
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-02T14:18:07Z.
Follow-up review (head
213da8b6, sincecb776d3, diff read, not a merge-check):git range-diff/ patch-id); this push only rebases onto the currentmain.New: none.
AI review: Claude Code (Claude Opus 5.5), posted by Foniass without a human check of each point.
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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.